COBOL Manual for TNS and TNS/R Programs

Environment Division
HP COBOL Manual for TNS and TNS/R Programs522555-006
6-13
SPECIAL-NAMES Paragraph
You cannot use the mnemonic-name in ACCEPT statements, because
CONSOLE maps to $0, an output-only device.
°
system-name is MYTERM
When system-name is MYTERM, the System-Name clause assigns a
mnemonic-name to the home terminal You can then use the mnemonic-name
in ACCEPT and DISPLAY statements, as in this example:
SPECIAL-NAMES.
MYTERM IS MY-TERMINAL .
...
DISPLAY "MOUNT THE PAYROLL MASTER TAPE"
UPON MY-TERMINAL.
...
ACCEPT EMPLOYEE-NAME FROM MY-TERMINAL.
°
system-name is CHANNEL-1 … CHANNEL-12
When system-name is one of CHANNEL-1 … CHANNEL-12, the System-
Name clause assigns a mnemonic-name to the channel in a printer carriage-
control tape. This assignment allows the ADVANCING phrase of a WRITE
statement to specify a channel skip instead of a line count, as in this example:
SPECIAL-NAMES.
CHANNEL-1 IS SIXTEENTH-LINE ...
...
WRITE HEADING AFTER ADVANCING SIXTEENTH-LINE.
System-Name Clause With a STATUS Phrase
When the System Name clause has a STATUS phrase, system-name must be
the name of an external switch: SWITCH-1 through SWITCH-15.
In the Guardian environment, set these switches at run time using the TACL
command PARAM. In the OSS environment, set these switches with environment
variables.
The System-Name clause assigns a mnemonic-name to the chosen external
switch in SET statements in your program. Conditional statements in the program
can refer to the switch only through the condition-names you choose for switch-
on and switch-off.
You can give a mnemonic-name to the switch itself, but you must declare at least
one STATUS phrase for the switch because only the condition-name of the
STATUS phrase can be used for testing within the program. The mnemonic-name
has no purpose other than to qualify the condition-name.
You can code either the ON STATUS or the OFF STATUS phrase first, but you can
use only one of each phrase for each system-name.