The Special-Names paragraph provides a means for specifying the currency string and the currency symbol, choosing the decimal point,
specifying
symbolic-characters,
relating implementor-names to user-specified mnemonic-names, relating alphabet-names to character sets or collating sequences, and relating class-names to sets of characters.
You can select one of several pre-defined
parameter passing conventions. Enhancements to the CALL statement and the
PROCEDURE DIVISION header allow these parameter passing conventions to be used
in inter-program communication.
Function-name refers to an external switch if its name is one
of UPSI-0 through UPSI-7.
or the
SWITCH-n is used,
the associated mnemonic-name cannot be specified anywhere
except in the
SET statement
. At least one condition-name should be associated with it.
No condition-name is required.
The lowest valid values for numeric literals in the ALPHABET clause are sensitive to the ALPHASTART Compiler directive.
The lowest valid value for integer-1 is sensitive to the SYMBSTART Compiler directive.
or national
literal
.
If literal-6 is of class
national, the associated currency symbol may be used only to define a
numeric-edited item with usage national.
or Format 5
ACCEPT statement. In some
environments, it can be defined only in the first 64K of working storage.
or ASCII
phrase is specified, the character code set or collating sequence identified is the American Standard Code for Information Interchange, as defined in American National Standard X3.4-1968.
If the STANDARD-2 phrase is
specified, the character code set identified is the International Reference
Version of the ISO 7-bit code, as defined in International Standard 646, 7-bit
Coded Character Set for Information Processing Interchange.
If the EBCDIC phrase is
specified, the character code set or collating sequence identified is EBCDIC.
If the NATIVE phrase is specified, the native character code set or native collating sequence is used. The native collating sequence is either ASCII or EBCDIC, as specified by the NATIVE Compiler directive.)
See the appendix Character Sets and Collating Sequences for details of the ASCII code set and the ASCII and EBCDIC collating sequences and their correspondence.
, or in
the character code set that is used to represent the data
except when this
figurative constant is specified as a literal in the Special-Names
paragraph
.
If more than one character has the highest position in the program collating sequence, the last character specified is associated with the figurative constant HIGH-VALUE.
except when this
figurative constant is specified as a literal in the Special-Names
paragraph
.
If more than one character has the lowest position in the program collating sequence, the first character specified is associated with the figurative constant LOW-VALUE.
Literal-6 represents the value of the currency string.
If the CURRENCY SIGN
clause is specified with the PICTURE SYMBOL phrase, literal-7 is used as the
currency symbol.
If the CURRENCY SIGN clause is specified without the PICTURE SYMBOL phrase, literal-6 is used as the currency symbol.
If the currency symbol is a lower-case letter, it is treated as its upper-case equivalent.
If this clause is not present, only the currency sign defined in the COBOL character set is used in the PICTURE clause. See the section Character Set in the chapter Concepts of the COBOL Language.
![]() |
Skip to vertical tabulation position (inserts ASCII X"0B" in the output record as appropriate) | WRITE ADVANCING statement |
![]() |
Printer | DISPLAY statement |
![]() |
Skip to new page (inserts ASCII X"0C" in the output record as appropriate) | WRITE ADVANCING statement |
![]() ![]() |
Command transfer | ACCEPT and DISPLAY statements |
![]() ![]() |
Command-line argument number | ACCEPT and DISPLAY statements |
![]() ![]() |
Command-line argument value | ACCEPT statement |
![]() ![]() |
Environment variable name | DISPLAY statement |
![]() ![]() |
Environment variable value | ACCEPT and DISPLAY statements |
![]() ![]() |
Standard error device | DISPLAY statement |
The following table reflects the
support for function names offered by OS/VS COBOL, VS COBOL II and SAA in this
COBOL system.
OSVS | VSC2 Rel (2) | COBOL/370 or VSC2 Rel (3)/(4) | SAA L1 | |
---|---|---|---|---|
SYSIN | y | y | y | y |
SYSIPT | U | U | y | |
SYSOUT | y | y | y | y |
SYSLIST | y | |||
SYSLST | U | U | y | |
SYSPCH | U | U | y | |
SYSPUNCH | U | y | y | |
CONSOLE | y | y | y | y |
C01 | y | y | y | y |
C02 | y | y | y | |
C03 | y | y | y | |
C04 | y | y | y | |
C05 | y | y | y | |
C06 | y | y | y | |
C07 | y | y | y | |
C08 | y | y | y | |
C09 | y | y | y | |
C10 | y | y | y | |
C11 | y | y | y | |
C12 | y | y | y | |
S01 | y | y | y | |
S02 | y | y | y | |
S03 | U | y | ||
S04 | U | y | ||
S05 | U | y | ||
CSP | y | y | y | y |
1 char rw literal | y | |||
AFP-5A | y |
y | Documented and accepted by mainframe compilers and the COBOL system. |
U | Undocumented but accepted by mainframe compiler. |
If the THROUGH phrase is specified, the contiguous characters in the native character set beginning with the character specified by the value of literal-4, and ending with the character specified by the value of literal-5, are included in the set of characters identified by class-name-1. Additionally, the contiguous characters specified by a given THROUGH phrase can specify characters of the native character set in ascending or descending sequence.
If the CRT STATUS clause is specified in the
Special-Names paragraph, every Format 4 or 5 ACCEPT statement (as described
later in this chapter) places a value into data-name-2 to indicate the outcome
of the ACCEPT operation. Data-name-2 consists of status keys which are set to
indicate possible conditions resulting from the completion of the operation.
They are described below.
CRT Status Key 1: The first byte of data-name-1 is CRT Status Key 1. It should be described as PICTURE 9 USAGE DISPLAY. It indicates the condition that caused the termination of the ACCEPT operation. The possible values are:
"0" | indicates a terminator key or auto-skip out of the final field |
"1" | indicates a user-defined function key |
"2" | indicates a COBOL system-defined function key |
"9" | indicates an error |
A terminator key is a key whose purpose is terminating ACCEPT operations (for example, Enter). A particular configuration option causes the field-tab key, when used in the final field of an ACCEPT, to act as a terminator key. Defining function keys is also a configuration option.
A termination that returns a value of "0" is called a normal termination.
If the ACCEPT statement contains an ON EXCEPTION phrase, any value in CRT Status Key 1, except " 0", causes the execution of the imperative statement in that phrase.
CRT Status Key 2: The second byte of data-name-1 is CRT Status Key 2 and contains a code giving further details of the condition that terminated the ACCEPT operation. Its format and possible values depend on the value in CRT Status Key 1, as shown in the following table.
Key 1 | Key 2 | Meaning | |
---|---|---|---|
Format | Value | ||
0 | PIC 9 DISPLAY | 0 | The operator pressed a terminator key |
0 | PIC 9 DISPLAY | 1 | Auto-skip out of the last field |
1 | PIC 99 COMP | 0-127 | The function key number |
2 | PIC 99 COMP | 0-26 | The function key number |
9 | PIC 99 COMP | 0 | No items fall within the screen |
See your COBOL system documentation on screen handling and user interfaces for an explanation of function key numbers.
CRT Status Key 3: The third byte of data-name-1 is CRT Status Key 3 and should be described as PICTURE 99 COMP-X or as PICTURE 99 COMP (with the NOIBMCOMP directive specified). If CRT Status Key 1 and CRT Status Key 2 are zero, then CRT Status Key 3 contains the raw keyboard code for the key that terminated the ACCEPT operation. Otherwise, the contents of CRT Status Key 3 are undefined.
Where a sequence of keystrokes rather than a single key has been configured to perform a single function, only the code for the first keystroke is returned.