11.07.2015 Views

Caché ObjectScript Reference - InterSystems Documentation

Caché ObjectScript Reference - InterSystems Documentation

Caché ObjectScript Reference - InterSystems Documentation

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

The $ZUTIL(158,1,n) function returns the pathname of the printer currently installed onyour system that corresponds to n. <strong>Caché</strong> counts printers from 1, and assigns a sequentialinteger to each. If n is a number that does not correspond to a printer, <strong>Caché</strong> issues a error.ExampleThe following example returns the total number of installed printers, then returns the pathnamefor each printer.SET x=$ZUTIL(158,0)WRITE !,"The number of printers is: ",xWHILE x>0 {WRITE !,"Printer #",x," is ",$ZUTIL(158,1,x)SET x=x-1 }See Also• JOB command$ZUTIL(168)• “Specifying Terminals and Printers by Device Name” in the I/O Devices and Commandschapter of <strong>Caché</strong> I/O Device Guide$ZUTIL(168)Returns location of current working directory, or sets current working directory.$ZUTIL(168,dir)$ZU(168,dir)ParametersdirOptional — Name of directory to set as working directory for sequential file output.Specified as a quoted string.Description$ZUTIL(168) (with no arguments) returns a string that contains the location of your currentworking directory for sequential file output. (Note that this directory should not be confusedwith the default directory for globals in the current namespace.)$ZUTIL(168,dir) sets your current working directory for sequential file output to the dirdirectory. It returns the pathname of the old working directory. If the directory cannot be set<strong>Caché</strong> <strong>ObjectScript</strong> <strong>Reference</strong> 717

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!