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.

• $KEY does not support block-based read and write operations, such as magnetic tapeI/O.$KEY on the Command LineWhen issuing commands interactively from the <strong>Caché</strong> Terminal command line, you press to issue each command line. The $KEY and $ZB special variables record thiscommand line terminator character. Therefore, when using $KEY or $ZB to return the terminationstatus of a read operation, you must set a variable as part of the same command line.For example, if you issue the command:>READ x:10from the command line, then check $KEY, it will not contain the results of the read operation;it will contain the character that executed the command line. To return the resultsof the read operation, set a local variable with $KEY in the same command line, as follows:>READ x:10 SET rkey=$KEYThis preserves the value of $KEY set by the read operation. To display this read operationvalue, issue either of the following command line statements:>WRITE $ASCII(rkey); returns -1 for null string (time out); returns ASCII decimal value for terminator character>ZZDUMP rkey; returns blank line for null string (time out); returns hexadecimal value for terminator characterSee Also• READ command• SET command• ZZDUMP command• $ZB special variable$KEY<strong>Caché</strong> <strong>ObjectScript</strong> <strong>Reference</strong> 441

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

Saved successfully!

Ooh no, something went wrong!