Rational Developer for System z
COBOL for Windows, Version 7.5, Language Reference


SPECIAL-NAMES paragraph

The SPECIAL-NAMES paragraph:

The clauses in the SPECIAL-NAMES paragraph can appear in any order.

Format
Read syntax diagramSkip visual syntax diagram>>-SPECIAL-NAMES.----------------------------------------------->
 
   .----------------------------------------------------------------------.  
   V                                                                      |  
>----+------------------------------------------------------------------+-+-->
     +-environment-name-1--+----+--mnemonic-name-1----------------------+    
     |                     '-IS-'                                       |    
     '-environment-name-2--+-+----+--mnemonic-name-2--+-------------+-+-'    
                           | '-IS-'                   '-| entry 1 |-' |      
                           '-| entry 1 |------------------------------'      
 
>--+-------------------------------------------------------------------------+-->
   | .---------------------------------------------------------------------. |  
   | V                                                                     | |  
   '---ALPHABET-- alphabet-name-1--+----+--+-STANDARD-1------------------+-+-'  
                                   '-IS-'  +-STANDARD-2------------------+      
                                           +-NATIVE----------------------+      
                                           +-EBCDIC----------------------+      
                                           | .-------------------------. |      
                                           | V                         | |      
                                           '---literal-1--| phrase 1 |-+-'      
 
>--+----------------------------------------------------------------------+-->
   | .------------------------------------------------------------------. |  
   | V                                                                  | |  
   '---SYMBOLIC--+------------+--| symbolic |--+----------------------+-+-'  
                 '-CHARACTERS-'                '-IN-- alphabet-name-2-'      
 
>--+-----------------------------------------------------------------------------+-->
   | .-------------------------------------------------------------------------. |  
   | |                               .---------------------------------------. | |  
   | V                               V                                       | | |  
   '---CLASS-- class-name-1--+----+----literal-4--+------------------------+-+-+-'  
                             '-IS-'               '-+-THROUGH-+--literal-5-'        
                                                    '-THRU----'                     
 
>--+-------------------------------------------------------------------------------------+-->
   | .---------------------------------------------------------------------------------. |  
   | V                                                                                 | |  
   '---CURRENCY--+------+--+----+--literal-6--+--------------------------------------+-+-'  
                 '-SIGN-'  '-IS-'             '-+------+--PICTURE--SYMBOL--literal-7-'      
                                                '-WITH-'                                    
 
>--+------------------------------+--+--------+----------------><
   '-DECIMAL-POINT--+----+--COMMA-'  |   (1)  |  
                    '-IS-'           '-.------'  
 

Notes:
  1. This separator period is optional when no clauses are selected. If you use any clauses, you must code the period after the last clause.

Fragments
Read syntax diagramSkip visual syntax diagramentry 1:
 
|--+-ON--+--------+--+----+--condition-1--+--------------------------------------+-+--|
   |     '-STATUS-'  '-IS-'               '-OFF--+--------+--+----+--condition-2-' |  
   |                                             '-STATUS-'  '-IS-'                |  
   '-OFF--+--------+--+----+--condition-2--+-------------------------------------+-'  
          '-STATUS-'  '-IS-'               '-ON--+--------+--+----+--condition-1-'    
                                                 '-STATUS-'  '-IS-'                   
 
phrase 1:
 
|--+------------------------+-----------------------------------|
   +-+-THROUGH-+--literal-2-+  
   | '-THRU----'            |  
   | .-----------------.    |  
   | V                 |    |  
   '---ALSO--literal-3-+----'  
 
symbolic:
 
   .--------------------------------------------------.  
   | .----------------------.           .-----------. |  
   V V                      |           V           | |  
|------symbolic-character-1-+--+-----+----integer-1-+-+---------|
                               +-ARE-+                   
                               '-IS--'                   
 

When the source code page is a multibyte code page, the following clauses cannot be specified:

environment-name-1
System devices or standard system actions taken by the compiler.

Valid specifications for environment-name-1 are shown in the following table.

Table 5. Meanings of environment names
environment name-1 Meaning Allowed in
SYSIN
SYSIPT
System logical input unit ACCEPT
SYSOUT
SYSLIST
SYSLST
System logical output unit DISPLAY
SYSPUNCH
SYSPCH
System punch device DISPLAY
CONSOLE Console ACCEPT and DISPLAY
C01 through C12 Skip to channel 1 through channel 12, respectively WRITE ADVANCING

With C01 through C12, one line is advanced.

CSP Suppress spacing WRITE ADVANCING
S01 through S05 Pocket select 1 through 5 on punch devices WRITE ADVANCING

With S01 through S05, one line is advanced.

AFP-5A Advanced Function Printing™ WRITE ADVANCING
environment-name-2
A 1-byte user programmable status indicator (UPSI) switch. Valid specifications for environment-name-2 are UPSI-0 through UPSI-7.
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 will take precedence over its definition as an environment-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
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. A condition-name can be associated with the on status or off status of each UPSI switch specified.

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.

Condition-names specified in the SPECIAL-NAMES paragraph of a containing program can be referenced in any contained program.


Terms of use | Feedback

Copyright IBM Corporation 1996, 2008.
This information center is powered by Eclipse technology. (http://www.eclipse.org)