11.07.2015 Views

Caché ObjectScript Reference - InterSystems Documentation

Caché ObjectScript Reference - InterSystems Documentation

Caché ObjectScript Reference - InterSystems Documentation

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

DescriptionCLOSE device releases ownership of the specified device, optionally sets certain devicecharacteristics, and returns it to the pool of available devices. If the process does not own thespecified device, the system ignores the CLOSE.ArgumentspcAn optional postconditional expression. <strong>Caché</strong> executes the CLOSE command if the postconditionalexpression is true (evaluates to a non-zero numeric value). <strong>Caché</strong> does not executethe command if the postconditional expression is false (evaluates to zero). For further details,refer to Command Postconditional Expressions in Using <strong>Caché</strong> <strong>ObjectScript</strong>.deviceThe device to be closed. It is required and can be specified as a single device ID or as acomma-separated list of device IDs. Specify the same device ID (mnemonic or number) asspecified on the corresponding OPEN command. For more information on specifying deviceIDs, refer to the OPEN command.The device ID of the current device is contained in the $IO special variable.parametersCLOSEA colon separated list of parameters used to set certain characteristics of the specified device.The available parameters are as follows:"D""R":newnamecloses and deletes a sequential filecloses and renames a sequential fileRefer to RMS and Sequential File I/O in the <strong>Caché</strong> I/O Device Guide for further information.ExamplesIn the following UNIX example, the CLOSE command closes device C (/dev/tty02), butonly if it is not the current device. The postconditional uses the $IO special variable to checkfor the current device.CloseDevCSET C="/dev/tty02"OPEN C; ...CLOSE:$IO'=C C<strong>Caché</strong> <strong>ObjectScript</strong> <strong>Reference</strong> 21

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

Saved successfully!

Ooh no, something went wrong!