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.

$ZMODE• $ZCHILD special variable• $ZPARENT special variable$ZMODEContains current I/O device OPEN parameters.$ZMODEDescription$ZMODE contains the parameters specified with the OPEN or USE command for the currentdevice. The string returned contains the parameters used to open the current I/O device incanonized form. These parameter values are separated by backslash delimiters. Openparameters like "M" on TCP/IP IO are canonized to "PSTE". The "Y" and "K" parametervalues are always placed last.This special variable cannot be modified using the SET command. Attempting to do so resultsin a error.ExamplesThe following example sets parameters for the current device with the USE command. Itchecks the current parameters with $ZMODE before and after the USE command. To testwhether a specific parameter was set, this example uses the $PIECE function with thebackslash delimiter, and tests for a value using the binary contains operator ([):ZmodetestWRITE !, $ZMODEIF $PIECE($ZMODE,"\\")["S" {WRITE !, "S is set" }ELSE {WRITE !, "S is not set" }USE 0:("":"IS":$CHAR(13,10))WRITE !, $ZMODEIF $PIECE($ZMODE,"\\")["S" {WRITE !, "S is set" }ELSE {WRITE !, "S is not set" }QUITSAMPLES>DO ^zmodetestRY\Latin1\K\UTF8\S is not setSIRY\Latin1\K\UTF8\<strong>Caché</strong> <strong>ObjectScript</strong> <strong>Reference</strong> 477

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

Saved successfully!

Ooh no, something went wrong!