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.

<strong>Caché</strong> <strong>ObjectScript</strong> CommandsmnespaceThe name of the mnemonic space that contains the device control mnemonics used by thisdevice. By default, <strong>Caché</strong> provides two mnemonic spaces: ^%XMAG for magnetic tapedevices, and ^%X364 (ANSI X3.64 compatible) for all other devices and sequential files.Default mnemonic spaces are assigned by device type.Go to the System Management Portal, select System Configuration, select Advanced Settings,on the pull-down Category list select IO. Select either MnemonicMagTape, MnemonicOther,MnemonicSeqFile, or MnemonicTerminal. For the desired device type, click “edit” to displayand edit its mnemonic space setting.A mnemonic space is a routine that contains entrypoints for the device control mnemonicsused by READ and WRITE commands. The READ and WRITE commands invoke thesedevice control mnemonics using the /mnemonic(params) syntax. These device controlmnemonics perform operations such a moving the cursor to a specified screen location orrewinding a magnetic tape.Use the mnespace argument to override the default mnemonic space assignment. Specify a<strong>Caché</strong> <strong>ObjectScript</strong> routine that contains the control mnemonics entrypoints used with thisdevice. The enclosing double quotes are required. Specify this option only if you plan to usedevice control mnemonics with the READ or WRITE command. If the mnemonic spacedoes not exist, a error is returned. For further details on mnemonic spaces,see I/O Devices and Commands in the <strong>Caché</strong> I/O Device Guide.ExamplesIn the following example, the OPEN command attempts to acquire ownership of device 2(the spooler). The first positional parameter (3) specifies the file number within the ^SPOOLglobal and the second positional parameter (12) specifies the line number within the file. Ifyou later use the USE command to make this the current device (that is, USE 2), <strong>Caché</strong><strong>ObjectScript</strong> sends subsequent output to the spooler.OPEN 2:(3:12)In the following example, the OPEN command attempts to acquire ownership of thesequential file CUSTOMER within the timeout period of 10 seconds.OPEN "\myfiles\customer"::10Note that because no parameters are specified, the parentheses are omitted, but the colonmust be present.104 <strong>Caché</strong> <strong>ObjectScript</strong> <strong>Reference</strong>

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

Saved successfully!

Ooh no, something went wrong!