SPECIAL-NAMES Paragraph - Format >>-SPECIAL-NAMES.-----------------------------------------------> .---------------------------------------------------------------. V | >----+-----------------------------------------------------------+-+--> +-environment-name-1--+----+--mnemonic-name-1---------------+ | '-IS-' | '-environment-name-2--+-+----+--mnemonic-name-2--| cond |-+-' | '-IS-' | '-| cond |--------------------------' .---------------------. .------------------. V | V | >----+-----------------+-+----+--------------+-+----------------> '-ALPHABET Clause-' '-CLASS Clause-' >--+----------------+--+-----------------------+----------------> '-CONSOLE Clause-' | (1) | '-CRT STATUS Clause-----' .------------------------------. V | >----+--------------------------+-+--+-------------------+------> | (2) | | (1) | '-CURRENCY SIGN Clause-----' '-CURSOR Clause-----' .-----------------------------. V | >--+----------------------+----+-------------------------+-+----> '-DECIMAL-POINT Clause-' | (1) | '-LINKAGE TYPE Clause-----' .-----------------------. .-----------------------. V | V | >----+-------------------+-+----+-------------------+-+---------> | (1) | | (1) | '-FORMAT Clause-----' '-LOCALE Clause-----' >--+---------------------------+--+-------+-------------------->< | (1) | | (3) | '-PROGRAM STATUS Clause-----' '-.-----' cond |--+-ON--+--------+--+----+--condition-1--+----------------+-+--| | '-STATUS-' '-IS-' '-| off phrase |-' | '-| off phrase |--+-------------------------------------+-' '-ON--+--------+--+----+--condition-1-' '-STATUS-' '-IS-' off phrase |--OFF--+--------+--+----+--condition-2-------------------------| '-STATUS-' '-IS-'
Table 1 shows the actions that are associated with mnemonic-names for environment-name-1.
| Environment-name-1 | Statement where mnemonic-name associated with environment-name is used | Usage |
|---|---|---|
| CSP | WRITE | Suppress spacing when printing a line. Use only when the device is PRINTER. |
| C01 | WRITE | Skip to the next page. Use only when the device is PRINTER. |
| ATTRIBUTE-DATA | ACCEPT | Retrieve attribute data about a program device acquired by a transaction file, but only when the file is open. |
| I-O-FEEDBACK | ACCEPT | Give information about the last I-O operation on a file, but only when the file is open. |
| DATA-AREA | ACCEPT, DISPLAY | Retrieves or updates a system data area. |
| OPEN-FEEDBACK | ACCEPT | Give information about a file, but only when the file is open. |
| CONSOLE, SYSTEM-CONSOLE | ACCEPT, DISPLAY | Communicate with the system operator’s message queue (QSYSOPR). |
| LOCAL-DATA | ACCEPT, DISPLAY | Retrieve data from, or move data to the local data area created by the system for every job. |
| PIP-DATA | ACCEPT | Retrieve data from the Program Initialization Parameters (PIP) data area for programs running as part of a prestart job. |
| REQUESTOR | ACCEPT, DISPLAY | Communicate with the user work station (interactive jobs) or the batch input stream or job log (batch jobs). |
| SYSIN | ACCEPT | The equivalent of REQUESTOR (for the ACCEPT statement only). |
| SYSOUT | DISPLAY | The equivalent of REQUESTOR (for the DISPLAY statement only). |
UPSI-0 through UPSI-7 are COBOL names that identify program switches defined outside the COBOL program at object time. Their contents are considered to be alphanumeric. A value of zero is off; a value of one is on.
UPSI-0 First byte (leftmost)
UPSI-1 Second byte
UPSI-2 Third byte
⋮
UPSI-7 Eighth byte (rightmost)
SYSTEM-SHUTDOWN is an internal switch that is set to ON status when the system operator causes the system to be in a shutdown-pending state or when the job is being canceled in a controlled manner. The associated ON or OFF condition-names can be referenced anywhere a condition-name is valid. Their status cannot be altered by the program.
Mnemonic-names and environment-names need not be unique. If you choose a mnemonic-name that is also an environment name, its definition as a mnemonic-name takes precedence over its definition as an environment-name for a given reference to such a name.
In the Procedure Division, the UPSI switch status is tested through the associated condition-name. Each condition-name is the equivalent of a level-88 item; the associated mnemonic-name, if specified, is considered the conditional variable and can be used for qualification.
Any names declared in a program's SPECIAL-NAMES paragraph can be referenced from any contained program.