TypeCobol
TypeCobol copied to clipboard
Configuration section
According to IBM Enterprise Cobol 5.1 for zOS - Language Reference p109, the entries of a program configuration section must be in the following order : source-computer-paragraph, object-computer-paragraph, special-names-paragraph, repository-paragraph.
However, the following production code is valid:
CONFIGURATION SECTION.
SPECIAL-NAMES. DECIMAL-POINT IS COMMA.
SOURCE-COMPUTER. IBM-3033.
REQUEST FOR COMMENTS 1 What are the limits imposed by the compiler regarding the order of entries of a program configuration section ?
REQUEST FOR COMMENTS 2 What does the IBM compiler say if there is more than 1 occurence of the configuration section entries (source-computer-paragraph, object-computer-paragraph, special-names-paragraph, repository-paragraph) ?
For example:
CONFIGURATION SECTION.
SOURCE-COMPUTER. IBM-3033.
OBJECT-COMPUTER. IBM-3033.
SOURCE-COMPUTER. IBM-3033.
In CONFIGURATION SECTION the entries SOURCE-COMPUTER, OBJECT-COMPUTER , SPECIAL-NAMES and REPOSITORY are optional and can be used in any order. Duplicates are not allowed (IGYDS1192-E error on z/OS).
Thanks.
TODO prevent duplicates in CONFIGURATION SECTION
.