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.

If the principal device is a null device (which is the default for a background process), $IOcontains the null device name with ":pid" appended, thus allowing you to use $IO for a uniquesubscript. The null device name contained in $IO depends on the operating system.• For Windows systems, $IO contains //./nul:pid• For UNIX systems, $IO contains /dev/null:pid• For VMS systems, $IO contains NLA0::pidIf the input device is redirected via a pipe or file, $IO contains “00”.You can test the value of $IO, as in the following OpenVMS example:TESTPRGOPEN "/dev/tty04"USE "/dev/tty04"SET old=$IOCLOSE $IOOPEN "/dev/tty03"USE "/dev/tty03"WRITE !,"Old device: ",old,!,"Current device: ",$IOCLOSE $IOQUITThe default device number for a device is configurable. Go to the System Management Portal,select System Configuration, select Advanced Settings, on the pull-down Category list selectDevices. Click “contents” to display the current list of devices. For the desired device, click“edit” to display and modify its PhysicalDevice: option. If you do this, $IO will contain theassigned device number, rather than the actual operating system device name.This special variable cannot be modified using the SET command. Attempting to do so resultsin a error.See Also• USE command• $PRINCIPAL special variable• $ZUTIL(96,14) Return current device type function• I/O Devices and Commands in <strong>Caché</strong> I/O Device Guide• Terminal I/O in <strong>Caché</strong> I/O Device Guide$IO<strong>Caché</strong> <strong>ObjectScript</strong> <strong>Reference</strong> 437

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

Saved successfully!

Ooh no, something went wrong!