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.

$ZUTIL(82,12)$ZUTIL(82,12)Redirects I/O operations.$ZUTIL(82,12,n)$ZU(82,12,n)ParameternThe boolean value that specifies whether or not to perform I/O redirection.DescriptionYou can use $ZUTIL(82,12) to put in effect redirection of I/O commands for the currentdevice. Specifying $ZUTIL(82,12) without the n parameter returns the current status of thisI/O redirection switch.For information on handling a timeout of a READ with I/O redirection, refer to $ZUTIL(96,4).When you turn on redirection for a particular device, READ and WRITE commands becomecalls to labels in the mnemonic space routine. Thus, as the following UNIX example shows,commands of the form:WRITE /?xxxorREAD /?xxxare treated as reference to tags %xxx in the mnemonic space routine for the current device.To determine the current device, use the $IO special variable.The redirection entrypoints and call formats for user-written routines for WRITE and READare as follows:WRITE STRING = DO wstr(STRING)WRITE *CHAR = DO wchr(CHAR)WRITE ! = DO wnlWRITE ?POS = DO wtab(POS)WRITE # = DO wffREAD VAR#LEN:TIMEOUT = SET VAR=$$rstr(LEN,TIMEOUT)READ *VAR:TIMEOUT = SET VAR=$$rchr(TIMEOUT)ParametersnThe boolean switch that determines redirection: 0 = Redirection not in effect for currentdevice (default). 1 = Redirection in effect for the current device.<strong>Caché</strong> <strong>ObjectScript</strong> <strong>Reference</strong> 689

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

Saved successfully!

Ooh no, something went wrong!