Configuration Section [ Micro Focus COBOL Language Reference ] MPE/iX 5.0 Documentation
Micro Focus COBOL Language Reference
Configuration Section
The Configuration Section is located in the Environment Division of a
source program. The Configuration Section deals with the characteristics
of the source computer and the object computer. This section also
provides a means for specifying the currency sign, choosing the decimal
point, 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.
For ANS85 and OSVS only: The Configuration Section is optional in the
Environment Division of a COBOL source program.
For MF only: The CONFIGURATION SECTION header is optional only if it
is the first statement in the program.
For ANS85 only: The Configuration Section must not be stated in a
program which is directly or indirectly contained within another program.
For ANS85 only: The entries explicitly or implicitly stated in the
Configuration Section of a program which contains other programs apply to
each contained program.
General Format
The Source-Computer Paragraph
Function.
The SOURCE-COMPUTER paragraph identifies the computer on which the
program is to be compiled. It is optional. (ANS85 and OSVS)
General Format.
Syntax Rules.
1. Source-computer-name must be one COBOL word defined by the user.
2. For OSVS and ANS85 only: The SOURCE-COMPUTER paragraph can
consist of only the SOURCE-COMPUTER header
General Rules.
1. The source-computer-name provides a means for identifying
equipment configuration, in which case the computer-name and its
implied configuration are specified by the user. The
SOURCE-COMPUTER paragraph is documentary only.
2. The WITH DEBUGGINGMODEphrase is used to enable debugging code, in
accordance with Standard ANSI COBOL Debug. (See the section
Environment Division in COBOL Debug in the chapter Debug Module in
your Language Reference - Additional Topics.)
The Object-Computer Paragraph
Function.
The OBJECT-COMPUTER paragraph identifies the computer on which the
program is to be executed. It is optional. (ANS85 and OSVS)
For ANS85 only: The MEMORY SIZE clause and the SEGMENT-LIMIT clause are
classed as obsolete elements in the ANSI'85 standard and is scheduled to
be deleted from the next full revision of the ANSI Standard.
For MF only: All dialects within this COBOL implementation support the
MEMORY SIZE clause for documentary purposes only. Refer to your COBOL
System Reference for details on using the FLAGSTD directive to detect
occurrences of this syntax.
For XOPEN only: Although they are a part of the standard COBOL
definition, the Memory Size clause and SEGMENT-LIMIT clause are
explicitly excluded from the X/Open COBOL language definitions and should
not be used in a conforming X/Open COBOL source program.
General Format.
Syntax Rules.
1. Object-computer-name must be one COBOL word defined by the user.
2. For ANS85 and OSVS only: The OBJECT-COMPUTER paragraph can
consist of only the OBJECT-COMPUTER header.
General Rules.
1. The computer-name provides a means for identifying equipment
configuration, in which case the computer-name and its implied
configurations are specified by the user. The configuration
definition contains specific information concerning the memory
size. The computer-name and the MEMORY SIZEclause are documentary
only.
2. If the PROGRAM COLLATING SEQUENCE clause is not specified, the
NATIVE collating sequence is used. The appendix Character Sets
and Collating Sequences lists both the full ASCII and EBCDIC
collating sequences. Either can be chosen as the NATIVE
collating-sequence by use of the COBOL directive, NATIVE. (See
your COBOL System Reference for details.)
3. If the PROGRAM COLLATING SEQUENCEclause is specified, the program
collating sequence is the collating sequence associated with the
alphabet-name specified in that clause.
4. The program collating sequence established in the OBJECT-COMPUTER
paragraph is used to determine the truth value of any nonnumeric
comparisons:
a. explicitly specified in relation conditions (see the
section Relation Condition later in this chapter).
b. explicitly specified in condition-name conditions; see the
section Condition-Name Condition (Conditional Variable)
later in this chapter.
5. The PROGRAM COLLATING SEQUENCE clause is also applied to any
nonnumeric merge or sort keys unless the COLLATING SEQUENCE phrase
of the respective SORT or MERGE statement is specified.
6. The PROGRAM COLLATING SEQUENCE clause has no effect on the
ordering of indexed files.
7. The PROGRAM COLLATING SEQUENCE clause applies only to the program
in which it is specified.
8. The SEGMENT-LIMITclause is documentary only. (See the chapter
Segmentation in your Language Reference - Additional Topics.)
The Special-Names Paragraph
Function.
The SPECIAL-NAMES paragraph provides a means for specifying the currency
sign, choosing the decimal point, specifying symbolic-characters (ANS85),
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.
For MF only: You can select one of several pre-defined parameter
passing conventions. Enhancements to the CALLstatement and the PROCEDURE
DIVISION header allow these parameter passing conventions to be used in
inter-program communication.
Examples:.
An example of using the CRT status key fields is provided in the Examples
chapter in your Additional Topics.
General Format.
Boxed brackets are (ANS85)
Directives.
1. In addition to system directives which provide flagging and modify
the reserved word list, the following directives may impact either
the syntax or semantics described in this section. See yourCOBOL
System Reference for details.
* ALPHASTART - determines whether valid numeric literals used
in the ALPHABET clause can begin with 0 or with 1.
* CHARSET - impacts which alphabet is considered the native
character set.
* NATIVE - impacts which alphabet is considered the native
character set.
* SYMBSTART - determines whether valid numeric literals used
in the SYMBOLIC CHARACTERS clause can begin with 0 or with
1.
Syntax Rules.
1. Mnemonic-names can be any COBOL user-defined word. At least one
constituent character must be alphabetic.
2. Function-name refers to a system device or function used by your
COBOL system.
For OSVS, VSC2 and MF only: Function-name refers to an
externalswitchif its name is one of UPSI-0 through UPSI-7
3. If function-name references an external switch or the SWITCH-n or
SWITCH (MF)
option is used, the associated mnemonic-name cannot be specified
anywhere except in the SET statement (ANS85). At least one
condition-name should be associated with it. No condition-name
is required.(ANS85)
4. If function-name does not reference an external switch, the
associated mnemonic-name can be specified only in the ACCEPT,
DISPLAY, SEND or WRITE statements. A condition-name cannot be
associated with such an implementor-name.
5. The literals specified in the literal phrase of the alphabet-
name-1 clause:
a. if numeric, must be unsigned integers and must have a value
within the range of one (1) through the maximum number of
characters in the native character set.
The lowest valid values for numeric literals in the
ALPHABETclause are sensitive to the ALPHASTART
directive. See your COBOL System Reference for details.
b. if nonnumeric and associated with a THROUGH or ALSO phrase,
must each be one character in length.
c. For MF and VSC2 only: cannot be specified as
floating-point literals or DBCS literals.
6. If the literal phrase of the alphabet-name-1 clause is specified,
a given character must not be specified more than once in an
alphabet-name clause.
7. The words THRU and THROUGH are equivalent.
8. For MF only: The words STANDARD-1 and ASCII are equivalent.
9. For ANS85 only: The reserved word IS is never required in the
SPECIAL-NAMES paragraph.
10. For ANS85 only: The literals specified in the literal-4 phrase :
a. if numeric, must be unsigned integers and must have a value
within the range of one (1) through the maximum number of
characters in the native character set.
b. if nonnumeric and associated with a THROUGH phrase, must
each be one character in length.
c. For MF and VSC2 only: cannot be specified as
floating-point or DBCS literals.
11. For ANS85 only: Literal-1,...literal-5 must not specify a
symbolic-character figurative constant.
12. For ANS85 only: The same symbolic-character-1 must appear only
once in a SYMBOLIC CHARACTERSclause.
13. For ANS85 only: The relationship between each symbolic-character-1
and the corresponding integer-1 is by position in the SYMBOLIC
CHARACTERS clause. The first symbolic-character-1 is paired with
the first integer-1, the second symbolic- character-1 is paired
with the second integer-1; and so on throughout the SYMBOLIC
CHARACTERS clause; the division into IS or ARE phrases is
documentary only.
The lowest valid value for integer-1 is sensitive to the
SYMBSTARTdirective.
See your COBOL System Reference for details.
14. For ANS85 only: There must be a one-to-one correspondence between
occurrences of symbolic-character-1 and occurrences of integer-1,
both within each IS or ARE phrase and within the entire SYMBOLIC
CHARACTERS clause.
15. For ANS85 only: The ordinal position specified by integer-1 must
exist in the native character set. If the IN phrase is specified,
the ordinal position must exist in the character set named by
alphabet-name-2; alphabet-name-2 must be described in an ALPHABET
clause.
16. Literal-6 must not be a figurative constant.
17. For OSVS and VSC2 only: The clauses in the SPECIAL-NAMES
paragraph can appear in any order.
18. For MF only: Integer-2 must be an unsigned integer in the range
0 to 65535.
19. For MF only: Data-name-1 of the CURSOR IS
clause must be declared in the Working-Storage section of the
program.
20. For MF only: The CRT STATUS clause specifies a data item into
which a status value is moved after each Format 4 or 5 ACCEPT
statement. In some environments, it can be defined only in the
first 64K of Working-Storage.
21. For MF only: Data-name-2 must be described in the
Working-Storage section and must be three bytes long.
22. For MF only: The CURSOR IS clause specifies the data item to
contain the cursor address as used by the ACCEPT statement.
General Rules.
1. Externalswitchesare set at run time by the operator, and the
setting can be determined in the program by testing the associated
condition-names.
2. If mnemonic-name is associated with an external switch, the status
of that switch can be altered by execution of a Format 1 SET
statement (see the section The SET Statement in this chapter).
3. The alphabet-name-1 clause provides a means for relating a name to
a specified character code set and/or collating sequence. When
alphabet-name-1 is referenced in the PROGRAM COLLATING SEQUENCE
clause (see the section The OBJECT-COMPUTER Paragraph) or the
COLLATING SEQUENCE phrase of a SORT or MERGE statement (see the
sections The SORT Statement or The MERGE Statement), the
alphabet-name-1 clause specifies a collating sequence. When
alphabet-name-1 is referenced in a CODE-SET clause in a file
description entry (see the section The File Description-1 -
Complete Entry Skeleton), the alphabet-name clause specifies a
character code set.
a. If the STANDARD-1 or ASCII(MF) 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.
For ANS85 only: 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.
b. If the NATIVE phrase is specified, the native character
code set or native collating sequence is used. The native
code set is ASCII, as defined in ANSI publication
X3.4-1968.
The native collating sequence is either ASCII or EBCDIC, as
specified by the COBOL directive, NATIVE. (See your COBOL
System Reference for details.) 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.
c. For MF and VSC2 only: If the EBCDIC phrase is specified,
the character code set or collating sequence identified is
EBCDIC.
d. If the literal phrase is specified, alphabet-name-1 cannot
be referenced in a CODE-SET clause (see the section The
CODE-SET Clause). The character code set and/or collating
sequence identified is that defined according to the
following rules:
i. The value of each literal specifies:
A. The ordinal number of a character within the
native character set, if the literal is
numeric. This value must not exceed the
value which represents the number of
characters in the native character set.
B. The actual character within the native
character set, if the literal is nonnumeric.
If the value of the nonnumeric literal
contains multiple characters, each character
in the literal, starting with the leftmost
character, is assigned successive ascending
positions in the collating sequence being
specified.
ii. The order in which the literals appear in the
ALPHABETclause specifies, in ascending sequence, the
ordinal number of the character within the collating
sequence being specified.
iii. Any characters within the native collating sequence
which are not explicitly specified in the literal
phrase, assume a position, in the collating sequence
being specified, greater than any of the explicitly
specified characters. The relative order within the
set of these unspecified characters is unchanged
from the native collating sequence.
iv. If a character code-set is being specified, for each
character within the native character set that is
not specified by the literal-1 phrase, the
implementor defines the ordinal number within the
character code-set being specified.
v. If the THROUGH phrase is specified, the set of
contiguous characters in the native character set,
beginning with the character specified by the value
of literal-1, and ending with the character
specified by the value of literal-2, is assigned a
successive ascending position in the collating
sequence being specified. In addition, the set of
contiguous characters specified by a given THROUGH
phrase can specify characters of the native
character set in either ascending or descending
sequence.
vi. If the ALSO phrase is specified, the characters of
the native character set specified by the value of
literal-1, and literal-3 are assigned to the same
position in the collating sequence being specified
, or in the character code set that is used to
represent the data. (ANS85)
4. The character that has the highest ordinal position in the program
collating sequence is associated with the figurative constant
HIGH-VALUE
except when this figurative constant is specified as a literal in
the SPECIAL-NAMES paragraph.(ANS85)
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
5. The character that has the lowest ordinal position in the program
collating sequence is associated with the figurative constant
LOW-VALUE
except when this figurative constant is specified as a literal in
the SPECIAL-NAMES paragraph. (ANS85)
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.
6. For MF, OSVS, and VSC2 only: Floating-point literals cannot be
used in a user-specified collating sequence.
7. For ANS85 only: When specified as literals in the SPECIAL-NAMES
paragraph, the figurative constants HIGH-VALUEand LOW-VALUEare
associated with those characters having the highest and lowest
positions, respectively, in the native collating sequence.
8. For ANS85 only: The SYMBOLIC CHARACTERS clause is used to define
user- defined words that can be used like figurative constants.
If the IN phrase is not specified, symbolic-character-1 represents
the character whose ordinal position in the native character set
is specified by integer-1. If the IN phrase is specified,
integer-1 specifies the ordinal position of the character that is
represented in the character set named by alphabet-name-2.
9. For ANS85 only: The internal representation of
symbolic-character-1 is the internal representation of the
character that is represented in the native character set.
10. Literal-6, which appears in the CURRENCY SIGN IS literal clause,
is used in the PICTURE clause to represent the currency symbol.
The literal is limited to a single character and must not be one
of the following characters:
* digits 0 thru 9;
* uppercase alphabetic characters A, B, C, D, L, P, R, S, V,
X, Z, or the space;
For MF only: C and R are allowed
For ANS85 only: L is allowed
For OSVS, MF, VSC2 only: E cannot be used in programs that
include external floating-point data items
For VSC2 and MF only: G cannot be used in programs with
DBCS data items or literals
For ANS85 only: lowercase alphabetic characters a through
z,
For MF only: (except e, f, g, h, i, j, k, m, n, o, q, t,
u, w, y);
* special characters *, +, -, ", ., ;, (, ), / or =.
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.
11. The DECIMAL-POINT IS COMMAclause means that the function of comma
and period are exchanged in the character-string of the PICTURE
clause and in numeric literals.
12. For MF only: If the NUMERIC SIGNclause is specified, the
default for signed numeric items is for the sign to be stored as a
trailing separate character.
13. If function-name does not reference an external switch, it can be
selected from the following list:
MPE/iX 5.0 Documentation