SPECIAL-NAMES Paragraph

The SPECIAL-NAMES paragraph:
  • Relates IBM-specified environment-names to user-defined mnemonic-names.
  • Relates alphabet-names to character sets or collating sequences.
  • Relates class names to sets of characters.
  • Specifies a single or multiple character currency string and a substitute character for the currency sign.
  • Specifies that the functions of the comma and decimal point are to be interchanged in PICTURE clauses and numeric literals.
IBM Extension
IBM Extension
  • Relates locale object names and their associated library to user-defined mnemonic-names.
  • Specifies the default formats for a date or time data type.
  • Specifies that ACCEPT or DISPLAY statements are treated as extended ACCEPT or DISPLAY statements, or as requests to the dynamic screen manager session services APIs.
  • Specifies additional functions associated with ACCEPT statements.
  • Specifies the type of linkage used for a CALL or CANCEL of a program, and for setting a procedure-pointer with the SET statement.
End of IBM Extension
End of IBM Extension
Read syntax diagramSkip visual syntax diagram
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-'                

Notes:
  1. IBM® Extension
  2. Subsequent repetitions are IBM Extensions.
  3. The separator period must be used if any of the optional clauses are selected. Clauses can be entered in any order.
environment-name-1
System devices or standard system actions taken by the compiler.

Table 1 shows the actions that are associated with mnemonic-names for environment-name-1.

Table 1. Choices of Environment-Name-1 and Action Taken
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).
environment-name-2
Environment-name-2 can be defined as UPSI-0 through UPSI-7 or as SYSTEM-SHUTDOWN; UPSI stands for a one-byte User Programmable Status Indicator switch.

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.

Each switch represents one byte from the 8-character SWS parameter of the control language CHGJOB, SBMJOB, JOB, and JOBD commands as follows:

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-name-1, mnemonic-name-2
Mnemonic-name-1 and mnemonic-name-2 follow the rules of formation for user-defined names. Mnemonic-name-1 can be used in ACCEPT, DISPLAY, and WRITE statements. Mnemonic-name-2 can be referenced only in the SET statement. Mnemonic-name-2 can qualify condition-1 or condition-2 names.

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.

ON STATUS IS, OFF STATUS IS
UPSI switches process special conditions within a program, such as year-beginning or year-ending processing. For example, at the beginning of the Procedure Division, an UPSI switch can be tested; if it is ON, the special branch is taken. (See Switch-Status Condition.)
condition-1, condition-2
If environment-name-2 references an external switch, the on/off status of that switch can be associated with condition-names, such as condition-1, condition-2. The status of the switch can be obtained through the condition-names. Condition-names follow the rules for user-defined names. At least one character must be alphabetic. The value associated with the condition-name is considered to be alphanumeric.

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.