Invokes the VSI COBOL compiler to compile a COBOL source program on OpenVMS. See the COBOL User Manual and the COBOL Reference Manual for additional information. Format - COBOL [/command-qualifier]... {file-spec [/file-qualifier]... }...
1 – release_notes
The release notes for the latest installed version of VSI COBOL are located in SYS$HELP:COBOLvvv.RELEASE_NOTES. (Where vvv = the installed version number) These release notes contain information regarding restrictions, known problems, and differences between HP COBOL on OpenVMS VAX and OpenVMS Alpha, and VSI COBOL on OpenVMS I64.
2 – miscellaneous_topics
2.1 – literals
A literal is a character-string whose value is specified by: 1) the ordered set of characters it contains, or 2) a reserved word that is a figurative constant. Every literal belongs to one of two types: numeric or nonnumeric.
2.1.1 – figurative_constants
Figurative constants name and refer to specific constant values generated by the compiler. The singular and plural forms of figurative constants are equivalent and interchangeable. The figurative constants supported by VSI COBOL are ZERO, ZEROS, ZEROES, SPACE, SPACES, HIGH-VALUE, HIGH-VALUES, LOW-VALUE, LOW-VALUES, QUOTE, QUOTES, ALL literal, and symbolic-character.
2.1.2 – hexadecimal_literals
A hexadecimal literal (a HP extension to nonnumeric literals) is a character string of 2 to 256 hexadecimal digits. It is delimited on the left by the separator 'X' (or 'x') immediately followed by a quotation mark (") or apostrophe ('); on the right it is delimited by a matching quotation mark or apostrophe. The character string consists only of pairs of hexadecimal digits representing a value ranging from 00 to FF; hence, only the characters '0' through '9', 'A' through 'F', and 'a' through 'f' are valid. The value of a hexadecimal literal is the composite value of the paired hexadecimal representations. The compiler truncates hexadecimal literals to a maximum of 128 hexadecimal representations (pairs of hexadecimal digits). A hexadecimal literal can be used interchangeably wherever a nonnumeric literal can appear in VSI COBOL syntax. (Note that hexadecimal literals cannot be used as operands in arithmetic statements.)
2.1.3 – nonnumeric_literals
A nonnumeric literal is a character-string of 0 to 256 characters. It is delimited on both ends by quotation marks (") or apostrophes ('). A nonnumeric literal delimited by apostrophes is treated in the same manner as a nonnumeric literal delimited by quotation marks. The value of a nonnumeric literal is the value of the characters in the character-string. It does not include the quotation marks (or apostrophes) that delimit the character-string. All other punctuation characters in the nonnumeric literal are part of its value. The compiler truncates nonnumeric literals to a maximum of 256 characters.
2.1.4 – numeric_literals
A numeric literal is a character-string of 1 to 33 characters selected from the digits 0 through 9, the plus sign, the minus sign, and the decimal point. The value of a numeric literal is the algebraic quantity represented by the characters in the literal. Its size equals the number of digits in the character-string.
2.1.5 – floating_point_literals
A floating point literal is a character-string whose value is specified by 4 to 37 characters selected from the digits 0 to 9, the plus sign, the minus sign, the decimal point and the letter E (upper or lower case). The value of a floating point literal is the algebraic quantity represented by the characters in the literal that precede the "E" multiplied by ten raised to the power of the algebraic quantity represented by the characters in the literal following the "E".
2.2 – meta-language
The COBOL meta-language describes COBOL syntax. Meta-language elements appear in formats, but they are not part of a source program.
2.2.1 – braces
Braces ({}) indicate that you must select one (but no more than one) of the enclosed entries. If one of the entries contains only reserved words that are not key words, that entry is the default option when no other entry is selected.
2.2.2 – brackets
Brackets ([]) enclose an optional part of a general format. When they enclose vertically stacked entries, brackets indicate that you can select one (but no more than one) of the enclosed entries.
2.2.3 – choice_indicators
If choice indicators, {| |}, enclose part of a general format, you must select one or more of the enclosed entries (in any order). However, no entry can be used more than once.
2.2.4 – ellipsis
In general formats, the ellipsis (...) allows repetition of a part of the format. To determine which part of the format can be repeated: 1) Find the ellipsis. 2) Scanning to the left, find the first right delimiter, either ] or }. 3) Continuing to the left, find its logically matching left delimiter, either [ or {. The ellipsis applies to the part of the format between the matched pair of delimiters.
2.2.5 – lowercase_words
Lowercase words are generic terms. They indicate entries the programmer must provide. Lowercase words can represent COBOL words, literals, PICTURE character-strings, comment-entries, function arguments, or complete syntactical entries.
2.2.6 – special-character_words
The following special-character words are not underlined in general formats but are required where they appear: colon (:) single (=) and double (==) equal signs period (.) left (() or right ()) parenthesis plus sign (+) left (<) or right (>) angle bracket minus sign (-) single (*) and double (**) asterisk slash (/)
2.2.7 – uppercase_words
Underlined uppercase words are key words. A key word is required and must be spelled correctly when it is included in the source program. Uppercase words not underlined are optional. They serve only to improve the source program's readability.
2.3 – program_components
A COBOL program is made up of a number of different components. These are listed alphabetically.
2.3.1 – clause
A subdivision of a COBOL sentence; an ordered set of consecutive COBOL character-strings that specifies an attribute of an entry.
2.3.2 – contained_program
A COBOL source program that is directly or indirectly contained in another COBOL source program.
2.3.3 – division
A division is a collection of one or more sections or paragraphs. Each of the four divisions consists of a division header and division body. A division header identifies and marks the beginning of a division. It is a specific combination of reserved words followed by a separator period.
2.3.4 – end_of_program
The end of a COBOL source program is indicated either by the end of that program's Procedure Division or by the END PROGRAM header. Format - END PROGRAM program-name program-name must contain 1 to 31 characters and follow the rules for user-defined words. It must be identical to a program-name declared in a preceding PROGRAM-ID paragraph.
2.3.5 – paragraph
A paragraph consists of a paragraph header or paragraph-name (depending on the division) followed by zero, one, or more entries (or sentences). A paragraph header is a reserved word followed by a separator period. Paragraph headers identify paragraphs in the Identification and Environment Divisions. A paragraph-name is a user-defined word followed by a separator period. Paragraph-names identify Procedure Division paragraphs.
2.3.6 – phrase
An ordered set of one or more consecutive COBOL character-strings that forms part of a clause or procedural statement.
2.3.7 – program_organization
identification-division [ environment-division ] [ data-division ] [ procedure-division ] [ source-program ] ... [ end-program-header ]
2.3.8 – section
A section is a set of zero, one, or more paragraphs or entries (called a section body) that follows a section header and related section body. A section header identifies and marks the beginning of a section in the Environment, Data, and Procedure Divisions. In the Environment and Data Divisions, a section header is a specific combination of reserved words followed by a separator period. In the Procedure Division, a section header is a user-defined word followed by the word SECTION (and an optional segment-number). A separator period always follows a section header.
2.3.9 – sentence
A sequence of one or more statements, the last of which ends with a separator period.
2.3.10 – separators
A separator delimits character-strings. It can be one character or two contiguous characters. The following characters are recognized as separators: space ( ) quotation mark (") comma (,) apostrophe (') semicolon (;) pseudo-text delimiter (==) period (.) horizontal tab colon (:) left (() or right ()) parenthesis
2.3.11 – source-program
represents a contained (nested) COBOL source program. It begins with the Identification Division, a COPY statement or a REPLACE statement. It ends with the END PROGRAM header or the end of the Procedure Division.
2.3.12 – statement
In the Procedure Division, a syntactically valid combination of words and symbols that begins with a verb.
2.3.13 – word
A character-string of not more than 31 characters that forms one of the following: function-name A COBOL word that names a mechanism provided to determine the value of a function. reserved word A COBOL word specified in the list of words that can appear in a COBOL program. A reserved word cannot appear in a program as a user-defined word or system-name. system-name A COBOL word that has already been defined by the implementor to refer to the program's operating environment. text-word A character (or a sequence of characters) in a COBOL library, source program, pseudo-text, or dictionary that is subject to certain restrictions. user-defined word A COBOL word that must appear in the source program to satisfy the format of a clause or statement. verb A word that causes the compiler or object program to take action.
2.4 – source_reference_format
The VSI COBOL compiler recognizes two source program formats: ANSI and terminal.
2.4.1 – ANSI format
ANSI format conforms to the American National Standard COBOL reference format. It describes COBOL programs in terms of character positions on an input line. A source program line has 80 character positions: Margin L C A B R | | | | | +--------------------------------------------------+ column | 1 - 6 | 7 | 8 - 11 | 12 - 72 | 73 - 80 | +--------------------------------------------------+ | | | | | | | Area A Area B Identification Area | | | Indicator Area | Sequence Number Area The compiler expects ANSI format only when the command line includes the /ANSI_FORMAT qualifier.
2.4.2 – terminal_format
The VSI COBOL terminal format shortens program preparation time and reduces storage space for source programs. There is no sequence number or identification area, and the indicator area is combined with Area A.
2.5 – special_registers
Compiler-generated storage areas primarily used to store information relating to specific COBOL features. There are four types: (1) Report Writer, (2) Record Management, (3) Database Management, and (4) X/Open related.
2.5.1 – 1 DB-CONDITION
A database special register whose value indicates either a successful condition or an exception condition.
2.5.2 – 2 DB-CURRENT-RECORD-ID
A database special register containing the subschema user ID number (UID) of the record type of the current record of the run unit. It contains zero if there is no current record of the run unit.
2.5.3 – 3 DB-CURRENT-RECORD-NAME
A database special register containing the name of the record type of the current record of the run unit. It contains spaces if there is no current record of the run unit.
2.5.4 – 4 DB-KEY
A database special register that holds the dbkey of the record accessed by the last FETCH, STORE or FIND statement. This special register can be used to fine tune storage strategies in the database.
2.5.5 – 5 DB-UWA
A database special register containing the user work area (UWA). The UWA is the record delivery area that is used by the DBCS to make data items available to your program.
2.5.6 – 6 LINAGE-COUNTER
A special register whose value points to the current position in the page body.
2.5.7 – 7 LINE-COUNTER
A Report Writer special register whose value points to the current line in the current page.
2.5.8 – 8 PAGE-COUNTER
A Report Writer special register whose value points to the current page in a report.
2.5.9 – 9 RMS-CURRENT-FILENAME
A Record Management Services (RMS) exception condition register containing the name of the file causing the exception condition. This register is implicitly associated with the file most recently operated on by an I/O statement.
2.5.10 – 10 RMS-CURRENT-STS
A Record Management Services (RMS) exception condition register. It contains the primary RMS status value of an I-O operation. This register is implicitly associated with the file most recently operated on by an I/O statement. RMS-CURRENT-STV is the secondary value.
2.5.11 – 11 RMS-CURRENT-STV
A Record Management Services (RMS) exception condition register. It contains the secondary RMS status value of an I-O operation. This register is implicitly associated with the file most recently operated on by an I/O statement. RMS-CURRENT-STS is the primary value.
2.5.12 – 12 RMS-FILENAME
A Record Management Services (RMS) exception condition register containing the name of the file causing the exception condition. At any point in time, this register must be explicitly associated with a particular file.
2.5.13 – 13 RMS-STS
A Record Management Services (RMS) exception condition register. It contains the primary RMS status value of an I-O operation. At any point in time, this register must be explicitly associated with a particular file. RMS-STV is the secondary value.
2.5.14 – 14 RMS-STV
A Record Management Services (RMS) exception condition register. It contains the secondary RMS status value of an I-O operation. At any point in time, this register must be explicitly associated with a particular file. RMS-STS is the primary value.
2.5.15 – 15 RETURN-CODE
A special register that may be used to set a return value for a calling program or to retreive the value returned from a called program.
3 – IDENTIFICATION_DIVISION
The IDENTIFICATION DIVISION marks the beginning of a COBOL program. It also identifies a program and its source listing. Format - IDENTIFICATION DIVISION. PROGRAM-ID. program-name [IS {| INITIAL |} PROGRAM ][WITH IDENT id-str] . [ {| COMMON |} ] [ AUTHOR. [comment-entry] ... ] [ INSTALLATION. [comment-entry] ... ] [ DATE-WRITTEN. [comment-entry] ... ] [ DATE-COMPILED. [comment-entry] ... ] [ SECURITY. [comment-entry] ... ] [ OPTIONS. [ARITHMETIC {NATIVE|STANDARD}.] ]
3.1 – PROGRAM-ID
The PROGRAM-ID paragraph identifies a program. Format - PROGRAM-ID. program-name [IS {| INITIAL |} PROGRAM ][WITH IDENT id-str]. [ {| COMMON |} ]
3.1.1 – program-name
identifies a COBOL source program.
3.1.2 – id-str
identifies a literal string to be included in the object module generated by the compilation, for identification.
3.2 – AUTHOR
The AUTHOR paragraph is for documentation only. Format - AUTHOR. [comment-entry] ...
3.2.1 – comment-entry
Comment-entry can consist of any combination of characters from the computer character set. Comment-entries can span several lines in Area B. However, they cannot be continued by using a hyphen in the indicator area. The end of comment-entry is the line before the next entry in Area A.
4 – ENVIRONMENT_DIVISION
The Environment Division describes the program's physical environment. It also specifies input-output control and describes special control techniques and hardware characteristics. Format - [ ENVIRONMENT DIVISION. [ CONFIGURATION SECTION. [ SOURCE-COMPUTER. [source-computer-entry] ] [ OBJECT-COMPUTER. [object-computer-entry] ] [ SPECIAL-NAMES. [special-names-entry] ] ] [ INPUT-OUTPUT SECTION. FILE-CONTROL. {file-control-entry} ... [ I-O-CONTROL. [input-output-control-entry] ] ] ]
4.1 – SOURCE-COMPUTER
The SOURCE-COMPUTER paragraph specifies the computer on which the source program is to be compiled. Format - SOURCE-COMPUTER. [ { Alpha } [WITH DEBUGGING MODE] . ] [ { I64 } [WITH DEBUGGING MODE] . ] [ { computer-type } ]
4.1.1 – computer-type
is a user-defined word that names the computer.
4.2 – OBJECT-COMPUTER
The OBJECT-COMPUTER paragraph describes the computer on which the program is to execute. Format - OBJECT-COMPUTER. [ { Alpha } [ { I64 } [ { computer-type } [ { WORDS } ] [ MEMORY SIZE integer { CHARACTERS } ] [ { MODULES } ] [ PROGRAM COLLATING SEQUENCE IS alphabet-name ] [ SEGMENT-LIMIT IS segment-number] . ]
4.2.1 – computer-type
is a user-defined word that names the computer.
4.2.2 – alphabet-name
is the name of a collating sequence defined in the ALPHABET clause of the SPECIAL-NAMES paragraph.
4.2.3 – segment-number
is an integer from 1 through 49.
4.3 – SPECIAL-NAMES
The SPECIAL-NAMES paragraph: (1) associates compiler features and OpenVMS logical names with user-defined mnemonic-names, (2) defines symbolic-characters, (3) specifies the currency sign, (4) selects the decimal point, (5) relates alphabet-names to character sets or collating sequences, (6) relates class-names to character sets, (7) provides for cursor positioning for an ACCEPT (Format 5) statement, and (8) provides information on the cause of termination of an ACCEPT (Format 5) statement. Format - SPECIAL-NAMES. [ [ { CARD-READER } ] [ { PAPER-TAPE-READER } ] [ { CONSOLE } IS device-name ] [ { LINE-PRINTER } ] [ { PAPER-TAPE-PUNCH } ] [ ] [C01 IS top-of-page-name ] [ ] ... [SWITCH switch-name ] [ { IS switch-name } ] [ { [ON STATUS IS cond-name] [OFF STATUS IS cond-name] } ] [ { IS switch-name } ] [ { [OFF STATUS IS cond-name] [ON STATUS IS cond-name] } ] [ { ON STATUS IS cond-name [OFF STATUS IS cond-name] } ] [ { OFF STATUS IS cond-name [ON STATUS IS cond-name] } ] [ { ASCII } ] [ { STANDARD-1 } ] [ { STANDARD-2 } ] [ALPHABET alphabet-name IS { NATIVE } ] ... [ { EBCDIC } ] [ { {first-literal } ] ] [ { { [{ THRU } last-literal ] } ... } ] [ { { [{ THROUGH } ] } } ] [ { { [{ ALSO lit } ... ] } } ] [SYMBOLIC CHARACTERS ] [ {{{symbolic-char} ... { IS } {char-val} ... } ... } ] ... [ {{ { ARE } } } ] [ {{ [IN alphabet-name] } ... ] [CLASS class-name IS {first-literal [{THROUGH} last-literal]} ] [ { [{THRU } ]} ... ] ... [CURRENCY SIGN IS char] [DECIMAL-POINT IS COMMA] [CURSOR IS cursor-position] [CRT STATUS IS crt-status-code]. ]
4.3.1 – device-name
is a mnemonic-name for a device. It always possesses the global attribute. Only the ACCEPT and DISPLAY statements can refer to it.
4.3.2 – top-of-page-name
is the first line of a logical page (top-of-page). It always possesses the global attribute. Only the WRITE statement can refer to it.
4.3.3 – switch-num
is the number of a program switch. Its value can range from 1 through 16.
4.3.4 – switch-name
is a mnemonic-name for the program switch.
4.3.5 – cond-name
is a condition-name for the "on" or "off" status of the switch. It always possesses the global attribute. Its truth value is "true" when the STATUS phrase matches the status of the switch, "false" when it does not.
4.3.6 – alphabet-name
is the user-defined word for a character set and/or collating sequence. It always possesses the global attribute.
4.3.7 – first-literal
is a literal. It specifies: (1) the value of one or more alphabetic characters, or (2) the first in a range of values.
4.3.8 – last-literal
is a literal. It specifies the last in a range of values.
4.3.9 – lit
is a literal. It specifies an alphabetic character value.
4.3.10 – symbolic-char
is a user-defined word that names the symbolic-character. It always possesses the global attribute. The same symbolic-char cannot appear more than once in the SYMBOLIC CHARACTERS clause.
4.3.11 – char-val
is an integer that indicates the ordinal position of a character in the native character set.
4.3.12 – class-name
is the user-defined word for a class. It always possesses the global attribute
4.3.13 – char
is a one-character nonnumeric literal that specifies the currency symbol. It cannot be a symbolic character.
4.3.14 – cursor-position
is a data item declared in the Working-Storage Section of the program. It is either an elementary unsigned numeric integer either four or six characters in length, described as USAGE IS DISPLAY, or a group item either four or six charaters in length, consisting of two elementary unsigned data items.
4.3.15 – crt-status-code
is a group data item three characters in length, declared in the Working-Storage Section of the program.
4.4 – FILE-CONTROL
The FILE-CONTROL paragraph contains the file-related specifications.
4.4.1 – 1format_sequential
FILE-CONTROL. Format 1 - Sequential File SELECT [OPTIONAL] file-name { ASSIGN TO [ EXTERNAL ] file-spec } { [ DYNAMIC ] } { } { ASSIGN TO [ EXTERNAL ] { data-name } } { [ DYNAMIC ] { literal } } { { DISK } } { { PRINTER } } [ RESERVE reserve-num [ AREA ] ] [ [ AREAS ] ] [ [ ORGANIZATION IS ] SEQUENTIAL ] [ BLOCK CONTAINS [smallest-block TO] blocksize { RECORDS } ] [ { CHARACTERS } ] [CODE-SET IS alphabet-name] [PADDING CHARACTER IS pad-char] [RECORD DELIMITER IS STANDARD-1] [ACCESS MODE IS SEQUENTIAL] [LOCK MODE IS { AUTOMATIC [WITH LOCK ON RECORD] } ] [ { EXCLUSIVE } ] [FILE STATUS IS file-stat] .
4.4.2 – 2format_line_sequential
FILE-CONTROL. Format 2 - Line Sequential File SELECT [OPTIONAL] file-name { ASSIGN TO [ EXTERNAL ] file-spec } { [ DYNAMIC ] } { } { ASSIGN TO [ EXTERNAL ] { data-name } } { [ DYNAMIC ] { literal } } { { DISK } } { { PRINTER } } [ RESERVE reserve-num [ AREA ] ] [ [ AREAS ] ] [ [ ORGANIZATION IS ] LINE SEQUENTIAL ] [ BLOCK CONTAINS [smallest-block TO] blocksize { RECORDS } ] [ { CHARACTERS } ] [CODE-SET IS alphabet-name] [PADDING CHARACTER IS pad-char] [RECORD DELIMITER IS STANDARD-1] [ACCESS MODE IS SEQUENTIAL] [LOCK MODE IS { AUTOMATIC [WITH LOCK ON RECORD] } ] [ { EXCLUSIVE } ] [FILE STATUS IS file-stat] .
4.4.3 – 3format_relative
FILE-CONTROL. Format 3 - Relative File SELECT [OPTIONAL] file-name { ASSIGN TO [ EXTERNAL ] file-spec } { [ DYNAMIC ] } { } { ASSIGN TO [ EXTERNAL ] { data-name } } { [ DYNAMIC ] { literal } } { { DISK } } { { PRINTER } } [ RESERVE reserve-num [ AREA ] ] [ [ AREAS ] ] [ ORGANIZATION IS ] RELATIVE [ BLOCK CONTAINS [smallest-block TO] blocksize { RECORDS } ] [ { CHARACTERS } ] [RECORD DELIMITER IS STANDARD-1] [ { SEQUENTIAL [RELATIVE KEY IS rel-key] } ] [ ACCESS MODE IS { { RANDOM } RELATIVE KEY IS rel-key } ] [ { { DYNAMIC } } ] [ { MANUAL WITH LOCK ON MULTIPLE RECORDS } ] [LOCK MODE IS { AUTOMATIC [WITH LOCK ON RECORD] } ] [ { EXCLUSIVE } ] [FILE STATUS IS file-stat] .
4.4.4 – 4format_indexed
FILE-CONTROL. Format 4 - Indexed File SELECT [OPTIONAL] file-name { ASSIGN TO [ EXTERNAL ] file-spec } { [ DYNAMIC ] } { } { ASSIGN TO [ EXTERNAL ] { data-name } } { [ DYNAMIC ] { literal } } { { DISK } } { { PRINTER } } [ RESERVE reserve-num [ AREA ] ] [ [ AREAS ] ] [ ORGANIZATION IS ] INDEXED [ BLOCK CONTAINS [ smallest-block TO ] blocksize { RECORDS } ] [ { CHARACTERS } ] [RECORD DELIMITER IS STANDARD-1] [ { SEQUENTIAL } ] [ ACCESS MODE IS { RANDOM } ] [ { DYNAMIC } ] [RECORD KEY IS { rec-key | seg-key = {seg}... } ] [ [WITH DUPLICATES] [ ASCENDING ] ] [ [ DESCENDING ] ] [ALTERNATE RECORD KEY IS { alt-key | seg-key = {seg}... } ] [ [WITH DUPLICATES] [ ASCENDING ] ] [ [ DESCENDING ] ] ... [ { MANUAL WITH LOCK ON MULTIPLE RECORDS } ] [LOCK MODE IS { AUTOMATIC [WITH LOCK ON RECORD] } ] [ { EXCLUSIVE } ] [FILE STATUS IS file-stat] .
4.4.5 – 5format_sort-merge
FILE-CONTROL. Format 5 - Sort or Merge File SELECT file-name { ASSIGN TO [ EXTERNAL ] file-spec } { [ DYNAMIC ] } { } { ASSIGN TO [ EXTERNAL ] { data-name } } { [ DYNAMIC ] { literal } } { { DISK } } { { PRINTER } }
4.4.6 – 6format_report
FILE-CONTROL. Format 6 - Report File SELECT file-name { ASSIGN TO [ EXTERNAL ] file-spec } { [ DYNAMIC ] } { } { ASSIGN TO [ EXTERNAL ] { data-name } } { [ DYNAMIC ] { literal } } { { DISK } } { { PRINTER } } [ RESERVE reserve-num [ AREA ] ] [ [ AREAS ] ] [ [ ORGANIZATION IS ] SEQUENTIAL ] [ BLOCK CONTAINS [smallest-block TO] blocksize { RECORDS }] [ { CHARACTERS }] [CODE-SET IS alphabet-name] [PADDING CHARACTER IS pad-char] [RECORD DELIMITER IS STANDARD-1] [ACCESS MODE IS SEQUENTIAL] [FILE STATUS IS file-stat] .
4.4.7 – clauses
4.4.7.1 – ASSIGN
The ASSIGN clause associates a file with a partial or a complete file specification. Format - ASSIGN TO file-spec
4.4.7.1.1 – file-spec
is a nonnumeric literal or a COBOL word formed according to the rules for user-defined names. It represents a partial or complete file specification.
4.4.7.2 – BLOCK_CONTAINS
The BLOCK CONTAINS clause specifies the size of a physical record. Format - BLOCK CONTAINS [smallest-block TO] blocksize { RECORDS } { CHARACTERS }
4.4.7.2.1 – smallest-block
is an integer literal. It specifies the minimum physical record size.
4.4.7.2.2 – blocksize
is an integer literal. It specifies the exact or maximum physical record size.
4.4.7.3 – CODE-SET
The CODE-SET clause specifies the representation of data on external media. Format - CODE-SET IS alphabet-name
4.4.7.3.1 – alphabet-name
is the name of a character set defined in the SPECIAL-NAMES paragraph. It cannot be described with literals in the ALPHABET clause.
4.4.7.4 – LOCK_MODE
The LOCK MODE clause specifies a locking technique to use for a file. LOCK MODE is part of the X/Open COBOL standard. Format - [ { MANUAL WITH LOCK ON MULTIPLE RECORDS } ] [LOCK MODE IS { AUTOMATIC [WITH LOCK ON RECORD] } ] [ { EXCLUSIVE } ]
4.4.7.5 – ORGANIZATION
The ORGANIZATION clause specifies a file's logical structure. Format - { SEQUENTIAL } [ ORGANIZATION IS ] { LINE SEQUENTIAL } { RELATIVE } { INDEXED }
4.4.7.6 – PADDING_CHARACTER
The PADDING CHARACTER clause specifies the character to be used to pad blocks in sequential files. Format - PADDING CHARACTER IS pad-char
4.4.7.6.1 – pad-char
is a one-character nonnumeric literal or the data-name of a one-character data item. The data-name can be qualified.
4.4.7.7 – RECORD_DELIMITER
The RECORD DELIMITER clause indicates the method of determining the length of a variable record on the external medium. It is for documentation only. Format - RECORD DELIMITER IS STANDARD-1
4.4.7.8 – RESERVE
The RESERVE clause specifies the number of input-output buffers for a file. Format - RESERVE reserve-num [ AREA ] [ AREAS ]
4.4.7.8.1 – reserve-num
is an integer literal from 1 through 127. It specifies the number of input-output areas for the file.
4.5 – I-O-CONTROL
The I-O-CONTROL paragraph specifies the input-output techniques to be used for a file. Format - I-O-CONTROL. [[ {| DEFERRED-WRITE |} ] [[ {| EXTENSION extend-amt |} ] [[ {| FILL-SIZE |} ] [[ {| LOCK-HOLDING |} ] [[APPLY {| MASS-INSERT |} ON {file-name} ... ] ... [[ {|[CONTIGUOUS ] [[ {|[CONTIGUOUS-BEST-TRY] PREALLOCATION preall-amt |} ] [[ {| PRINT-CONTROL |} ] [[ {| WINDOW window-ptrs |} ] [ [ RECORD ] ] [SAME [ SORT ]AREA FOR {same-area-file} {same-area-file} ... ] ... [ [ SORT-MERGE ] ] [ { { [END OF] { REEL } } } ] [ { { { UNIT } } OF file-name} ] [RERUN [ON file-name] EVERY { { integer RECORDS } } ] ... [ { integer CLOCK-UNITS } ] [ { condition-name } ] [MULTIPLE FILE TAPE CONTAINS {file-name [POSITION integer] } ... ] ...].]
4.5.1 – extend-amt
is an integer from 0 through 65535. It specifies the number of blocks in each extension of a disk file.
4.5.2 – preall-amt
is an integer from 0 through 4,294,967,295. It specifies the number of blocks to initially allocate when the program creates a disk file.
4.5.3 – window-ptrs
is an integer from 0 through 127. Its value can also be 255. It specifies the number of retrieval pointers in the window that maps the disk file.
4.5.4 – file-name
names a file described in a Data Division file description entry.
4.5.5 – same-area-file
names a file described in a Data Division File Description entry to share storage areas with every other same-area-file.
5 – DATA_DIVISION
The DATA DIVISION describes data the program creates, receives as input, manipulates, and produces as output. Format - [ DATA DIVISION. [SUB-SCHEMA SECTION. [subschema-entry [keeplist-entry] ... ] ] [FILE SECTION. [file-description-entry {record-description-entry} ... ] ... [report-file-description-entry] ... [sort-merge-file-description-entry {record-description-entry} ... ] ... ] [WORKING-STORAGE SECTION. [record-description-entry] ... ] [LINKAGE SECTION. [record-description-entry] ... ] [REPORT SECTION. [report-description-entry {report-group-description-entry} ... ] ... ] [SCREEN SECTION [screen-description-entry] ...] ... ] ]
5.1 – rf_report-file-description-entry
The report file description entry is Format 4 of the file description entry. See FD_file-description-entry subtopic report_FD (Format 4) for details of the syntax.
5.2 – FD file-description-entry
A file description entry describes the physical structure, identification, record names, and names for sequential, relative, indexed, and report files. It also specifies: (1) the internal or external attributes of a file connector, and (2) the local or global attributes of a file-name.
5.2.1 – sequential FD
A file description entry describes the physical structure, identification, record names, and names for sequential, relative, indexed, and report files. It also specifies: (1) the internal or external attributes of a file connector, and (2) the local or global attributes of a file-name. Format 1 - Sequential File FD file-name [IS EXTERNAL] [IS GLOBAL] [BLOCK CONTAINS [smallest-block TO] blocksize { RECORDS }] [ { CHARACTERS }] [RECORD { CONTAINS [shortest-rec TO] longest-rec CHARACTERS }] [ { IS VARYING IN SIZE [FROM shortest-rec] [ TO longest-rec ] CHARACTERS [ DEPENDING ON depending-item ] }] [LABEL { RECORDS ARE } { STANDARD } ] [ { RECORD IS } { OMITTED } ] [VALUE OF ID IS file-spec] [DATA { RECORDS ARE } {rec-name} ... ] [ { RECORD IS } ] [ LINAGE IS page-size LINES [ WITH FOOTING AT footing-line ] [ LINES AT TOP top-lines ] [ LINES AT BOTTOM bottom-lines ] ] [CODE-SET IS alphabet-name] [ [ ACCESS MODE IS ] SEQUENTIAL ] [FILE STATUS IS file-stat] .
5.2.2 – relative FD
A file description entry describes the physical structure, identification, record names, and names for sequential, relative, indexed, and report files. It also specifies: (1) the internal or external attributes of a file connector, and (2) the local or global attributes of a file-name. Format 2 - Relative File FD file-name [IS EXTERNAL] [IS GLOBAL] [BLOCK CONTAINS [smallest-block TO] blocksize { RECORDS }] [ { CHARACTERS }] [RECORD { CONTAINS [shortest-rec TO] longest-rec CHARACTERS }] [ { IS VARYING IN SIZE [FROM shortest-rec] [ TO longest-rec ] CHARACTERS [ DEPENDING ON depending-item ] }] [LABEL { RECORDS ARE } { STANDARD } ] [ { RECORD IS } { OMITTED } ] [VALUE OF ID IS file-spec] [DATA { RECORDS ARE } {rec-name} ... ] [ { RECORD IS } ] [ { SEQUENTIAL [ RELATIVE KEY IS rel-key ] }] [ACCESS MODE IS { { RANDOM } RELATIVE KEY IS rel-key }] [ { { DYNAMIC } }] [FILE STATUS IS file-stat] .
5.2.3 – indexed FD
A file description entry describes the physical structure, identification, record names, and names for sequential, relative, indexed, and report files. It also specifies: (1) the internal or external attributes of a file connector, and (2) the local or global attributes of a file-name. Format 3 - Indexed File FD file-name [IS EXTERNAL] [IS GLOBAL] [BLOCK CONTAINS [smallest-block TO] blocksize { RECORDS }] [ { CHARACTERS }] [RECORD { CONTAINS [shortest-rec TO] longest-rec CHARACTERS }] [ { IS VARYING IN SIZE [FROM shortest-rec] [ TO longest-rec ] CHARACTERS [ DEPENDING ON depending-item ] }] [LABEL { RECORDS ARE } { STANDARD } ] [ { RECORD IS } { OMITTED } ] [VALUE OF ID IS file-spec] [DATA { RECORDS ARE } {rec-name} ... ] [ { RECORD IS } ] [ { SEQUENTIAL }] [ACCESS MODE IS { RANDOM }] [ { DYNAMIC }] [RECORD KEY IS { rec-key | seg-key = {seg}... } ] [ [WITH DUPLICATES] [ASCENDING ] ] [ [DESCENDING] ] [ALTERNATE RECORD KEY IS { alt-key | seg-key = {seg}... } ] [ [WITH DUPLICATES] [ASCENDING ] ] [ [DESCENDING] ] ... [FILE STATUS IS file-stat] .
5.2.4 – report FD
A file description entry describes the physical structure, identification, record names, and names for sequential, relative, indexed, and report files. It also specifies: (1) the internal or external attributes of a file connector, and (2) the local or global attributes of a file-name. Format 4 - Report File FD file-name [IS EXTERNAL] [IS GLOBAL] [BLOCK CONTAINS [smallest-block TO] blocksize { RECORDS }] [ { CHARACTERS }] [RECORD { CONTAINS [shortest-rec TO] longest-rec CHARACTERS }] [ { IS VARYING IN SIZE [FROM shortest-rec] [ TO longest-rec ] CHARACTERS [ DEPENDING ON depending-item ] }] [LABEL { RECORDS ARE } { STANDARD } ] [ { RECORD IS } { OMITTED } ] [VALUE OF ID IS file-spec] [ [ACCESS MODE IS] SEQUENTIAL] { REPORT IS } {report-name} ... { REPORTS ARE } [CODE-SET IS alphabet-name] [FILE STATUS IS file-stat] .
5.3 – SD sort-merge-file-description-entry
A sort-merge file description entry describes a sort or merge file's physical structure, identification, and record names. Format - SD file-name [RECORD { CONTAINS [shortest-rec TO] longest-rec CHARACTERS }] [ { IS VARYING IN SIZE [FROM shortest-rec] [TO longest-rec] CHARACTERS [DEPENDING ON depending-item] }] [DATA { RECORDS ARE } {rec-name} ... ] [ { RECORD IS } ] .
5.4 – DB subschema-entry
The Subschema entry allows a program to access a subschema in the Common Data Dictionary/Repository under the schema name. Format - DB subschema-name WITHIN schema-name [ FOR database-name ] [ { THRU } stream-name ] [ { THROUGH } ] .
5.4.1 – subschema-name
references a subschema name in the Common Data Dictionary/Repository (CDD/Repository) under the schema name.
5.4.2 – schema-name
references a schema name in the Common Data Dictionary/Repository.
5.4.3 – database-name
represents a complete or partial file specification defining the database occurrence. A database occurrence is a root file. At run time, database-name points the Database Control System (DBCS) to the root file.
5.4.4 – stream-name
represents the name of a stream. Signals the Data Base Control System (DBCS) that your run unit uses a stream, which allows access to multiple databases or subschemas.
5.5 – RD report-description-entry
The Report Description names a report, specifies any identifying characters to be prefixed to each print line in the report, and describes the physical structure and organization of that report. It also determines whether a report-name is a local name or global name. Format - RD report-name [IS GLOBAL] [CODE report-code] [{ CONTROL IS } { {control-name} ... }] [{ CONTROLS ARE } { FINAL [control-name] ... }] [ PAGE [ LIMIT IS ] page-size [ LINE ] [ LIMITS ARE ] [ LINES ] [ HEADING heading-line ] [ FIRST DETAIL first-detail-line ] [ LAST DETAIL last-detail-line ] [ FOOTING footing-line ] ] .
5.6 – LD keeplist-entry
The Keeplist Description entry names a keeplist. Format - LD keeplist-name [LIMIT IS integer] .
5.6.1 – keeplist-name
is a user-defined name.
5.6.2 – integer
is a positive integer.
5.7 – dd_record-description-entry
A data description entry specifies the characteristics of a data item.
5.7.1 – 1format
A data description entry specifies the characteristics of a data item. Format 1 - level-number [ data-name ] [ FILLER ] [REDEFINES other-data-item] [IS EXTERNAL] [IS GLOBAL] [ { PICTURE } IS character-string ] [ { PIC } ] [ { BINARY } ] [ { COMPUTATIONAL } ] [ { COMP } ] [ { COMPUTATIONAL-1 } ] [ { COMP-1 } ] [ { COMPUTATIONAL-2 } ] [ [USAGE IS ] { COMP-2 } ] [ { COMPUTATIONAL-3 } ] [ { COMP-3 } ] [ { COMPUTATIONAL-5 } ] [ { COMP-5 } ] [ { COMPUTATIONAL-X } ] [ { COMP-X } ] [ { DISPLAY } ] [ { INDEX } ] [ { PACKED-DECIMAL } ] [ { POINTER } ] [ { POINTER-64 } ] [ [SIGN IS ] { LEADING } [ SEPARATE CHARACTER ] ] [ { TRAILING } ] [ OCCURS table-size TIMES ] [ [ { ASCENDING } KEY IS {key-name} ... ] ... ] [ [ { DESCENDING } ] ] [ ] [ [INDEXED BY {ind-name} ... ] ] [ ] [ OCCURS min-times TO max-times TIMES DEPENDING ON depending-item ] [ [ { ASCENDING } KEY IS {key-name} ... ] ... ] [ [ { DESCENDING } ] ] [ ] [ [INDEXED BY {ind-name} ... ] ] [ { SYNCHRONIZED } [ LEFT ] ] [ { SYNC } [ RIGHT ] ] [ { JUSTIFIED } RIGHT ] [ { JUST } ] [BLANK WHEN ZERO] [ { lit }] [VALUE IS { EXTERNAL external-name }] . [ { REFERENCE data-name }]
5.7.2 – 2format_66
A data description entry specifies the characteristics of a data item. Format 2 - 66 new-name RENAMES rename-start [ { THRU } rename-end ] . [ { THROUGH } ]
5.7.3 – 3format_88
A data description entry specifies the characteristics of a data item. Format 3 - 88 condition-name { VALUE IS } { { EXTERNAL external-name } { VALUES ARE } { { REFERENCE data-name } { { low-val } [ { THRU } { EXTERNAL external-name } ] } [ { THROUGH } { REFERENCE data-name } ] } ... . [ { high-val } ] }
5.8 – clauses
5.8.1 – ACCESS_MODE
The ACCESS MODE clause specifies the order of access for a file's records.
5.8.1.1 – 1format_sequential
The ACCESS MODE clause specifies the order of access for a file's records. Format 1 - Sequential File [ ACCESS MODE IS ] SEQUENTIAL
5.8.1.2 – 2format_relative
The ACCESS MODE clause specifies the order of access for a file's records. Format 2 - Relative File { SEQUENTIAL [ RELATIVE KEY IS rel-key ] } [ ACCESS MODE IS ] { { RANDOM } RELATIVE KEY IS rel-key } { { DYNAMIC } }
5.8.1.2.1 – rel-key
is the file's RELATIVE KEY data item.
5.8.1.3 – 3format_indexed
The ACCESS MODE clause specifies the order of access for a file's records. Format 3 - Indexed File { SEQUENTIAL } [ ACCESS MODE IS ] { RANDOM } { DYNAMIC }
5.8.2 – ALTERNATE_RECORD_KEY
THE ALTERNATE RECORD KEY clause specifies an alternate access path to indexed file records. Format - ALTERNATE RECORD KEY IS { alt-key | seg-key = {seg}...} [WITH DUPLICATES] [ASCENDING ] [DESCENDING]
5.8.2.1 – alt-key
is the Alternate Record Key for the file. It is the data-name of a data item in a record description entry for the file. It can be qualified, but it cannot be a group item that contains a variable-occurrence data item. The data item must be described as: (1) alphanumeric or alphabetic category, (2) a group item, (3) unsigned numeric display, (4) a COMP-3 integer, or (5) a COMP integer.
5.8.2.2 – seg-key
is the Alternate Record Key for the file. It is a segmented-key name that represents the concatenation of one or more (up to eight) occurrences of seg.
5.8.2.3 – seg
is the data-name of a data item in a record description entry for the file. It can be qualified, but it cannot be a group item that contains a variable-occurrence data item. The data item must be described as: (1) alphanumeric or alphabetic category, (2) a group item or (3) an unsigned numeric display item.
5.8.3 – AUTO
In the context of ACCEPT, the AUTO clause moves the cursor to the next field when the last character of an input or update field that was defined with the AUTO clause is entered. Format - AUTO
5.8.4 – BACKGROUND-COLOR
The BACKGROUND-COLOR clause specifies the background color for the screen item. Format - BACKGROUND-COLOR color-num
5.8.4.1 – color-num
is an integer in the range 0-7 specifying a color as follows: -------------------------------------------------------------- COLOR COLOR VALUE COLOR COLOR VALUE -------------------------------------------------------------- Black 0 Red 4 Blue 1 Magenta 5 Green 2 Yellow/Brown 6 Cyan 3 White 7 --------------------------------------------------------------
5.8.5 – BELL
The BELL clause sounds the workstation or terminal audio tone. Format - BELL
5.8.6 – BLANK
The BLANK clause clears a screen line or clears the entire screen before displaying the screen item. Format - BLANK { LINE } { SCREEN }
5.8.7 – BLANK_WHEN_ZERO
THE BLANK WHEN ZERO clause replaces zeroes with spaces when a data item's value is zero. In the context of the Screen Section, it displays spaces when the value of a screen item to be displayed on the screen is zero. Format - BLANK WHEN ZERO
5.8.8 – BLINK
The BLINK clause displays characters on the screen with the "blink on" characher attribute. Format - BLINK
5.8.9 – CODE
The CODE clause specifies a two-character literal that identifies each print line as belonging to a specific report. Format - CODE report-code
5.8.9.1 – report-code
must be a two-character nonnumeric literal.
5.8.10 – COLUMN_NUMBER
In a report group description, the COLUMN NUMBER clause identifies a printable item and specifies the position of the item on a print line. In a screen description, the COLUMN NUMBER clause specifies the horizontal screen coordinate for a screen item.
5.8.10.1 – 1format_report_description
Format 1 - Report Description COLUMN NUMBER IS column-num
5.8.10.1.1 – column-num
is a positive integer greater than zero.
5.8.10.2 – 2format_screen_description
Format 2 - Screen Description COLUMN NUMBER IS [PLUS] { identifier-1 } { integer-1 }
5.8.10.2.1 – identifier-1
is an elementary unsigned numeric integer data item. It cannot be subscripted.
5.8.10.2.2 – integer-1
is an unsigned integer value.
5.8.11 – CONTROL
The CONTROL clause establishes the levels of the control hierarchy for the report. Format - { CONTROL IS } { {control-name} ... } { CONTROLS ARE } { FINAL [control-name] ... }
5.8.11.1 – control-name
is any data-name in the File, Working-Storage, or Linkage Section.
5.8.12 – Data-Name
Data-name specifies a data item that your program can explicitly reference. FILLER specifies an item that cannot be explicitly referenced. Format - [ data-name ] [ FILLER ]
5.8.13 – DATA_RECORDS
The DATA RECORDS clause documents the names of a file's record description entries. Format - DATA { RECORD IS } {rec-name} ... { RECORDS ARE }
5.8.13.1 – rec-name
is the name of a data record. It must be defined by a level 01 data description entry subordinate to the file description entry.
5.8.14 – ERASE
The ERASE clause clears from the starting cursor position to the end of either the line or the screen. Format - ERASE { EOL } { EOS }
5.8.15 – EXTERNAL
The EXTERNAL clause specifies that a data item or a file connector in a defining program is common to other programs in the run unit if the program defines it identically. The group and elementary data items of an external data record and files associated with an external file connector are available to very program in the image that describes them. Format - IS EXTERNAL
5.8.16 – FILE_STATUS
The FILE STATUS clause names a data item that contains the status of an input/output operation. Format - FILE STATUS IS file-stat
5.8.16.1 – file-stat
is the data-name of a two-character alphanumeric Working-Storage Section or Linkage Section data item. File-stat is the file's FILE STATUS data item.
5.8.17 – FOREGROUND-COLOR
The FOREGROUND-COLOR clause specifies the foreground color for the screen item. Format - FOREGROUND-COLOR color-num
5.8.17.1 – color-num
is an integer in the range 0-7 specifying a color as follows: -------------------------------------------------------------- COLOR COLOR VALUE COLOR COLOR VALUE -------------------------------------------------------------- Black 0 Red 4 Blue 1 Magenta 5 Green 2 Yellow/Brown 6 Cyan 3 White 7 --------------------------------------------------------------
5.8.18 – FULL
The FULL clause specifies that a screen item must be left either completely empty or it must be entirely filled with data. Format - FULL
5.8.19 – GLOBAL
The GLOBAL clause specifies that data-name or file-name is available to every program contained within the program that declares it. Format - IS GLOBAL
5.8.20 – GROUP_INDICATE
The GROUP INDICATE clause specifies that the associated printable item is presented only on the first occurrence of its DETAIL report group after a control break or page advance. Format - GROUP INDICATE
5.8.21 – HIGHLIGHT
The HIGHLIGHT clause specifies that the field is to appear on the screen with the highest intensity. Format - HIGHLIGHT
5.8.22 – JUSTIFIED
The JUSTIFIED clause specifies nonstandard data positioning in a screen item or another receiving item. Format - { JUSTIFIED } RIGHT { JUST }
5.8.23 – LABEL_RECORDS
The LABEL RECORDS clause specifies the presence or absence of labels. Format - LABEL { RECORDS ARE } { STANDARD } { RECORD IS } { OMITTED }
5.8.24 – Level-Number
The level-number shows the position of a data item or screen item within the hierarchial structure of a logical record or a report group or a screen description. It also identifies entries for condition-names and the RENAMES clause. Format - level-number
5.8.25 – LINAGE
The LINAGE clause specifies the number of lines on a logical page. It can also specify the size of the logical page's top and bottom margins and the line where the footing area begins in the page body. Format - LINAGE IS {page-lines} LINES [ WITH FOOTING AT footing-line ] [ LINES AT TOP top-lines ] [ LINES AT BOTTOM bottom-lines ]
5.8.25.1 – page-lines
is a positive integer or the data-name of an elementary unsigned integer numeric data item. Its value must be greater than zero. It specifies the number of lines that can be written or spaced on the logical page. If page-lines is a data-name, it can be qualified.
5.8.25.2 – footing-line
is a positive integer or the data-name of an elementary unsigned integer numeric data item. Its value must be greater than zero, but cannot be greater than page-lines. Footing-lines specifies the line number where the footing area begins in the page body. If footing-line is a data-name, it can be qualified.
5.8.25.3 – top-lines
is an integer or the data-name of an elementary unsigned integer numeric data item. Its value can be zero. Top-lines specifies the number of lines in the top margin of the logical page. If top-lines is a data-name, it can be qualified.
5.8.25.4 – bottom-lines
is an integer or the data-name of an elementary unsigned integer numeric data item. Its value can be zero. Bottom-lines specifies the number of lines in the bottom margin of the logical page. If bottom-lines is a data-name, it can be qualified.
5.8.26 – LINE_NUMBER
The LINE NUMBER clause specifies vertical positioning information for a report group, or specifies the vertical screen coordinate for a screen item.
5.8.26.1 – 1format_report_description
Format - LINE NUMBER IS { line-num [ON NEXT PAGE] } { PLUS line-num-plus }
5.8.26.1.1 – line-num
is a nonnegative integer. Line-num represents an absolute line number on a logical page and establishes a print line for a Report Writer report group.
5.8.26.1.2 – line-num-plus
is a positive integer. Line-num-plus represents a relative line number on a logical page and establishes a print line for a Report Writer report group.
5.8.26.2 – 2format_screen_description
Format 2 - Screen Description LINE NUMBER IS [PLUS] { identifier-1 } { integer-1 }
5.8.26.2.1 – identifier-1
is an elementary unsigned numeric integer data item. It cannot be subscripted.
5.8.26.2.2 – integer-1
is an unsigned integer value.
5.8.27 – LOWLIGHT
The LOWLIGHT clause specifies that the field is to appear on the screen with the lowest intensity. When only two levels of intensity are available, normal intensity and LOWLIGHT will be the same. Format - LOWLIGHT
5.8.28 – NEXT_GROUP
The NEXT GROUP clause specifies information for the vertical positioning of the next report group on a logical page following the presentation of the last line of a report group. Format - { next-group-line-num } NEXT GROUP IS { PLUS next-group-line-num-plus } { NEXT PAGE }
5.8.28.1 – next-group-line-num
is a positive, one- to three-digit integer value greater than zero. It represents an absolute line number on a logical page and establishes a print line for the next Report Writer report group.
5.8.28.2 – next-group-line-num-plus
is a positive, one- to three-digit integer value. It represents a relative line number on a logical page and establishes a print line for the next Report Writer report group.
5.8.29 – OCCURS
The OCCURS clause defines tables and provides the basis for subscripting and indexing. It eliminates the need for separate entries for repeated data items.
5.8.29.1 – 1format_table-size
The OCCURS clause defines tables and provides the basis for subscripting and indexing. It eliminates the need for separate entries for repeated data items. Format 1 - OCCURS table-size TIMES [ { ASCENDING } KEY IS {key-name} ... ] ... [ { DESCENDING } ] [ INDEXED BY {ind-name} ... ]
5.8.29.1.1 – table-size
is an integer that specifies the exact number of occurrences of a table element.
5.8.29.1.2 – key-name
is the data-name of an entry that contains the OCCURS clause or an entry subordinate to it. Key-name can be qualified. Each key-name after the first must name an entry subordinate to the entry that contains the OCCURS clause. The values in each key-name are the basis of the ascending or descending arrangement of the table's repeated data.
5.8.29.1.3 – ind-name
is an index-name. It associates an index with the table and allows indexing in table element references.
5.8.29.2 – 2format DEPENDING
The OCCURS clause defines tables and provides the basis for subscripting and indexing. It eliminates the need for separate entries for repeated data items. Format 2 - OCCURS min-times TO max-times TIMES DEPENDING ON depending-item [ { ASCENDING } KEY IS {key-name} ... ] ... [ { DESCENDING } ] [ INDEXED BY {ind-name} ... ]
5.8.29.2.1 – min-times
is an integer that specifies the minimum number of occurrences of a table element. Its value must be greater than or equal to zero.
5.8.29.2.2 – max-times
is an integer that specifies the maximum number of occurrences of a table element. Its value must be greater than min-times.
5.8.29.2.3 – key-name
is the data-name of an entry that contains the OCCURS clause or an entry subordinate to it. Key-name can be qualified. Each key-name after the first must name an entry subordinate to the entry that contains the OCCURS clause. The values in each key-name are the basis of the ascending or descending arrangement of the table's repeated data.
5.8.29.2.4 – ind-name
is an index-name. It associates an index with the table and allows indexing in table element references.
5.8.29.2.5 – depending-item
is the data-name of an elementary unsigned integer data item. Its value specifies the current number of occurrences. Depending-item can be qualified.
5.8.30 – PAGE
The PAGE clause defines the length of a logical page and the vertical subdivisions within which report groups are presented. Format - PAGE [ LIMIT IS ] page-size [ LINE ] [ LIMITS ARE ] [ LINES ] [ HEADING heading-line ] [ FIRST DETAIL first-detail-line ] [ LAST DETAIL last-detail-line ] [ FOOTING footing-line ]
5.8.30.1 – page-size
is a one- to three-digit integer. It defines the number of lines available on a logical page.
5.8.30.2 – heading-line
is a one- to three-digit integer. It defines the first line number for a REPORT HEADING or PAGE HEADING report group on the logical page.
5.8.30.3 – first-detail-line
is a one- to three-digit integer. It defines the first line number for a CONTROL HEADING, DETAIL, and CONTROL FOOTING report group on the logical page.
5.8.30.4 – last-detail-line
is a one- to three-digit integer. It defines the last line number for a CONTROL HEADING or DETAIL report group on the logical page.
5.8.30.5 – footing-line
is a one- to three-digit integer. It defines the last line number for a CONTROL FOOTING report group and the first line number for the PAGE FOOTING report group on the logical page.
5.8.31 – PICTURE
The PICTURE clause specifies the general characteristics and editing requirements of an elementary item, including an elementary screen item.
5.8.31.1 – 1format_general
Format 1 - { PICTURE } IS character-string { PIC }
5.8.31.1.1 – PICTURE symbols
The following symbols may be used in a PICTURE clause: A B P S V X Z 9 0 / , . + - CR DB * cs
5.8.31.2 – 2format_screen_section
Format 2 - Screen Section { USING identifier-3 } { PICTURE } IS character-string { {| FROM { identifier-4 } |} } { PIC } { {| { literal-1 } |} } { {| TO identiier-5 |} }
5.8.31.2.1 – PICTURE symbols
The following symbols may be used in a PICTURE clause: A B P S V X Z 9 0 / , . + - CR DB * cs
5.8.32 – RECORD
The RECORD clause specifies: (1) the number of character positions in a fixed length record, (2) variable length record format, or (3) the minimum and maximum number of character positions in a variable length record.
5.8.32.1 – 1format CONTAINS
The RECORD clause specifies: (1) the number of character positions in a fixed length record, (2) variable length record format, or (3) the minimum and maximum number of character positions in a variable length record. Format 1 - RECORD CONTAINS [shortest-rec TO] longest-rec CHARACTERS
5.8.32.1.1 – shortest-rec
is an integer that specifies the minimum number of character positions in a variable-length record.
5.8.32.1.2 – longest-rec
is an integer greater than shortest-rec. It specifies the maximum number of character positions in a variable-length record or the size of a fixed-length record.
5.8.32.2 – 2format VARYING
The RECORD clause specifies: (1) the number of character positions in a fixed length record, (2) variable length record format, or (3) the minimum and maximum number of character positions in a variable length record. Format 2 - RECORD IS VARYING IN SIZE [FROM shortest-rec] [TO longest-rec] CHARACTERS [DEPENDING ON depending-item]
5.8.32.2.1 – shortest-rec
is an integer that specifies the minimum number of character positions in a variable-length record.
5.8.32.2.2 – longest-rec
is an integer greater than shortest-rec. It specifies the maximum number of character positions in a variable-length record or the size of a fixed-length record.
5.8.32.2.3 – depending-item
is the identifier of an elementary unsigned integer data item in the Working-Storage or Linkage Section. It specifies the number of character positions for an output operation, and it contains the number of character positions after a successful input operation.
5.8.33 – RECORD_KEY
The RECORD KEY clause specifies the Prime Record Key access path to indexed file records. Format - RECORD KEY IS { rec-key | seg-key = {seg}... } [ WITH DUPLICATES ] [ ASCENDING ] [ DESCENDING]
5.8.33.1 – rec-key
is the Record Key for the file. It is the data-name of a data item in a record description entry for the file. It can be qualified, but it cannot be a group item that contains a variable-occurrence data item. The data item must be described as: (1) alphanumeric or alphabetic category, (2) a group item, (3) unsigned numeric display, (4) a COMP-3 integer, or (5) a COMP integer.
5.8.33.2 – seg-key
is the Record Key for the file. It is a segmented-key name that represents the concatenation of one or more (up to eight) occurrences of seg.
5.8.33.3 – seg
is the data-name of a data item in a record description entry for the file. It can be qualified, but it cannot be a group item that contains a variable-occurrence data item. The data item must be described as: (1) alphanumeric or alphabetic category, (2) a group item or (3) an unsigned numeric display item.
5.8.34 – REDEFINES
The REDEFINES clause allows different data description entries to describe the same storage area. Format - level-number [ identifier ] REDEFINES other-data-item [ FILLER ]
5.8.34.1 – other-data-item
is an identifier. It identifies the data description entry that first defines the storage area.
5.8.35 – RENAMES
The RENAMES clause groups elementary items in alternative or overlapping ways. Format - 66 new-name RENAMES rename-start [ { THRU } rename-end ] [ { THROUGH } ]
5.8.35.1 – new-name
is the identifier of the item being described. It identifies an alternate grouping of one or more items in a record.
5.8.35.2 – rename-start
is the identifier of the leftmost data item in the area. It can be qualified.
5.8.35.3 – rename-end
is the identifier of the rightmost data item in the area. It can be qualified.
5.8.36 – REPORT
The REPORT clause in a File Description entry (FD) specifies the Report Description (RD) report names that comprise a report file. Format - { REPORT IS } { report-name } ... { REPORTS ARE }
5.8.37 – REQUIRED
The REQUIRED clause specifies that in the context of an ACCEPT statement, the user must enter at least one character in the input or update field. Format - REQUIRED
5.8.38 – REVERSE-VIDEO
The REVERSE-VIDEO clause specifies that the field is displayed with the default or specified foreground and background colors exchanged. Format - REVERSE-VIDEO
5.8.39 – SECURE
The SECURE clause suppresses the display of input character on the screen. Format - SECURE
5.8.40 – SIGN
The SIGN clause specifies the operational sign's position and type of representation.
5.8.40.1 – 1format Data Screen
The SIGN clause specifies the operational sign's position and type of representation. Format 1 - Data Description and Screen Description Entries [ SIGN IS ] { LEADING } [ SEPARATE CHARACTER ] { TRAILING }
5.8.40.2 – 2format Report Group Description
The SIGN clause specifies the operational sign's position and type of representation. Format 2 - Report Group Description Entries [ SIGN IS ] { LEADING } SEPARATE CHARACTER { TRAILING }
5.8.41 – SOURCE
The SOURCE clause identifies a data item to be sent to an associated printable item defined within a Report Group Description entry. Format - SOURCE IS source-id
5.8.41.1 – source-id
names an elementary item in the Data Division.
5.8.42 – SUM
The SUM clause establishes a Report Writer sum counter and names the data items to be summed. Format - {SUM {sum-name}... [UPON {detail-report-group-name} ... ]} ... [RESET ON { control-foot-name } ] [ { FINAL } ]
5.8.42.1 – sum-name
names a numeric data item with an optional sign in the File, Working-Storage, and Linkage Sections, or another sum counter in the Report Section.
5.8.42.2 – detail-report-group-name
names a DETAIL report group.
5.8.42.3 – control-foot-name
must reference a control-name in the report's CONTROL clause.
5.8.43 – SYNCHRONIZED
The SYNCHRONIZED clause specifies elementary item alignment on word boundary offsets relative to a record's beginning. These offsets are related to the size and usage of the item being stored. Format - [ { SYNCHRONIZED } [ LEFT ] ] [ { SYNC } [ RIGHT ] ]
5.8.44 – TYPE
The TYPE clause identifies the report group type and indicates when the Report Writer Control System (RWCS) is to process it. Format - { REPORT HEADING } } { RH } } { PAGE HEADING } } { PH } } { CONTROL HEADING } { control-head-name } } { CH } { FINAL } } TYPE IS { DETAIL } } { DE } } { CONTROL FOOTING } { control-foot-name } } { CF } { FINAL } } { PAGE FOOTING } } { PF } } { REPORT FOOTING } } { RF } }
5.8.44.1 – control-head-name
names a control-name in the CONTROL clause.
5.8.44.2 – control-foot-name
names a control-name in the CONTROL clause.
5.8.45 – UNDERLINE
The UNDERLINE clause specifies that each character of the field is underlined when it is displayed on the screen. Format - UNDERLINE
5.8.46 – USAGE
The USAGE clause specifies the internal format of a data item or represents the address of data in a COBOL program. Format - { BINARY } { COMPUTATIONAL } { COMP } { COMPUTATIONAL-1 } { COMP-1 } { COMPUTATIONAL-2 } [ USAGE IS ] { COMP-2 } { COMPUTATIONAL-3 } { COMP-3 } { DISPLAY } { INDEX } { PACKED-DECIMAL } { POINTER } { POINTER-64 }
5.8.47 – VALUE_IS
The VALUE IS clause defines the values associated with condition-names, the initial value of Working-Storage Section data items, the value of Report Section printable items, the compile-time initialization of variables to the address of data, and to external constants, and the constant values of literal screen items.
5.8.47.1 – 1format_lit
The VALUE IS clause defines the values associated with condition-names, the initial value of Working-Storage Section data items, the value of Report Section printable items, the compile-time initialization of variables to the address of data, and to external constants, and the constant values of literal screen items. Format 1 - VALUE IS lit
5.8.47.1.1 – lit
is a numeric or nonumeric literal. In a screen description entry, it is a nonnumeric literal.
5.8.47.2 – 2format THROUGH
The VALUE IS clause defines the values associated with condition-names, the initial value of Working-Storage Section data items, the value of Report Section printable items, the compile-time initialization of variables to the address of data, and to external constants. Format 2 - { VALUE IS } { { EXTERNAL external-name } { VALUES ARE } { { REFERENCE data-name } { { low-val } [ { THRU } { EXTERNAL external-name } ] } [ { THROUGH } { REFERENCE data-name } ] } ... { high-val } ] }
5.8.47.2.1 – low-val
is a numeric or nonnumeric literal. It is the lowest value in a range of values associated with a condition-name in a level 88 data description entry.
5.8.47.2.2 – high-val
is a numeric or nonnumeric literal. It is the highest value in a range of values associated with a condition-name in a level 88 data description entry.
5.8.47.2.3 – data-name
names a data item in the File or Working-Storage Section. Data-name may be qualified.
5.8.47.2.4 – external-name
names a COBOL link-time bound constant. It must define a word or longword integer value.
5.8.47.3 – 3format REFERENCE
The VALUE IS clause defines the values associated with condition-names, the initial value of Working-Storage Section data items, the value of Report Section printable items, the compile-time initialization of variables to the address of data, and to external constants. Format 3 - VALUE IS { REFERENCE data-name } { numeric-integer-lit }
5.8.47.3.1 – data-name
names a data item in the File or Working-Storage Section. Data-name may be qualified.
5.8.47.3.2 – numeric-integer-lit
is a positive numeric integer literal.
5.8.47.4 – 4format EXTERNAL
The VALUE IS clause defines the values associated with condition-names, the initial value of Working-Storage Section data items, the value of Report Section printable items, the compile-time initialization of variables to the address of data, and to external constants. Format 4 - VALUE IS EXTERNAL external-name
5.8.47.4.1 – external-name
names a COBOL link-time bound constant. It must define a word or longword integer value.
5.8.48 – VALUE_OF_ID
The VALUE OF ID clause specifies, replaces, or completes a file specification. Format - VALUE OF { ID } IS { file-name } { FILE-ID } { data-name }
5.8.48.1 – file-name
is a nonnumeric literal. It contains the full or partial file specification.
5.8.48.2 – data-name
is the data-name of an alphanumeric Working-Storage data item. It contains the full or partial file specification.
5.9 – rg_report-group-description-entry
The Report Group Description entry specifies the characteristics of a report group and of the individual items within a report group.
5.9.1 – 1format_01
The Report Group Description entry specifies the characteristics of a report group and of the individual items within a report group. Format 1 - 01 [ group-data-name ] [ LINE NUMBER IS { line-num [ ON NEXT PAGE ] } ] [ { PLUS line-num-plus } ] [ { next-group-line-num } ] [ NEXT GROUP IS { PLUS next-group-line-num-plus } ] [ { NEXT PAGE } ] [ { REPORT HEADING } } ] [ { RH } } ] [ { PAGE HEADING } } ] [ { PH } } ] [ { CONTROL HEADING } { control-head-name } } ] [ { CH } { FINAL } } ] [ TYPE IS { DETAIL } } ] [ { DE } } ] [ { CONTROL FOOTING } { control-foot-name } } ] [ { CF } { FINAL } } ] [ { PAGE FOOTING } } ] [ { PF } } ] [ { REPORT FOOTING } } ] [ { RF } } ] [ [ USAGE IS ] DISPLAY ] .
5.9.2 – 2format
The Report Group Description entry specifies the characteristics of a report group and of the individual items within a report group. Format 2 - level-number [ group-data-name ] [ LINE NUMBER IS { line-num [ ON NEXT PAGE ] } ] [ { PLUS line-num-plus } ] [ [ USAGE IS ] DISPLAY ] .
5.9.3 – 3format PIC
The Report Group Description entry specifies the characteristics of a report group and of the individual items within a report group. Format 3 - level-number [ group-data-name ] [ BLANK WHEN ZERO ] [ COLUMN NUMBER IS column-num ] [ GROUP INDICATE ] [ { JUSTIFIED } RIGHT ] [ { JUST } ] [ LINE NUMBER IS { line-num [ ON NEXT PAGE ] } ] [ { PLUS line-num-plus } ] { PICTURE } IS character-string { PIC } [ [ SIGN IS ] { LEADING } SEPARATE CHARACTER ] [ { TRAILING } ] { SOURCE IS source-name } { VALUE IS lit } { {SUM {sum-name} ... [UPON {detail-report-group-name} ... ]} ... } { [ RESET ON { control-foot-name } ] } { [ { FINAL } ] } [ [ USAGE IS ] DISPLAY ] .
5.10 – ss_screen-description-entry
A screen description entry describes a video form or a portion of a video form and specifies the attributes, behavior, size, and location of screen items within the video form. The screen description entry is referenced in the Procedure Division by the ACCEPT and DISPLAY statements
5.10.1 – 1format_group_screen
Format 1 - Group Screen Item level-number [ screen-name ] [ FILLER ] [ BLANK_SCREEN ] [ FOREGROUND-COLOR IS color-num-1 ] [ BACKGROUND-COLOR IS color-num-2 ] [ AUTO ] [ SECURE ] [ REQUIRED ] [ [ USAGE IS ] DISPLAY ] [ [ SIGN IS ] { LEADING } [ SEPARATE CHARACTER ] ] [ { TRAILING } ] [ FULL ] .
5.10.2 – 2format_literal_elementary
Format 2 - Elementary Screen Item level-number [ screen-name ] [ FILLER ] [ BLANK { LINE } ] [ { SCREEN } ] [ BELL ] [ BLINK ] [ ERASE { EOL } ] [ { EOS } ] [ HIGHLIGHT ] [ LOWLIGHT ] [ REVERSE-VIDEO ] [ UNDERLINE ] [ NUMBER IS [ PLUS ] { identifier-1 } ] [ { integer-1 } ] [ NUMBER IS [ PLUS ] {identifier-2 } ] [ { integer-2 } ] [ FOREGROUND-COLOR IS color-num-1 ] [ BACKGROUND-COLOR IS color-num-2 ] VALUE IS literal-1 .
5.10.3 – 3format_elementary
Format 3 - Elementary Screen Item level-number [ screen-name ] [ FILLER ] [ BLANK { LINE } ] [ { SCREEN } ] [ BELL ] [ BLINK ] [ ERASE { EOL } ] [ { EOS } ] [ HIGHLIGHT ] [ LOWLIGHT ] [ REVERSE-VIDEO ] [ UNDERLINE ] [ NUMBER IS [ PLUS ] { identifier-1 } ] [ { integer-1 } ] [ NUMBER IS [ PLUS ] { identifier-2 } ] [ { integer-2 } ] [ FOREGROUND-COLOR IS color-num-1 ] [ BACKGROUND-COLOR IS color-num-2 ] { USING identifier-3 } { PICTURE } IS picture-string-1 { {| FROM { identifier-4 } |} } { PIC } { {| { literal-1 } |} } { {| TO identiier-5 |} } [ [ USAGE IS ] DISPLAY ] [ BLANK WHEN ZERO ] [ { JUSTIFIED } RIGHT ] [ { JUST } ] [ [ SIGN IS ] { LEADING } [ SEPARATE CHARACTER ] ] [ { TRAILING } ] [ AUTO ] [ SECURE ] [ REQUIRED ] [ FULL ] .
5.11 – miscellaneous_topics
5.11.1 – data_division_entries
A Data Division entry begins with a level indicator or level-number and is followed, in order, by: 1) A space 2) The name of a data item or file connector or a screen item 3) A sequence of independent descriptive clauses 4) A separator period The level indicators are: FD (for file description entries) SD (for sort-merge file description entries) RD (for report file description entries) DB (for sub-schema entries) LD (for keeplist entries) Level indicators can begin anywhere to the right of Area A. Entries that begin with level-numbers are either called data description or screen description entries depending on their context. The level-number values for data description entries are 01 through 49, 66, 77, and 88. For screen description entries the level-number values are from 01 to 49.
5.11.2 – record_alignment_boundaries
The alignment boundaries for a record are shown in the following table. The boundary is the leftmost location of the one-, two-, four-, or eight-byte area. All boundaries are relative to the beginning of the record. +-----------------------------------------------+ |0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 2 2 2 2| SYNCHRONIZED clause |0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3| affects these |-----------------------------------------------| Data Types |B|B|B|B|B|B|B|B|B|B|B|B|B|B|B|B|B|B|B|B|B|B|B|B| v--------v--------v |---+---+---+---+---+---+---+---+---+---+---+---| |2by|2by|2by|2by|2by|2by|2by|2by|2by|2by|2by|2by|COMP PIC 9 to 9(4) |-------+-------+-------+-------+-------+-------| |4-byte |4-byte |4-byte |4-byte |4-byte |4-byte |COMP PIC 9(5) to 9(9) | | | |COMP-1 POINTER INDEX |---------------+---------------+---------------| |8-byte |8-byte |8-byte |<-----+ +-----------------------------------------------+ | COMP-2 COMP PIC 9(10) to 9(18)
6 – PROCEDURE_DIVISION
The Procedure Division contains the routines that process the files and data described in the Environment and Data Divisions.
6.1 – 1format_declaratives
The Procedure Division contains the routines that process the files and data described in the Environment and Data Divisions. Format 1 - [ PROCEDURE DIVISION [ USING {data-name} ... ] [ GIVING identifier ] . [ DECLARATIVES. { section-name SECTION [ segment-number ] . declarative-sentence [ paragraph-name. [sentence] ... ] ... } ... END DECLARATIVES. ] { section-name SECTION [ segment-number ] . [ paragraph-name. [sentence] ... ] ... } ... ]
6.2 – 2format
The Procedure Division contains the routines that process the files and data described in the Environment and Data Divisions. Format 2 - [ PROCEDURE DIVISION [ USING {data-name} ... ] [ GIVING identifier ] ] . [ paragraph-name. [sentence] ... ] ... ]
6.3 – miscellaneous_topics
6.3.1 – arithmetic-expressions
An arithmetic expression can be one of the following: 1) An identifier (including function-identifier) of a numeric elementary item 2) A numeric literal 3) Two or more of the above choices separated by arithmetic operators (+, -, *, /, **) 4) Two or more arithmetic expressions separated by an arithmetic operator (+, -, *, /, **) 5) An arithmetic expression enclosed in parentheses A unary operator (a sign) can precede any arithmetic expression. The identifiers and literals in an arithmetic expression must represent either: (1) numeric elementary items (including functions), or (2) numeric literals on which arithmetic can be performed.
6.3.2 – conditional_expressions
A conditional expression specifies a condition the program must evaluate to determine the path of program flow.
6.3.2.1 – abbreviated
When you combine simple or negated simple conditions in a consecutive sequence, you can abbreviate any of the relation conditions except the first. You can do this by either: 1) Omitting the subject of the relation condition 2) Omitting both the subject and the relational operator of the condition A relation condition in the consecutive sequence must contain a subject (or subject and relational operator) that is common with the preceding relation condition. There must be no parentheses in the consecutive sequence. Format - relation-condition { { AND } [NOT] [relational-operator] object } ... { { OR } }
6.3.2.2 – class
The class condition tests whether the contents of an operand are numeric or alphabetic. It also determines if an alphabetic operand contains only uppercase or only lowercase characters or if the operand is a class-name. Format - { NUMERIC } identifier-1 IS [ NOT ] { ALPHABETIC } { ALPHABETIC-LOWER } { ALPHABETIC-UPPER } { class-name }
6.3.2.2.1 – identifier-1
Identifier-1 must reference a data item whose usage is explicitly or implicitly DISPLAY. If identifier-1 is a function-identifier, it must reference an alphanumeric function.
6.3.2.2.2 – class-name
is the user-defined word for a class. It always possesses the global attribute
6.3.2.3 – combined_and_negated_combined
A combined condition results from connecting conditions with one of the logical operators AND or OR. Format - condition { { AND } condition } ... { { OR } } condition can be 1) A simple condition 2) A negated simple condition 3) A combined condition 4) A negated combined condition 5) Valid combinations of the preceding conditions
6.3.2.4 – condition-name
The condition-name condition determines if a data item contains a value assigned to one of that item's condition-names. The term conditional variable refers to the data item. Condition-name refers to a level 88 entry associated with that item. Format - condition-name
6.3.2.5 – database_key_condition
Database conditions allow alternate paths of control depending on the truth value of a test involving conditions peculiar to the database environment. The database conditions are the tenancy, member, and database key conditions. The database key condition determines whether: (1) two database key values identify the same database record, (2) a database key value is null, or (3) a database key value is identical to any database key value in a keeplist. Format - { ALSO database-key } database-key IS [ NOT ] { NULL } { WITHIN keeplist-name } database-key references a currency indicator or a keeplist entry in the Sub-Schema Section.
6.3.2.6 – member_database_condition
Database conditions allow alternate paths of control depending on the truth value of a test involving conditions peculiar to the database environment. The database conditions are the tenancy, member, and database key conditions. The member condition determines whether member records are present in one or more sets. Only member record types defined in the Sub-Schema Section are considered in determining the truth value of the condition. Format - [ set-name IS ] [ NOT ] EMPTY set-name is a subschema set name.
6.3.2.7 – negated_simple
The logical operator NOT negates a simple condition. The truth value of a negated simple condition is the opposite of the simple condition's truth value. Thus, the truth value of a negated simple condition is true only if the simple condition's truth value is false. It is false only if the simple condition's truth value is true. Format - NOT simple-condition
6.3.2.8 – relation
A relation condition states a relation between two operands. The program compares the operands to determine whether the stated relation is true or false. The first operand is called the condition's subject. The second operand is called its object. Either operand can be: (1) an identifier, (2) a literal, or (3) the value of an arithmetic expression. The set of words that specifies the type of comparison is called the relational operator. Format - {IS [NOT] GREATER THAN } {IS [NOT] > } {IS [NOT] LESS THAN } {identifier-1 } {IS [NOT] < } {identifier-2 } {literal-1 } {IS [NOT] EQUAL TO } {literal-2 } {arith-express-1} {IS [NOT] = } {arith-express-2} {IS GREATER THAN OR EQUAL TO} {IS >= } {IS LESS THAN OR EQUAL TO } {IS <= }
6.3.2.9 – sign
The sign condition determines if the algebraic value of an arithmetic expression is less than, greater than, or equal to zero. Format - { POSITIVE } arithmetic-expression IS [ NOT ] { NEGATIVE } { ZERO }
6.3.2.10 – success-failure
This condition tests the return status codes of COBOL and non-COBOL procedures for success or failure conditions. Format - status-code-id IS { SUCCESS } { FAILURE } status-code-id must be a word or longword COMP integer as represented by PIC S9(1 to 9) COMP.
6.3.2.11 – switch-status
The switch-status condition tests the "on" or "off" setting of an external logical program switch. Format - condition-name
6.3.2.12 – tenancy_database_condition
Database conditions allow alternate paths of control depending on the truth value of a test involving conditions peculiar to the database environment. The database conditions are the tenancy, member, and database key conditions. The tenancy conditions determine whether a record in the database is an owner, or member, or a tenant in one or more sets. Format - { OWNER } [ NOT ] [ set-name ] { MEMBER } { TENANT } set-name is a subschema set name.
6.3.3 – database_key_identifiers
Database key identifiers are in Record Selection Expressions. If a database exception condition occurs during the execution of a FETCH or FIND statement, the Database Control System (DBCS) places a database exception condition code in the special register DB-CONDITION. This code identifies the condition. The DBCS also places the record name of database-record in the special register DB-CURRENT-RECORD-NAME and its UID in DB-CURRENT-RECORD-ID. Format 1 - Currency Indicator Access [ { record-name } ] CURRENT [ WITHIN { set-name } ] [ { realm-name } ] Format 2 - Keeplist Access { OFFSET integer-exp } { FIRST } WITHIN keeplist-name { LAST }
6.3.4 – declaratives
Declaratives specify procedures to be executed only when certain conditions occur. You must write declarative procedures at the beginning of the Procedure Division in consecutive sections. The key word DECLARATIVES begins the declaratives part of the Procedure Division; the pair of key words END DECLARATIVES ends it. Each of these reserved word phrases must: (1) be on a line by itself, starting in Area A; and (2) be followed by a separator period. When you use declarative procedures, you must divide the remainder of the Procedure Division into sections. Format - [ DECLARATIVES. { section-name SECTION [ segment-number ] . declarative-sentence [ paragraph-name. [sentence] ... ] ... } ... END DECLARATIVES. ]
6.3.5 – I-O status
If a file description entry has a FILE STATUS clause, a value is placed in the two-character FILE STATUS data item during execution of a CLOSE, DELETE, OPEN, READ, REWRITE, START, UNLOCK, or WRITE statement. Two "keys" combine to form this value. Status Key 1 occupies the leftmost character position in the item and Status Key 2 occupies the rightmost position. In combination, the keys indicate the status of the input-output operation.
6.3.6 – identifiers
In Procedure Division rules, the term identifier means the complete specification of a data item. The term refers to all words required to make your reference to the item unique. To reference a data item that is a function, a function-identifier is used. Format 1 - data-name [qualification] [subscripting] [reference modification] Format 2 - data-name [qualification] [indexing] [reference modification] Format 3 - FUNCTION function-name [ ({argument}...) ] [reference modification]
6.3.7 – functions
A function (synonymous with intrinsic function) is a temporary data item that represents a value to be determined at the time the function is referenced during the execution of a statement. The value can be alphanumeric, numeric, or integer. A function-identifier is a syntactically correct combination of character strings and separators that uniquely references the data item resulting from the evaluation of a function. Functions are treated as elementary data items, but cannot be receiving operands. A function-identifier that references an alphanumeric function can be specified wherever an identifier is permitted and where a reference to a function is not specifically prohibited by general-format rules. An integer or numeric function can be used anywhere an arithmetic expression can be used, subject to certain restrictions. The general format of a function-identifier is as follows: FUNCTION function-name [({argument}... )] [reference-modifier] A function-name is one of the names listed below. Most function-names are key words but not reserved words (the exceptions are LENGTH, RANDOM, and SUM, which are reserved words, as is FUNCTION), and can be used in a program outside the context of a function. An argument is an identifier (including a function-identifier), a literal an arithmetic expression, or a table that complies with the specific rules governing the number, class, and category of arguments for the function. The arguments in an argument list may be separated by a comma; they are evaluated individually, from left to right. A reference-modifier can be specified only for alphanumeric functions. It specifies the beginning character position and optionally the length of the resulting data item. The functions are listed below. For a complete description of the functions, including their formats, see the chapter on Intrinsic Functions in the COBOL Reference Manual. ACOS LENGTH ORD-MIN* ANNUITY LOG PRESENT-VALUE* ARGCOUNT LOG10 RANDOM ASIN LOWER-CASE RANGE* ATAN MAX* REM CHAR MEAN* REVERSE COS MEDIAN* SIN CURRENT-DATE MIDRANGE* SQRT DATE-OF-INTEGER MIN* STANDARD-DEVIATION* DAY-OF-INTEGER MOD SUM* FACTORIAL NUMVAL TAN INTEGER NUMVAL-C UPPER-CASE INTEGER-OF-DATE ORD VARIANCE* INTEGER-OF-DAY ORD-MAX* WHEN-COMPILED INTEGER-PART *Functions which permit a variable number of arguments which may include occurring items subscripted by "ALL" for one or more of its dimensions. In addition, five new Y2K functions are documented in the release notes: YEAR-TO-YYYY DATE-TO-YYYYMMDD DAY-TO-YYYYDDD TEST-DATE-YYYYMMDD TEST-DAY-YYYYMMDD
6.3.8 – indexing
Indexing is a special subscripting procedure. In indexing, you use the INDEXED BY phrase of the OCCURS clause to assign an index-name to each table level. You then refer to a table element using the index-name as a subscript. Format - { data-name } ( { , index-name [ { + } literal-2 ] } ) { condition-name } ( { [ { - } ] } ... ) ( { , literal-1 } )
6.3.9 – phrases
6.3.9.1 – AT_END
The AT END phrase specifies the action your program takes when the AT END condition occurs. Format - AT END stment
6.3.9.2 – AT_END-OF-PAGE
The AT END-OF-PAGE phrase specifies the action your program takes when the AT END-OF-PAGE condition occurs. Format - AT END-OF-PAGE stment
6.3.9.3 – CORRESPONDING
The CORRESPONDING option allows you to specify group items as operands in order to use their corresponding subordinate items in an operation.
6.3.9.4 – FROM
Format 1 - record-name FROM identifier Format 2 - FROM { keeplist-name } ... Keeplist-name refers to a user-defined keeplist in the Sub-Schema Section. Record-name and identifier must not refer to the same storage area. After statement execution ends, the data in the area referenced by identifier is available to the program. The data is not available in the area referenced by record-name, unless there is an applicable SAME clause.
6.3.9.5 – INTO
The INTO phrase implicitly moves a current record from the record storage area into an identifier. Format - file-name INTO identifier
6.3.9.6 – INVALID_KEY
The INVALID KEY phrase specifies the action your program takes when an invalid key condition is detected for the file being processed. Format - INVALID KEY stment
6.3.9.7 – NOT_AT_END
The NOT AT END phrase specifies the action your program takes when the AT END condition does not occur. Format - NOT AT END stment
6.3.9.8 – NOT_AT_END-OF-PAGE
The NOT AT END-OF-PAGE phrase specifies the action your program takes when the AT END-OF-PAGE condition does not occur. Format - NOT AT END-OF-PAGE stment
6.3.9.9 – NOT_INVALID_KEY
The NOT INVALID KEY phrase specifies the action your program takes when an invalid key condition is not detected for the file being processed. Format - NOT INVALID KEY stment
6.3.9.10 – NOT ON ERROR database
The database on error exception condition occurs when the Database Control System (DBCS) encounters any database exception condition for any Data Manipulation Language (DML) statement. The NOT ON ERROR phrase in a DML statement allows the selection of an imperative statement sequence when any database exception condition does not occur. Format - NOT ON ERROR stment
6.3.9.11 – NOT_ON_EXCEPTION
The NOT ON EXCEPTION phrase allows execution of an imperative statement when an exception (or error) condition does not occur. Format - NOT ON EXCEPTION stment
6.3.9.12 – NOT_ON_OVERFLOW
The NOT ON OVERFLOW phrase allows you to specify an action for your program to take when an overflow condition does not exist. Format - NOT ON OVERFLOW stment
6.3.9.13 – NOT_ON_SIZE_ERROR
The NOT ON SIZE ERROR phrase allows you to specify an action for your program to take when a size error condition does not exist. Format - NOT ON SIZE ERROR stment
6.3.9.14 – ON ERROR database
The database on error exception condition occurs when the Database Control System (DBCS) encounters any database exception condition for any Data Manipulation Language (DML) statement. The ON ERROR phrase in a DML statement allows the selection of an imperative statement sequence when any database exception condition occurs. Format - ON ERROR stment
6.3.9.15 – ON_EXCEPTION
The ON EXCEPTION phrase allows execution of an imperative statement when an exception (or error) condition occurs. The ON EXCEPTION option of the CALL statement prevents control transfer of the CALL and triggers the execution of the imperative statement related to the CALL. The ON EXCEPTION option of the ACCEPT statement allows you to handle data entry errors when ACCEPTing into a numeric data field WITH CONVERSION. Format - ON EXCEPTION stment
6.3.9.16 – ON_OVERFLOW
The ON OVERFLOW phrase allows you to specify an action for your program to take when an overflow condition exists. Format - ON OVERFLOW stment
6.3.9.17 – ON_SIZE_ERROR
The ON SIZE ERROR phrase allows you to specify an action for your program to take when a size error condition exists. Format - ON SIZE ERROR stment
6.3.9.18 – RETAINING
The RETAINING clause specifies which currency indicators are not updated during the execution of the CONNECT, FETCH, FIND, MODIFY, RECONNECT, and STORE statements. Format - [ [ {| REALM |} ] ] [ RETAINING [ {| RECORD |} ] CURRENCY ] [ [ {| { SET [ set-name ] ... } |} ] ] [ [ {| { { set-name } ... } |} ] ] set-name is a subschema set name.
6.3.9.19 – ROUNDED
The rounding operation adds 1 to the absolute value of the low-order digit of the resultant identifier if the absolute value of the next least significant (lower-valued) digit of the intermediate data item is greater than or equal to 5. If you do not use the ROUNDED phrase, any excess low-order digits in the arithmetic result are truncated when the result is moved to the resultant identifier(s).
6.3.10 – qualification
A reference to a user-defined word is unique if: 1) no other name has the same spelling, including hyphenation, 2) it is a part of a REDEFINES clause (the reference following the word REDEFINES is unique because of clause placement), or 3) scoping rules make it unique. A name in a hierarchy of names can occur in more than one place in your program. Unless you are redefining it, you must refer to this nonunique name using one or more higher-level names in the hierarchy. These higher-level names are called qualifiers. Using them to achieve uniqueness of reference is called qualification. To make your reference unique, you need not specify all available qualifiers for a name, only the one(s) necessary to avoid ambiguity. You cannot use the same data-name as: 1) The name of an external record and as the name of any other external data item in any program contained within or containing the program describing the external data record. 2) The name of an item possessing the global attribute and as the name of any other data item in the program describing the global data item.
6.3.10.1 – 1format_file
Format 1 - { { { IN } data-name-2 } ... [ { IN } file-name ] } { data-name-1 }{ { { OF } } [ { OF } ] } { condition-name }{ { IN } file-name } { { OF } }
6.3.10.2 – 2format_paragraph
Format 2 - paragraph-name { IN } section-name { OF }
6.3.10.3 – 3format_text
Format 3 - text-name { IN } library-name { OF }
6.3.10.4 – 4format LINAGE
Format 4 - LINAGE-COUNTER { IN } file-name { OF }
6.3.10.5 – 5format PAGE LINE
Format 5 - { PAGE-COUNTER } { IN } report-name { LINE-COUNTER } { OF }
6.3.10.6 – 6format_report
Format 6 - { { IN } data-name-4 [ { IN } report-name ] } data-name-3 { { OF } [ { OF } ] } { { IN } report-name } { { OF } }
6.3.10.7 – 7format_screens
Format 7 - screen-name-1 { { OF } screen-name-2 } ... { { IN } }
6.3.10.8 – 8format RMS
Format 8 - { RMS-STS } { IN } file-name { RMS-STV } { OF } { RMS-FILENAME }
6.3.11 – record_selection_expressions
A record selection expression is used to select a record in the database. It can be used in a FETCH or FIND statement. The record thus selected becomes the current record of the run unit upon which subsequent statements may operate when accessing the database.
6.3.11.1 – 1format_database_key_identifier_access
This format selects a record by a database key value held by the Database Control System (DBCS) in a currency indicator or a keeplist entry. Format 1 - Database Key Identifier Access database-key-identifier
6.3.11.1.1 – database-key-identifier
identifies a record according to the rules of Database Key Identifiers.
6.3.11.2 – 2format_set_owner_access
This format selects the record that owns a set. Format 2 - Set Owner Access OWNER WITHIN set-name
6.3.11.2.1 – set-name
is a subschema set name. The Database Control System (DBCS) uses the currency indicator for set-name to choose the owner record of that set occurrence. A database exception condition occurs if set-name is a singular set (DB-CONDITION is set to DBM$_SINGTYP) or if the currency indicator for the set type is null (DB-CONDITION is set to DBM$_CSTYP_NULL).
6.3.11.3 – 3format_record_search_access
This format selects a record by its position within a collection of records and optionally by its record type and contents. Format 3 - Record Search Access { FIRST } { LAST } { NEXT } { PRIOR } { ANY } { DUPLICATE } { [ RELATIVE ] int-exp } [record-name] [ WITHIN { realm-name } ] [ USING { rec-key } ... ] [ { set-name } ] [ WHERE { bool-expres } ]
6.3.11.3.1 – int-exp
is an integer or arithmetic expression resulting in a longword integer value. It cannot be zero.
6.3.11.3.2 – realm-name
is a subschema realm name.
6.3.11.3.3 – record-name
is a subschema record name.
6.3.11.3.4 – set-name
is a subschema set name.
6.3.11.3.5 – rec-key
is a key data item within the subschema record occurrence. The same rec-key can appear only once in a given USING phrase.
6.3.11.3.6 – bool-expres
is a conditional expression that involves data items of the object record. It is used to specify additional requirements of a qualifying record. bool-expres: { bool-alt [ OR bool-alt ] ... } bool-alt: { simp-bool-rel [ AND simp-bool-rel ] ... } simp-bool-rel: { bool-condit } { NOT bool-expres } bool-condit: { { {[ NOT ] EQUAL TO } } } { { {[ NOT ] = } } } { { {[ NOT ] LESS THAN } } } { { IS {[ NOT ] < } } } { { {[ NOT ] GREATER THAN } } } { { {[ NOT ] > } } } { { id } { { GREATER THAN OR EQUAL TO } } { id } } { { lit } { { >= } } { lit } } { { { LESS THAN OR EQUAL TO } } } { { { <= } } } { { DOES {[ NOT ] CONTAIN } } } { { {[ NOT ] CONTAINS } } } { { {[ NOT ] MATCH } } } { { {[ NOT ] MATCHES } } }
6.3.11.3.6.1 – bool-alt
is one or more sub-expressions (simp-bool-rel). Pairs of sub-expressions are joined by the logical operator AND.
6.3.11.3.6.2 – simp-bool-rel
is a simple-condition (bool-condit), an expression, or the negation of either.
6.3.11.3.6.3 – bool-condit
a simple-condition is a relation involving two operands joined by a relational operator. At least one operand in each relation must be an item in the record being found or fetched.
6.3.11.4 – 4format_database_key_access
This format selects the record that is referred to by the database key value contained in the special register DB-KEY. Format 4 - Database Key Access DBKEY
6.3.12 – reference_modification
Reference modification defines a subset of a data item by specifying its leftmost character and length. Format 1 - data-name ( leftmost-character-position : [ length ] ) Format 2 - FUNCTION function-name [ ({argument}...) ] ( leftmost-character-position : [ length ] )
6.3.13 – segmentation
VSI COBOL programs execute in a virtual memory environment. Therefore, programs need not manage physical memory by overlaying Procedure Division code. In VSI COBOL, segmentation controls the assignment of Procedure Division sections to fixed or independent segments. The optional segment-number in the section header specifies the type of segment. Format - section-name SECTION [ segment-number ] .
6.3.13.1 – section-name
names a Procedure Division section.
6.3.13.2 – segment-number
must be an integer in the range 0 through 99. If there is no segment-number in a section header, the implied segment-number is 0.
6.3.13.3 – fixed_segments
Fixed segments appear to reside in memory at all times. A fixed segment is in its initial state the first time the program calls it. On later calls, the fixed segment is in its last-used state.
6.3.13.4 – independent_segments
The state of an independent segment depends on how and when it receives control.
6.3.14 – subscripting
Subscripts can appear only in references to individual elements in a list, or table, of like elements that do not have individual data-names. Format 1 - { data-name } ( { arithmetic-expression } ... ) { condition-name } Format 2 - { ALL } argument ( { integer-1 } { data-name [ {+|-} integer-2 ] } ... ) { index-name [ {+|-} integer-3 ] } In Format 2, argument is an intrinsic function argument that is allowed to be repeated a variable number of times. Note that Format 1 may also be used for intrinsic function arguments when ALL sub- scripts are not specified. In Format 2, when ALL is specified as a subscript, the effect is as if each table element associated with that subscript position were specified.
6.4 – ACCEPT
The ACCEPT statement makes low-volume data available to the program. The HP extensions to the ACCEPT statement (formats 3, 4 and 5) are COBOL language additions that facilitate video forms design and data handling.
6.4.1 – 1format FROM input
The ACCEPT statement makes low-volume data available to the program. The HP extensions to the ACCEPT statement (formats 3, 4 and 5) are COBOL language additions that facilitate video forms design and data handling. Format 1 - ACCEPT dest-item [FROM input-source] [ AT END stment ] [ NOT AT END stment ] [ END-ACCEPT ]
6.4.1.1 – dest-item
is the identifier of a data item into which data is accepted.
6.4.1.2 – input-source
is a mnemonic-name defined in the SPECIAL-NAMES paragraph of the Environment Division.
6.4.1.3 – stment
is an imperative statement executed for an AT END or NOT AT END condition.
6.4.2 – 2format FROM
The ACCEPT statement makes low-volume data available to the program. The HP extensions to the ACCEPT statement (formats 3, 4 and 5) are COBOL language additions that facilitate video forms design and data handling. Format 2 - { DATE [YYYYMMDD] } ACCEPT dest-item FROM { DAY [YYYYDDD] } { DAY-OF-WEEK } { TIME }
6.4.2.1 – dest-item
is the identifier of a data item into which data is accepted.
6.4.3 – 3format_screen_extensions
The ACCEPT statement makes low-volume data available to the program. The HP extensions to the ACCEPT statement (formats 3, 4 and 5) are COBOL language additions that facilitate video forms design and data handling. Format 3 - ACCEPT dest-item {| { line-num } |} {| FROM LINE NUMBER { line-id [ PLUS [ plus-num ] ] } |} {| { PLUS [ plus-num ] } |} {| { column-num } |} {| FROM COLUMN NUMBER { column-id [ PLUS [ plus-num ] ] } |} {| { PLUS [ plus-num ] } |} {| ERASE [TO END OF] { SCREEN } |} {| { LINE } |} {| WITH BELL |} {| UNDERLINED |} {| BOLD |} {| WITH BLINKING |} {| PROTECTED [| SIZE { prot-size-lit } |] |} {| [| { prot-size-item } |] |} {| [| WITH AUTOTERMINATE |] |} {| [| WITH EDITING |] |} {| [| WITH NO BLANK |] |} {| [| WITH FILLER prot-fill-lit |] |} {| WITH CONVERSION |} {| REVERSED |} {| WITH NO ECHO |} {| DEFAULT IS { def-src-lit } |} {| { def-src-item } |} {| { CURRENT VALUE } |} {| CONTROL KEY IN key-dest-item |} { [ ON EXCEPTION stment ] [ NOT ON EXCEPTION stment ] } { [ AT END stment ] [ NOT AT END stment ] } [ END-ACCEPT ]
6.4.3.1 – dest-item
is the identifier of a data item into which data is accepted.
6.4.3.2 – line-num
is a numeric literal that specifies a line position on the terminal screen. Line-num must be a positive integer. It cannot be zero.
6.4.3.3 – line-id
is the identifier of a data item that provides a line position on the terminal screen.
6.4.3.4 – column-num
is a numeric literal that specifies a column position on the terminal screen. Column-num must be a positive integer. It cannot be zero.
6.4.3.5 – column-id
is the identifier of a data item that provides a column position on the terminal screen.
6.4.3.6 – plus-num
is a numeric literal that increments the current value for line or column position, or that increments the value of line-id or column-id. Plus-num can be zero or a positive integer.
6.4.3.7 – prot-size-lit
is a numeric literal that specifies the maximum length of the video screen field into which data can be typed. Prot-size-lit must be a positive integer. It cannot be zero.
6.4.3.8 – prot-size-item
is the identifier of a numeric integer data item that specifies the maximum length of the video screen field into which data can be typed. It must be a positive integer; it cannot be zero.
6.4.3.9 – prot-fill-lit
is a single character alphanumeric literal that is used to initialize each character position of a protected video screen field into which data can be typed.
6.4.3.10 – def-src-lit
is a nonnumeric literal or a figurative constant. However, it cannot be the figurative constant ALL literal.
6.4.3.11 – def-src-item
is the identifier of an alphanumeric data item.
6.4.3.12 – key-dest-item
is the identifier of a data item that defines a control key. Key-dest-item must specify an alphanumeric data item at least four characters in length.
6.4.3.13 – stment
is an imperative statement executed for an AT END, NOT AT END, ON EXCEPTION or NOT ON EXCEPTION condition.
6.4.4 – 4format screen extensions CONTROL KEY
The ACCEPT statement makes low-volume data available to the program. The HP extensions to the ACCEPT statement (formats 3, 4 and 5) are COBOL language additions that facilitate video forms design and data handling. Format 4 - ACCEPT CONTROL KEY IN key-dest-item {| { line-num } |} {| FROM LINE NUMBER { line-id [ PLUS [ plus-num ] ] } |} {| { PLUS [ plus-num ] } |} {| { column-num } |} {| FROM COLUMN NUMBER { column-id [ PLUS [ plus-num ] ] } |} {| { PLUS [ plus-num ] } |} {| ERASE [TO END OF] { SCREEN } |} {| { LINE } |} {| WITH BELL |} { [ ON EXCEPTION stment ] [ NOT ON EXCEPTION stment ] } { [ AT END stment ] [ NOT AT END stment ] } [ END-ACCEPT ]
6.4.4.1 – line-num
is a numeric literal that specifies a line position on the terminal screen. Line-num must be a positive integer. It cannot be zero.
6.4.4.2 – line-id
is the identifier of a data item that provides a line position on the terminal screen.
6.4.4.3 – column-num
is a numeric literal that specifies a column position on the terminal screen. Column-num must be a positive integer. It cannot be zero.
6.4.4.4 – column-id
is the identifier of a data item that provides a column position on the terminal screen.
6.4.4.5 – plus-num
is a numeric literal that increments the current value for line or column position, or that increments the value of line-id or column-id. Plus-num can be zero or a positive integer.
6.4.4.6 – key-dest-item
is the identifier of a data item that defines a control key. Key-dest-item must specify an alphanumeric data item at least four characters in length.
6.4.4.7 – stment
is an imperative statement executed for an AT END, NOT AT END, ON EXCEPTION or NOT ON EXCEPTION condition.
6.4.5 – 5format_screen_section_extensions
The ACCEPT statement makes low-volume data available to the program. The HP extensions to the ACCEPT statement (formats 3, 4 and 5) are COBOL language additions that facilitate video forms design and data handling. Format 5 - ACCEPT screen-name [ {| LINE NUMBER { line-num } |} ] [ {| { line-id } |} ] [ AT {| |} ] [ {| COLUMN NUMBER { column-num } |} ] [ {| { column-id } |} ] [ ON EXCEPTION stment ] [ NOT ON EXCEPTION stment2 ] [ END-ACCEPT ]
6.4.5.1 – screen-name
is the name of a screen item defined in the SCREEN SECTION of the program.
6.4.5.2 – line-num
is a numeric literal that specifies a line position on the terminal screen. Line-num must be a positive integer. It cannot be zero.
6.4.5.3 – line-id
is the identifier of a data item that provides a line position on the terminal screen.
6.4.5.4 – column-num
is a numeric literal that specifies a column position on the terminal screen. Column-num must be a positive integer. It cannot be zero.
6.4.5.5 – column-id
is the identifier of a data item that provides a column position on the terminal screen.
6.4.5.6 – stment
is an imperative statement executed for an AT END, NOT AT END, ON EXCEPTION or NOT ON EXCEPTION condition.
6.5 – ADD
The ADD statement adds two or more numeric operands and stores the result.
6.5.1 – 1format TO
The ADD statement adds two or more numeric operands and stores the result. Format 1 - ADD { num } ... TO { rsult [ ROUNDED ] } ... [ ON SIZE ERROR stment ] [ NOT ON SIZE ERROR stment ] [ END-ADD ]
6.5.1.1 – num
is a numeric literal or the identifier of an elementary numeric item.
6.5.1.2 – rsult
is the identifier of an elementary numeric item. It is the resultant identifier.
6.5.1.3 – stment
is an imperative statement.
6.5.2 – 2format GIVING
The ADD statement adds two or more numeric operands and stores the result. Format 2 - ADD { num } ... TO { num } GIVING { rsult [ ROUNDED ] } ... [ ON SIZE ERROR stment ] [ NOT ON SIZE ERROR stment ] [ END-ADD ]
6.5.2.1 – num
is a numeric literal or the identifier of an elementary numeric item.
6.5.2.2 – rsult
is the identifier of an elementary numeric item or an elementary numeric edited item. It is the resultant identifier.
6.5.2.3 – stment
is an imperative statement.
6.5.3 – 3format CORRESPONDING
The ADD statement adds two or more numeric operands and stores the result. Format 3 - ADD { CORRESPONDING } grp-1 TO grp-2 [ ROUNDED ] { CORR } [ ON SIZE ERROR stment ] [ NOT ON SIZE ERROR stment ] [ END-ADD ]
6.5.3.1 – grp
is the identifier of a numeric group item.
6.5.3.2 – stment
is an imperative statement.
6.6 – ALTER
The ALTER statement changes the destination of a GO TO statement. Format - ALTER { proc TO [ PROCEED TO ] new-proc } ...
6.6.1 – proc
is the name of a paragraph that contains one sentence: a GO TO statement without the DEPENDING phrase.
6.6.2 – new-proc
is a procedure-name.
6.7 – CALL
The CALL statement transfers control to another program in the executable image. Format - CALL prog-name [ {{{ [BY REFERENCE] } }} [{{BY REFERENCE } }] ] [ {{{ BY CONTENT } }} [{{BY CONTENT } }] ] [USING{{{ BY DESCRIPTOR }{arg}...}} [{{BY DESCRIPTOR}{arg}...}] ... ] [ {{{ BY VALUE } }} [{{BY VALUE } }] ] [ { OMITTED } [ OMITTED ] ] [ GIVING function-res ] { [ ON EXCEPTION stment ] [ NOT ON EXCEPTION stment ] } { [ ON OVERFLOW stment ] [ NOT ON OVERFLOW stment ] } [ END-CALL ]
6.7.1 – prog-name
is a nonnumeric literal or the identifier of an alphanumeric data item. It is the name of the program to which control transfers.
6.7.2 – arg
is the argument. It identifies the data that is available to both the calling and called programs. It is any data item described in the File Section, Working-Storage Section, or Linkage Section, or it is a nonnumeric literal. It must not be a function-identifier.
6.7.3 – function-res
is the identifier of an elementary integer numeric data item with COMP, COMP-1, or COMP-2 usage and no scaling positions. Function-res can be subscripted, and it can be qualified. When control returns to the calling program, function-res can contain a function result.
6.7.4 – stment
is an imperative statement.
6.8 – CANCEL
The CANCEL statement removes the logical relationship to another program. Format - CANCEL { prog-name } ...
6.8.1 – prog-name
is a nonumeric literal or the identifier of an alphanumeric data item. It contains the program-name of the program to be cancelled.
6.9 – CLOSE
The CLOSE statement ends processing of reels (or units) and files. It can also perform rewind, lock, and removal operations. Format - { [ { REEL } [ FOR REMOVAL ] ] } CLOSE { file-name [ { UNIT } [ WITH NO REWIND ] ] } ... { [ WITH { NO REWIND } ] } { [ { LOCK } ] }
6.9.1 – file-name
is the name of a file described in the Data Division. It cannot be a sort or merge file.
6.10 – COMMIT
The COMMIT statement ends your database transaction, makes permanent all changes made to the database since the last quiet point, and establishes a new quiet point for this run unit. Format - COMMIT [ RETAINING ] [ ON ERROR stment ] [ NOT ON ERROR stment ] [ END-COMMIT ]
6.10.1 – stment
is an imperative statement.
6.11 – COMPUTE
The COMPUTE statement evaluates an arithmetic expression and stores the result. Format - COMPUTE { rsult [ ROUNDED ] } ... = arithmetic-expression [ ON SIZE ERROR stment ] [ NOT ON SIZE ERROR stment ] [ END-COMPUTE ]
6.11.1 – rsult
is the identifier of an elementary numeric item or an elementary numeric edited item. It is the resultant identifier.
6.11.2 – stment
is an imperative statement.
6.12 – CONNECT
The CONNECT statement inserts the current record of the run unit as a member record into one or more sets. The set occurrence for each insertion is determined by the currency indicator for the corresponding set type. Format - CONNECT [ record-name ] TO { { set-name } ... } { ALL } [ [{| REALM |}] ] [ RETAINING [{| RECORD |}] CURRENCY ] [ [{| { SET [ set-name ] ... } |}] ] [ [{| { { set-name } ... } |}] ] [ ON ERROR stment ] [ NOT ON ERROR stment ] [ END-CONNECT ]
6.12.1 – record-name
names a subschema record type.
6.12.2 – set-name
names a subschema set type.
6.12.3 – stment
is an imperative statement.
6.13 – CONTINUE
The CONTINUE statement indicates that no executable statement is present. It causes an implicit control transfer to the next executable statement. Format - CONTINUE
6.14 – DELETE
The DELETE statement logically removes a record from a mass storage file. Format - DELETE file-name RECORD [ INVALID KEY stment ] [ NOT INVALID KEY stment ] [ END-DELETE ]
6.14.1 – file-name
is the name of a relative or indexed file described in the Data Division. It cannot be the name of a sequential file or a sort or merge file.
6.14.2 – stment
is an imperative statement.
6.15 – DISCONNECT
The DISCONNECT statement logically removes the current record of the run unit from one or more sets. Format - DISCONNECT [record-name] FROM { { set-name } ... } { ALL } [ ON ERROR stment ] [ NOT ON ERROR stment ] [ END-DISCONNECT ]
6.15.1 – record-name
names a subschema record type.
6.15.2 – set-name
names a subschema set type.
6.15.3 – stment
is an imperative statement.
6.16 – DISPLAY
The DISPLAY statement transfers low-volume data from the program to the default system output device or to the object of a mnemonic-name. The HP extensions to the DISPLAY statement, Formats 2 and 3, are COBOL language additions that facilitate video forms design and data handling. Format 4 sets a program variable to the current command line argument number to read with a Format 7 ACCEPT. Format 5 sets the name of an environment variable or system logical while Format 6 sets the value of an environment variable or system logical.
6.16.1 – 1format_statement
The DISPLAY statement transfers low-volume data from the program to the default system output device or to the object of a mnemonic-name. The HP extensions to the DISPLAY statement (formats 2 and 3) are COBOL language additions that facilitate video forms design and data handling. Format 1 - DISPLAY { src-item } ... [ UPON output-dest ] [ WITH NO ADVANCING ] [ WITH CONVERSION] [ END-DISPLAY ]
6.16.1.1 – src-item
is a literal or the identifier of a data item. The literal can be any figurative constant including ALL literal.
6.16.1.2 – output-dest
is a mnemonic-name defined in the SPECIAL-NAMES paragraph of the Environment Division.
6.16.2 – 2format_screen_extensions
The DISPLAY statement transfers low-volume data from the program to the default system output device or to the object of a mnemonic-name. The HP extensions to the DISPLAY statement (formats 2 and 3) are COBOL language additions that facilitate video forms design and data handling. Format 2 - DISPLAY { src-item [{| { line-num } |}] } [{| AT LINE NUMBER { line-id [ PLUS [ plus-num ] ] } |}] } [{| { PLUS [ plus-num ] } |}] } [{| { column-num } |}] } [{| AT COLUMN NUMBER { column-id [ PLUS [ plus-num ] ] } |}] } [{| { PLUS [ plus-num ] } |}] } [{| ERASE [TO END OF] { SCREEN } |}] } ... [{| { LINE } |}] } [{| WITH BELL |}] } [{| UNDERLINED |}] } [{| BOLD |}] } [{| WITH BLINKING |}] } [{| REVERSED |}] } [{| WITH CONVERSION |}] } [ WITH NO ADVANCING ] [ END-DISPLAY ]
6.16.2.1 – src-item
is a literal or the identifier of a data item. The literal can be any figurative constant except ALL literal.
6.16.2.2 – output-dest
is a mnemonic-name defined in the SPECIAL-NAMES paragraph of the Environment Division.
6.16.2.3 – line-num
is a numeric literal that specifies a line position on the terminal screen. Line-num must be a positive integer. It cannot be zero.
6.16.2.4 – line-id
is the identifier of a data item that provides a line position on the terminal screen.
6.16.2.5 – column-num
is a numeric literal that specifies a column position on the terminal screen. Column-num must be a positive integer. It cannot be zero.
6.16.2.6 – column-id
is the identifier of a data item that provides a column position on the terminal screen.
6.16.2.7 – plus-num
is a numeric literal that increments the current value for line or column position, or that increments the value of line-id or column-id. Plus-num can be zero or a positive integer.
6.16.3 – 3format_screen_section_extensions
The DISPLAY statement transfers low-volume data from the program to the default system output device or to the object of a mnemonic-name. The HP extensions to the DISPLAY statement (formats 2 and 3) are COBOL language additions that facilitate video forms design and data handling. Format 3 - DISPLAY screen-name [ {| LINE NUMBER { line-num } |} ] [ {| { line-id } |} ] [ AT {| |} ] [ {| COLUMN NUMBER { column-num } |} ] [ {| { column-id } |} ] [ END-DISPLAY ]
6.16.3.1 – screen-name
is the name of a screen item defined in the SCREEN SECTION of the program.
6.16.3.2 – line-num
is a numeric literal that specifies a line position on the terminal screen. Line-num must be a positive integer. It cannot be zero.
6.16.3.3 – line-id
is the identifier of a data item that provides a line position on the terminal screen.
6.16.3.4 – column-num
is a numeric literal that specifies a column position on the terminal screen. Column-num must be a positive integer. It cannot be zero.
6.16.3.5 – column-id
is the identifier of a data item that provides a column position on the terminal screen.
6.16.4 – 4format_arg_position_extensions
When a Format 4 DISPLAY statement is specified, the value stored in arg-position is moved to argument-number. This updates the current argument position indicator for the command line. See ARGUMENT-NUMBER in the SPECIAL-NAMES paragraph. This point to to selected argument to be read by a Format 7 ACCEPT statement. Format 4 - DISPLAY arg-position UPON argument-number [ END-DISPLAY ]
6.16.4.1 – arg-position
is a literal or identifier that specifies the desired argument position on the run command line. It must be an unsigned integer.
6.16.4.2 – argument-number
is a mnemonic name associated with argument-number in the SPECIAL-NAMES paragraph in the Environment Division, representing the name of an environment variable or system logical.
6.16.5 – 5format_envlog_name_extensions
When a Format 5 DISPLAY statement is specified, the value stored in envlog-name is moved to environment-name. See ENVIRONMENT-NAME in the SPECIAL-NAMES paragraph. The updated value of environment-name becomes the environment variable or logical to be accessed by subsequent Format 6 DISPLAY and Format 8 ACCEPT statements. Format 5 - DISPLAY envlog-name UPON environment-name [ END-DISPLAY ]
6.16.5.1 – envlog-name
references an alphanumeric data item, or is a nonnumeric literal.
6.16.5.2 – environment-name
is a mnemonic name associated with ARGUMENT-NUMBER in the SPECIAL-NAMES paragraph in the Environment Division, representing the name of an environment variable or system logical.
6.16.5.3 – Example
Example of Formats 5 and 6. IDENTIFICATION DIVISION. PROGRAM-ID. SAMPLE. ENVIRONMENT DIVISION. CONFIGURATION SECTION. SPECIAL-NAMES. ENVIRONMENT-NAME IS NAME-OF-EVAR ENVIRONMENT-VALUE IS VALUE-OF-EVAR. DATA DIVISION. WORKING-STORAGE SECTION. 01 NAME-1 PIC X(20). 01 VALUE-ACCEPTED PIC X(20). PROCEDURE DIVISION. P1. * The name of the environment variable MOVE "TESTPATH1" TO NAME-1. * Create an environment with the name "TESTPATH1" DISPLAY NAME-1 UPON NAME-OF-EVAR. * Set the value of "TESTPATH1" DISPLAY "/USER/MYNAME" UPON VALUE-OF-EVAR. * Read the value of TESTPATH1 into a variable ACCEPT VALUE-ACCEPTED FROM VALUE-OF-EVAR. * Display the value of TESTPATH1" DISPLAY VALUE-ACCEPTED. STOP RUN.
6.16.6 – 6format_envlog_value_extensions
When a Format 6 DISPLAY statement is specified, environment-value receives the value stored in envlog-value. The environment variable or logical is the one named by a Format 5 DISPLAY statement. See ENVIRONMENT-VALUE in the SPECIAL-NAMES paragraph. Format 6 - DISPLAY envlog-value UPON environment-value [ ON EXCEPTION stment ] [ NOT ON EXCEPTION stment2 ] [ END-DISPLAY ]
6.16.6.1 – envlog-value
references an alphanumeric data item, or is a nonnumeric literal.
6.16.6.2 – environment-value
is a mnemonic name associated with ENVIRONMENT-VALUE in the SPECIAL-NAMES paragraph in the Environment Division, representing the contents of the variable associated with the ENVIRONMENT-NAME.
6.16.6.3 – Example
Example of Formats 5 and 6. IDENTIFICATION DIVISION. PROGRAM-ID. SAMPLE. ENVIRONMENT DIVISION. CONFIGURATION SECTION. SPECIAL-NAMES. ENVIRONMENT-NAME IS NAME-OF-EVAR ENVIRONMENT-VALUE IS VALUE-OF-EVAR. DATA DIVISION. WORKING-STORAGE SECTION. 01 NAME-1 PIC X(20). 01 VALUE-ACCEPTED PIC X(20). PROCEDURE DIVISION. P1. * The name of the environment variable MOVE "TESTPATH1" TO NAME-1. * Create an environment with the name "TESTPATH1" DISPLAY NAME-1 UPON NAME-OF-EVAR. * Set the value of "TESTPATH1" DISPLAY "/USER/MYNAME" UPON VALUE-OF-EVAR. * Read the value of TESTPATH1 into a variable ACCEPT VALUE-ACCEPTED FROM VALUE-OF-EVAR. * Display the value of TESTPATH1" DISPLAY VALUE-ACCEPTED. STOP RUN.
6.17 – DIVIDE
The DIVIDE statement divides one or more numeric data items by another. It stores the quotient and, for Formats 4 and 5, the remainder.
6.17.1 – 1format INTO
The DIVIDE statement divides one or more numeric data items by another. It stores the quotient. Format 1 - DIVIDE srcnum INTO { rsult [ ROUNDED ] } ... [ ON SIZE ERROR stment ] [ NOT ON SIZE ERROR stment ] [ END-DIVIDE ]
6.17.1.1 – srcnum
is a numeric literal or the identifier of an elementary numeric item.
6.17.1.2 – rsult
is the identifier of an elementary numeric item. It is the resultant identifier.
6.17.1.3 – stment
is an imperative statement.
6.17.2 – 2format INTO GIVING
The DIVIDE statement divides one or more numeric data items by another. It stores the quotient. Format 2 - DIVIDE srcnum INTO srcnum GIVING { rsult [ ROUNDED ] } ... [ ON SIZE ERROR stment ] [ NOT ON SIZE ERROR stment ] [ END-DIVIDE ]
6.17.2.1 – srcnum
is a numeric literal or the identifier of an elementary numeric item.
6.17.2.2 – rsult
is the identifier of an elementary numeric item or an elementary numeric edited item. It is the resultant identifier.
6.17.2.3 – stment
is an imperative statement.
6.17.3 – 3format BY GIVING
The DIVIDE statement divides one or more numeric data items by another. It stores the quotient. Format 3 - DIVIDE srcnum BY srcnum GIVING { rsult [ ROUNDED ] } ... [ ON SIZE ERROR stment ] [ NOT ON SIZE ERROR stment ] [ END-DIVIDE ]
6.17.3.1 – srcnum
is a numeric literal or the identifier of an elementary numeric item.
6.17.3.2 – rsult
is the identifier of an elementary numeric item or an elementary numeric edited item. It is the resultant identifier.
6.17.3.3 – stment
is an imperative statement.
6.17.4 – 4format INTO with REMAINDER
The DIVIDE statement divides one or more numeric data items by another. It stores the quotient and remainder. Format 4 - DIVIDE srcnum INTO srcnum GIVING rsult [ ROUNDED ] REMAINDER remaind [ ON SIZE ERROR stment ] [ NOT ON SIZE ERROR stment ] [ END-DIVIDE ]
6.17.4.1 – srcnum
is a numeric literal or the identifier of an elementary numeric item.
6.17.4.2 – rsult
is the identifier of an elementary numeric item or an elementary numeric edited item. It is the resultant identifier.
6.17.4.3 – remaind
is the identifier of an elementary numeric item or an elementary numeric edited item.
6.17.4.4 – stment
is an imperative statement.
6.17.5 – 5format BY with REMAINDER
The DIVIDE statement divides one or more numeric data items by another. It stores the quotient and remainder. Format 5 - DIVIDE srcnum BY srcnum GIVING rsult [ ROUNDED ] REMAINDER remaind [ ON SIZE ERROR stment ] [ NOT ON SIZE ERROR stment ] [ END-DIVIDE ]
6.17.5.1 – srcnum
is a numeric literal or the identifier of an elementary numeric item.
6.17.5.2 – rsult
is the identifier of an elementary numeric item or an elementary numeric edited item. It is the resultant identifier.
6.17.5.3 – remaind
is the identifier of an elementary numeric item or an elementary numeric edited item.
6.17.5.4 – stment
is an imperative statement.
6.18 – ERASE
The ERASE statement deletes the current record of the run unit from the database. Additional records owned by the current record may also be deleted and/or disconnected. Format - ERASE [ ALL ] [ record-name ] [ ON ERROR stment ] [ NOT ON ERROR stment ] [ END-ERASE ]
6.18.1 – record-name
names a subschema record type.
6.18.2 – stment
is an imperative statement.
6.19 – EVALUATE
The EVALUATE statement selects a program action based on the evaluation of one or more conditions. Format - { subj-item } [ { subj-item } ] EVALUATE { TRUE } [ ALSO { TRUE } ] ... { FALSE } [ { FALSE } ] { { { ANY } { { { cond } { {WHEN{ TRUE } { { { FALSE } { { { [NOT] {obj-item [{THRU } obj-item]} } { { { { [{THROUGH} ]} } [ { ANY }] } } [ { cond }] } } [ALSO { TRUE }] ... } ... stment} ... [ { FALSE }] } } [ { [NOT] {obj-item [{THRU } obj-item]}}] } } [ { { [{THROUGH} ]}}] } } [ WHEN OTHER stment ] [ END-EVALUATE ]
6.19.1 – subj-item
is an identifier, an arithmetic or conditional expression, or a literal other than the figurative constant ZERO.
6.19.2 – cond
is a conditional expression.
6.19.3 – obj-item
is a literal, an identifier, or an arithmetic expression.
6.19.4 – stment
is an imperative statement.
6.20 – EXIT
The EXIT statement provides a common logical end point for a series of procedures. The EXIT PROGRAM statement marks the logical end of a called program.
6.20.1 – 1statement
The EXIT statement provides a common logical end point for a series of procedures. Format - EXIT
6.20.2 – 2statement PROGRAM
The EXIT PROGRAM statement marks the logical end of a called program. Format - EXIT PROGRAM
6.21 – FETCH
The FETCH statement is a combined FIND and GET that establishes a specific record in the database as the current record of the run unit and makes the record available to the run unit in the User Work Area. Format - FETCH database-record [ FOR UPDATE ] [ [{| REALM |}] ] [RETAINING [{| RECORD |}] CURRENCY] [ [{| { SET [ set-name ] ... } |}] ] [ [{| { { set-name } ... } |}] ] [{ [ AT END stment ] [ NOT AT END stment ] } ] [{ [ ON ERROR stment ] [ NOT ON ERROR stment ] } ] [ END-FETCH ]
6.21.1 – database-record
represents a record selection expression. References are made to a record in the data-base according to the rules for Record Selection Expressions.
6.21.2 – set-name
names a subschema set type.
6.21.3 – stment
is an imperative statement.
6.22 – FIND
The FIND statement locates a specific record in the database and establishes it as the current record of the run unit. The FIND ALL statement locates zero or more records in the database and inserts them into the named keeplist.
6.22.1 – 1format
The FIND statement locates a specific record in the database and establishes it as the current record of the run unit. Format 1 - FIND database-record [ FOR UPDATE ] [ [{| REALM |}] ] [RETAINING [{| RECORD |}] CURRENCY] [ [{| { SET [ set-name ] ... } |}] ] [ [{| { { set-name } ... } |}] ] [{ [ AT END stment ] [ NOT AT END stment ] } ] [{ [ ON ERROR stment ] [ NOT ON ERROR stment ] } ] [ END-FIND ]
6.22.1.1 – database-record
represents a record selection expression. References are made to a record in the database according to the rules for Record Selection Expressions.
6.22.1.2 – set-name
names a subschema set type.
6.22.1.3 – stment
is an imperative statement.
6.22.2 – 2format ALL
The FIND ALL statement locates zero or more records in the database and inserts them into the named keeplist. Format 2 - FIND ALL keeplist-name [ record-name ] [ WITHIN { realm-name } ] [ { set-name } ] [ USING { rec-key } ... ] [ FOR UPDATE ] [ WHERE { bool-exp } ] [{ [ AT END stment ] [ NOT AT END stment ] } ] [{ [ ON ERROR stment ] [ NOT ON ERROR stment ] } ] [ END-FIND ]
6.22.2.1 – keeplist-name
names a keeplist in the Sub-Schema Section.
6.22.2.2 – record-name
is a subschema record name.
6.22.2.3 – realm-name
is a subschema realm name.
6.22.2.4 – set-name
is a subschema set name.
6.22.2.5 – rec-key
is a key data item within the subschema record occurrence. The same rec-key can appear only once in a given USING phrase.
6.22.2.6 – bool-exp
is a conditional expression that involves data items of the object record. It is used to specify additional requirements of a qualifying record.
6.22.2.7 – stment
is an imperative statement.
6.23 – FREE
The FREE statement empties selected keeplists or removes a database key value from a keeplist or currency indicator. Format - { [ { record-name } ] } { CURRENT [ WITHIN { set-name } ] } { [ { realm-name } ] } FREE { { OFFSET integer-exp } } { { FIRST } WITHIN keeplist-name } { { LAST } } { ALL [ { FROM { keeplist-name } ... } ] } { [ { CURRENT } ] } [ ON ERROR stment ] [ NOT ON ERROR stment ] [ END-FREE ]
6.23.1 – record-name
is a subschema record name.
6.23.2 – set-name
is a subschema set name.
6.23.3 – realm-name
is a subschema realm name.
6.23.4 – integer-exp
is an arithmetic expression or integer. It refers to a position in keeplist-name. Integer-exp cannot be zero.
6.23.5 – keeplist-name
names a keeplist in the Sub-Schema Section.
6.23.6 – stment
is an imperative statement.
6.24 – GENERATE
The GENERATE statement directs the Report Writer Control System (RWCS) to produce a report according to the Report Description entry (RD) in the Report Section of the Data Division. Format - GENERATE report-item
6.24.1 – report-item
names either a report-name in a Report Description entry, or the group-data-name of a TYPE IS DETAIL report group.
6.25 – GET
The GET statement moves the contents of the current database record of the run unit to your User Work Area. Format - GET [ record-name ] [ { record-item } ... ] [ ON ERROR stment ] [ NOT ON ERROR stment ] [ END-GET ]
6.25.1 – record-name
names a database subschema record type.
6.25.2 – record-item
is a group or elementary data item in a subschema record type. Record-item may be qualified.
6.25.3 – stment
is an imperative statement.
6.26 – GO_TO
The GO TO statement transfers control from one part of the Procedure Division to another.
6.26.1 – 1format
The GO TO statement transfers control from one part of the Procedure Division to another. Format 1 - GO TO [ proc-name ]
6.26.1.1 – proc-name
is a procedure-name.
6.26.2 – 2format DEPENDING
The GO TO statement transfers control from one part of the Procedure Division to another. Format 2 - GO TO { proc-name } ... DEPENDING ON num
6.26.2.1 – proc-name
is a procedure-name.
6.26.2.2 – num
is the identifier of an elementary numeric item described with no positions to the right of the assumed decimal point.
6.27 – IF
The IF statement evaluates a condition. The condition's truth value determines the program action that follows. Format - IF condition THEN { { stment-1 } ... } { NEXT SENTENCE } [ ELSE { stment-2 } ... [ END-IF ] ] [ ELSE NEXT SENTENCE ] [ END-IF ]
6.27.1 – stment
an imperative or conditional statement. An imperative statement can precede a conditional statement.
6.28 – INITIALIZE
The INITIALIZE statement sets selected types of data fields to predetermined values. Format - INITIALIZE { fld-name } ... [ { { ALPHABETIC } } ] [ { { ALPHANUMERIC } } ] [ REPLACING { { NUMERIC } DATA BY val } ... ] [ { { ALPHANUMERIC-EDITED } } ] [ { { NUMERIC-EDITED } } ]
6.28.1 – fld-name
is the identifier of the receiving area data item.
6.28.2 – val
is the sending area. It can be a literal or the identifier of a data item.
6.29 – INITIATE
The INITIATE statement causes the Report Writer Control System (RWCS) to begin processing a report. Format - INITIATE { report-name } ...
6.29.1 – report-name
names a report defined by a Report Description entry (RD) in the Report Section of the Data Division.
6.30 – INSPECT
The INSPECT statement counts or replaces occurrences of single characters or groups of characters in a data item.
6.30.1 – 1format TALLYING
The INSPECT statement counts or replaces occurrences of single characters or groups of characters in a data item. Format 1 - INSPECT src-string TALLYING { { tally-ctr FOR { { { [ { BEFORE } ] } } { CHARACTERS [ { AFTER } INITIAL delim-val ] ... } ... } ... { { ALL } { { { LEADING } { compare-val [{ BEFORE } ] } } } [{ AFTER } INITIAL delim-val ] ... } ... } ... } ...
6.30.1.1 – src-string
is the identifier of a group item or an elementary data item with DISPLAY usage. INSPECT operates on the contents of this data item.
6.30.1.2 – tally-ctr
is the identifier of an elementary numeric data item.
6.30.1.3 – compare-val
is the character-string INSPECT uses for comparison. It is a nonnumeric literal (or figurative constant other than ALL literal) or the identifier of an elementary alphabetic, alphanumeric, or numeric data item with DISPLAY usage.
6.30.1.4 – delim-val
is the character-string that delimits the INSPECT operation. Its content restrictions are the same as those for compare-val.
6.30.2 – 2format REPLACING
The INSPECT statement counts or replaces occurrences of single characters or groups of characters in a data item. Format 2 - INSPECT src-string REPLACING { CHARACTERS BY replace-char [{ BEFORE } INITIAL delim-val] ... } { [{ AFTER } ] } { { ALL } } ... { { LEADING } { compare-val BY replace-val { { FIRST } [ { BEFORE } INITIAL delim-val ] ... } ... } [ { AFTER } ] } }
6.30.2.1 – src-string
is the identifier of a group item or an elementary data item with DISPLAY usage. INSPECT operates on the contents of this data item.
6.30.2.2 – compare-val
is the character-string INSPECT uses for comparison. It is a nonnumeric literal (or figurative constant other than ALL literal) or the identifier of an elementary alphabetic, alphanumeric, or numeric data item with DISPLAY usage.
6.30.2.3 – delim-val
is the character-string that delimits the INSPECT operation. Its content restrictions are the same as those for compare-val.
6.30.2.4 – replace-char
is the one-character item that replaces all characters. Its content restrictions are the same as those for compare-val.
6.30.2.5 – replace-val
is the character-string that replaces occurrences of compare-val. Its content restrictions are the same as those for compare-val.
6.30.3 – 3format TALLYING REPLACING
The INSPECT statement counts or replaces occurrences of single characters or groups of characters in a data item. Format 3 - INSPECT src-string TALLYING { { tally-ctr FOR { { { [ { BEFORE } ] } } { CHARACTERS [ { AFTER } INITIAL delim-val ] ... } ... } ... { { ALL } { { { LEADING } { compare-val { [{ BEFORE } ] } } } [{ AFTER } INITIAL delim-val ] ... } ... } ... } ... REPLACING { CHARACTERS BY replace-char [{ BEFORE } INITIAL delim-val] ... } { [{ AFTER } ] } { { ALL } } ... { { LEADING } { compare-val BY replace-val { { FIRST } [ { BEFORE } INITIAL delim-val ] ... } ... } [ { AFTER } ] } }
6.30.3.1 – src-string
is the identifier of a group item or an elementary data item with DISPLAY usage. INSPECT operates on the contents of this data item.
6.30.3.2 – tally-ctr
is the identifier of an elementary numeric data item.
6.30.3.3 – compare-val
is the character-string INSPECT uses for comparison. It is a nonnumeric literal (or figurative constant other than ALL literal) or the identifier of an elementary alphabetic, alphanumeric, or numeric data item with DISPLAY usage.
6.30.3.4 – delim-val
is the character-string that delimits the INSPECT operation. Its content restrictions are the same as those for compare-val.
6.30.3.5 – replace-char
is the one-character item that replaces all characters. Its content restrictions are the same as those for compare-val.
6.30.3.6 – replace-val
is the character-string that replaces occurrences of compare-val. Its content restrictions are the same as those for compare-val.
6.30.4 – 4format CONVERTING
The INSPECT statement counts or replaces occurrences of single characters or groups of characters in a data item. Format 4 - INSPECT src-string CONVERTING compare-chars TO convert-chars [ { BEFORE } INITIAL delim-val ] ... [ { AFTER } ]
6.30.4.1 – src-string
is the identifier of a group item or an elementary data item with DISPLAY usage. INSPECT operates on the contents of this data item.
6.30.4.2 – delim-val
is the character-string that delimits the INSPECT operation. Its content restrictions are the same as those for compare-val.
6.30.4.3 – compare-chars
is the string that contains the individual characters that convert to those in convert-chars. It is the same kind of item as compare-val.
6.30.4.4 – convert-chars
is the string that contains the individual characters to which the characters in compare-chars convert. It is the same kind of item as compare-val.
6.31 – KEEP
The KEEP statement inserts a database key value from a currency indicator or keeplist into a keeplist. Format - [ [ { record-name } ] ] [ CURRENT [ WITHIN { set-name } ] ] [ [ { realm-name } ] ] KEEP [ { OFFSET integer-exp } ] [ { FIRST } WITHIN keeplist-name ] [ { LAST } ] USING destination-keeplist [ ON ERROR stment ] [ NOT ON ERROR stment ] [ END-KEEP ]
6.31.1 – record-name
is a subschema record name.
6.31.2 – set-name
is a subschema set name.
6.31.3 – realm-name
is a subschema realm name.
6.31.4 – integer-exp
is an arithmetic expression or integer. It refers to a position in keeplist-name. Integer-exp cannot be zero.
6.31.5 – keeplist-name
names a keeplist in the Sub-Schema Section.
6.31.6 – destination-keeplist
names a keeplist in the Sub-Schema Section to receive the database key value.
6.31.7 – stment
is an imperative statement.
6.32 – MERGE
The MERGE statement takes two or more identically sequenced files and combines them according to the key values you specify. During the process, it makes records available, in merged order, to routines in OUTPUT PROCEDURE or to an output file. Format - MERGE mergefile { ON { ASCENDING } KEY { mergekey } ... } ... { { DESCENDING } } [ COLLATING SEQUENCE IS alpha ] USING infile { infile } ... { OUTPUT PROCEDURE IS first-proc [ { THRU } end-proc ] } { [ { THROUGH } ] } { GIVING { outfile } ... }
6.32.1 – mergefile
is a file-name described in a sort-merge file description (SD) entry in the Data Division.
6.32.2 – mergekey
is the data-name of a data item in a record associated with mergefile.
6.32.3 – alpha
is an alphabet-name defined in the SPECIAL-NAMES paragraph of the Environment Division.
6.32.4 – infile
is the file-name of an input file. It must be described in a file description (FD) entry in the Data Division.
6.32.5 – first-proc
is the section-name or paragraph-name of the output procedure's first (or only) section or paragraph.
6.32.6 – end-proc
is the section-name or paragraph-name of the output procedure's last section or paragraph.
6.32.7 – outfile
is the file-name of an output file. It must be described in a file description (FD) entry in the Data Division.
6.33 – MODIFY
The MODIFY statement changes the contents of specified data items in a database record. Format - MODIFY [ record-name ] [ { record-item } ... ] [ [{| REALM |}] ] [RETAINING [{| RECORD |}] CURRENCY] [ [{| { SET [ set-name ] ... } |}] ] [ [{| { { set-name } ... } |}] ] [ ON ERROR stment ] [ NOT ON ERROR stment ] [ END-MODIFY ]
6.33.1 – record-name
names a database subschema record type.
6.33.2 – record-item
is a group or elementary data item in a subschema record type. Record-item can be qualified.
6.33.3 – set-name
names a subschema set type.
6.33.4 – stment
is an imperative statement.
6.34 – MOVE
The MOVE statement transfers data to one or more data areas. The editing rules control data transfer.
6.34.1 – 1format
The MOVE statement transfers data to one or more data areas. The editing rules control data transfer. Format 1 - MOVE { src-item } TO { dest-item } ... { lit }
6.34.1.1 – src-item
is an identifier that represents the sending area.
6.34.1.2 – lit
is a literal that represents the sending area.
6.34.1.3 – dest-item
is an identifier that represents the receiving area.
6.34.2 – 2format CORRESPONDING
The MOVE statement transfers data to one or more data areas. The editing rules control data transfer. Format 2 - MOVE { CORRESPONDING } src-item TO dest-item { CORR }
6.34.2.1 – src-item
is an identifier that represents the sending area.
6.34.2.2 – dest-item
is an identifier that represents the receiving area.
6.35 – MULTIPLY
The MULTIPLY statement multiplies two numeric operands and stores the result.
6.35.1 – 1format
The MULTIPLY statement multiplies two numeric operands and stores the result. Format 1 - MULTIPLY srcnum BY { rsult [ ROUNDED ] } ... [ ON SIZE ERROR stment ] [ NOT ON SIZE ERROR stment ] [ END-MULTIPLY ]
6.35.1.1 – srcnum
is a numeric literal or the identifier of an elementary numeric item.
6.35.1.2 – rsult
is the identifier of an elementary numeric item. It is the resultant identifier.
6.35.1.3 – stment
is an imperative statement.
6.35.2 – 2format GIVING
The MULTIPLY statement multiplies two numeric operands and stores the result. Format 2 - MULTIPLY srcnum BY srcnum GIVING { rsult [ ROUNDED ] } ... [ ON SIZE ERROR stment ] [ NOT ON SIZE ERROR stment ] [ END-MULTIPLY ]
6.35.2.1 – srcnum
is a numeric literal or the identifier of an elementary numeric item.
6.35.2.2 – rsult
is the identifier of an elementary numeric item or an elementary numeric edited item. It is the resultant identifier.
6.35.2.3 – stment
is an imperative statement.
6.36 – OPEN
The OPEN statement creates an access stream to the file, makes the file available to the program, begins the processing of a file, and specifies file sharing.
6.36.1 – 1format_sequential_relative_indexed
The OPEN statement creates an access stream to the file, makes the file available to the program, begins the processing of a file, and specifies file sharing. Format 1 - Sequential, Relative, Indexed { { [WITH LOCK ]} } { { [ {NO OTHERS }]} } { { [ {{|READERS |}}]} } {{INPUT }{file-name[WITH NO REWIND][ALLOWING {{|WRITERS |}}]}...} {{OUTPUT}{ [ {{|UPDATERS|}}]} } { { [ {ALL }]} } OPEN{ }... { { [WITH LOCK ]} } { { [ { NO OTHERS } ]} } { { [ { {| READERS |}} ]} } {{EXTEND}{ file-name [ALLOWING { {| WRITERS |}} ]}... } {{I-O }{ [ { {| UPDATERS |}} ]} } { { [ { ALL } ]} }
6.36.1.1 – file-name
is the name of a file described in the Data Division. It cannot be the name of a sort or merge file.
6.36.2 – 2format_report_writer
The OPEN statement creates an access stream to the file, makes the file available to the program, begins the processing of a file, and specifies file sharing. Format 2 - Report Writer OPEN { OUTPUT { file-name [ WITH NO REWIND ] } ... } ... { EXTEND { file-name } ... }
6.36.2.1 – file-name
is the name of a file described in the Data Division. It cannot be the name of a sort or merge file.
6.37 – PERFORM
The PERFORM statement executes one or more procedures. It returns control to the end of the PERFORM statement when procedure execution ends.
6.37.1 – 1format
The PERFORM statement executes one or more procedures. It returns control to the end of the PERFORM statement when procedure execution ends. Format 1 - PERFORM [first-proc [ { THRU } end-proc ]] [ [ { THROUGH } ]] [ stment END-PERFORM ]
6.37.1.1 – first-proc
is a procedure-name that identifies a paragraph or section in the Procedure Division. The set of statements in first-proc are the first (or only) set of statements in the PERFORM range.
6.37.1.2 – end-proc
is a procedure-name that identifies a paragraph or section in the Procedure Division. The set of statements in end-proc are the last set of statements in the PERFORM range.
6.37.1.3 – stment
is an imperative statement.
6.37.2 – 2format_repeat-count
The PERFORM statement executes one or more procedures. It returns control to the end of the PERFORM statement when procedure execution ends. Format 2 - PERFORM [first-proc [ { THRU } end-proc ]] repeat-count TIMES [ [ { THROUGH } ]] [ stment END-PERFORM ]
6.37.2.1 – first-proc
is a procedure-name that identifies a paragraph or section in the Procedure Division. The set of statements in first-proc are the first (or only) set of statements in the PERFORM range.
6.37.2.2 – end-proc
is a procedure-name that identifies a paragraph or section in the Procedure Division. The set of statements in end-proc are the last set of statements in the PERFORM range.
6.37.2.3 – stment
is an imperative statement.
6.37.2.4 – repeat-count
is a numeric integer literal or the identifier of a numeric integer elementary item. It controls how many times the statement set (or sets) executes.
6.37.3 – 3format UNTIL
The PERFORM statement executes one or more procedures. It returns control to the end of the PERFORM statement when procedure execution ends. Format 3 - PERFORM [first-proc [ { THRU } end-proc ]] [ WITH TEST { BEFORE } ] [ [ { THROUGH } ]] [ { AFTER } ] UNTIL cond [ stment END-PERFORM ]
6.37.3.1 – first-proc
is a procedure-name that identifies a paragraph or section in the Procedure Division. The set of statements in first-proc are the first (or only) set of statements in the PERFORM range.
6.37.3.2 – end-proc
is a procedure-name that identifies a paragraph or section in the Procedure Division. The set of statements in end-proc are the last set of statements in the PERFORM range.
6.37.3.3 – stment
is an imperative statement.
6.37.3.4 – cond
can be any conditional expression.
6.37.4 – 4format VARYING
The PERFORM statement executes one or more procedures. It returns control to the end of the PERFORM statement when procedure execution ends. Format 4 - PERFORM [first-proc [ { THRU } end-proc ]] [ WITH TEST { BEFORE } ] [ [ { THROUGH } ]] [ { AFTER } ] VARYING var FROM init BY increm UNTIL cond [ AFTER var FROM init BY increm UNTIL cond ] ... [ stment END-PERFORM ]
6.37.4.1 – first-proc
is a procedure-name that identifies a paragraph or section in the Procedure Division. The set of statements in first-proc are the first (or only) set of statements in the PERFORM range.
6.37.4.2 – end-proc
is a procedure-name that identifies a paragraph or section in the Procedure Division. The set of statements in end-proc are the last set of statements in the PERFORM range.
6.37.4.3 – stment
is an imperative statement.
6.37.4.4 – cond
can be any conditional expression.
6.37.4.5 – var
is an index-name or the identifier of a numeric elementary data item. Its value is changed by increm each time all statements in the PERFORM range execute.
6.37.4.6 – init
is a numeric literal, index-name, or the identifier of a numeric elementary data item. It specifies the value of var before any statement in the PERFORM range executes.
6.37.4.7 – increm
is a nonzero numeric literal or the identifier of a numeric elementary data item. It systematically changes the value of var each time the program executes all statements in the PERFORM range.
6.38 – READ
For sequential access files, the READ statement makes the next logical record available. For random access files, READ makes a specified record available.
6.38.1 – 1format_sequential
For sequentially accessed files, the READ statement makes the next logical record in the sequence available. Format 1 - READ file-name [ NEXT ] RECORD [ INTO dest-item ] [ PREVIOUS ] [ PRIOR ] [ WITH [ NO ] LOCK ] [ REGARDLESS OF LOCK ] [ { UPDATERS } ] [ ALLOWING { READERS } ] [ { NO OTHERS } ] [ AT END stment ] [ NOT AT END stment ] [ END-READ ]
6.38.1.1 – file-name
is the name of a file described in the Data Division. It cannot be a sort or merge file.
6.38.1.2 – dest-item
is the identifier of a data item that receives the record accessed by the READ statement.
6.38.1.3 – stment
is an imperative statement executed for an at end or not at end condition.
6.38.2 – 2format_random_dynamic
For randomly accessed files, READ makes a specified record available. Format 2 - READ file-name RECORD [ INTO dest-item ] [ WITH [ NO ] LOCK ] [ REGARDLESS OF LOCK ] [ { UPDATERS } ] [ ALLOWING { READERS } ] [ { NO OTHERS } ] [ KEY IS key-data ] [ INVALID KEY stment ] [ NOT INVALID KEY stment ] [ END-READ ]
6.38.2.1 – file-name
is the name of a file described in the Data Division. It cannot be a sort or merge file.
6.38.2.2 – dest-item
is the identifier of a data item that receives the record accessed by the READ statement.
6.38.2.3 – key-data
is the data-name of a data item or the segmented-key name specified as a record key for file-name. It can be qualified. This clause is not used on RELATIVE files.
6.38.2.4 – stment
is an imperative statement executed for an invalid key or not invalid key condition.
6.39 – READY
The READY statement begins a database transaction, prepares one or more database realms for processing, and places each specified realm in a ready mode. Format - READY [ realm-name ] ... [ { { CONCURRENT } } ] [ { { EXCLUSIVE } [ { RETRIEVAL } ] } ] [ { { PROTECTED } [ { UPDATE } ] } ] [ USAGE-MODE IS { { BATCH } } ] [ { [ { CONCURRENT } ] } ] [ { { RETRIEVAL } [ { EXCLUSIVE } ] } ] [ { { UPDATE } [ { PROTECTED } ] } ] [ { [ { BATCH } ] } ] [ WITH WAIT ] [ ON ERROR stment ] [ NOT ON ERROR stment ] [ END-READY ]
6.39.1 – realm-name
names a subschema realm name.
6.39.2 – stment
is an imperative statement.
6.40 – RECONNECT
The RECONNECT statement moves the current database record of the run unit from one set to another (possibly the same) set. Format - RECONNECT [ record-name ] WITHIN { { set-name } ... } { ALL } [ [{| REALM |}] ] [ RETAINING [{| RECORD |}] CURRENCY ] [ [{| { SET [ set-name ] ... } |}] ] [ [{| { { set-name } ... } |}] ] [ ON ERROR stment ] [ NOT ON ERROR stment ] [ END-RECONNECT ]
6.40.1 – record-name
names a subschema record type.
6.40.2 – set-name
names a subschema set type.
6.40.3 – stment
is an imperative statement.
6.41 – RECORD
The RECORD statement creates a Common Data Dictionary/Repository (CDD/Repository) dependency relationship between a COBOL program and a dictionary entity stored in CDD/Repository. For this statement to be meaningful, you must compile your program with the /DEPENDENCY_DATA qualifier. RECORD DEPENDENCY pathname [ TYPE IS rel-type ] [ IN DICTIONARY ].
6.41.1 – pathname
is a partial or full CDD/Repository pathname. It specifies a CDD/Repository dictionary entity stored in CDO format.
6.41.2 – rel-type
is a valid CDD/Repository protocol. It specifies the type of relationship to be created between the VSI COBOL program and the CDO dictionary entity specified in the pathname. The default is CDD$COMPILED_DEPENDS_ON.
6.42 – RELEASE
The RELEASE statement transfers records to the initial phase of a sort operation. Format - RELEASE rec [ FROM src-area ]
6.42.1 – rec
is the name of a logical record in a sort-merge file description (SD) entry. It can be qualified.
6.42.2 – src-area
is the identifier of the data item that contains the data. If src-area is a function-identifier, it must reference an alphanumeric function.
6.43 – RETURN
The RETURN statement gets sorted records from a sort operation. It also returns merged records in a merge operation. Format - RETURN smrg-file RECORD [ INTO dest-area ] AT END stment [ NOT AT END stment ] [ END-RETURN ]
6.43.1 – smrg-file
is the name of a file described in a sort-merge file description (SD) entry.
6.43.2 – dest-area
is the identifier of the data item to which the returned smrg-file record is moved.
6.43.3 – stment
is an imperative statement.
6.44 – REWRITE
The REWRITE statement logically replaces a mass storage file record.
6.44.1 – 1format_sequential
Format 1 - REWRITE rec-name [ FROM src-item ] [ ALLOWING NO OTHERS ] [ END-REWRITE ]
6.44.1.1 – rec-name
is the name of a logical record in the Data Division File Section. It can be qualified.
6.44.1.2 – src-item
is the identifier of the data item that contains the data. If src-item is a function-identifier, it must reference an alphanumeric function.
6.44.2 – 2format_relative_indexed
Format 2 - REWRITE rec-name [ FROM src-item ] [ ALLOWING NO OTHERS ] [ INVALID KEY stment ] [ NOT INVALID KEY stment ] [ END-REWRITE ]
6.44.2.1 – rec-name
is the name of a logical record in the Data Division File Section. It can be qualified.
6.44.2.2 – src-item
is the identifier of the data item that contains the data. If src-item is a function-identifier, it must reference an alphanumeric function.
6.44.2.3 – stment
is an imperative statement.
6.45 – ROLLBACK
The ROLLBACK statement ends your database transaction, nullifies all database changes made by this run unit since its last quiet point, and establishes a new quiet point for this run unit. Format - ROLLBACK [ ON ERROR stment ] [ NOT ON ERROR stment ] [ END-ROLLBACK ]
6.45.1 – stment
is an imperative statement.
6.46 – SEARCH
The SEARCH statement searches for a table element that satisfies a condition. It sets the value of the associated index to point to the table element.
6.46.1 – 1format_serial
The SEARCH statement searches for a table element that satisfies a condition. It sets the value of the associated index to point to the table element. Format 1 - SEARCH src-table [ VARYING pointr ] [ AT END stment ] { {WHEN cond stment} ... END-SEARCH } { } { {WHEN cond { stment } } } { { { NEXT SENTENCE } } ... }
6.46.1.1 – src-table
is a table identifier.
6.46.1.2 – pointr
is an index-name or the identifier of a data item described as USAGE INDEX, or an elementary numeric data item with no positions to the right of the assumed decimal point.
6.46.1.3 – cond
is any conditional expression.
6.46.1.4 – stment
is an imperative statement.
6.46.2 – 2format_binary
The SEARCH statement searches for a table element that satisfies a condition. It sets the value of the associated index to point to the table element. Format 2 - SEARCH ALL src-table [ AT END stment ] WHEN { elemnt { IS EQUAL TO } arg } { { IS = } } { cond-name } [ AND { elemnt { IS EQUAL TO } arg } ] ... [ { { IS = } } ] [ { cond-name } ] { stment [ END-SEARCH ] } { NEXT SENTENCE }
6.46.2.1 – src-table
is a table identifier.
6.46.2.2 – stment
is an imperative statement.
6.46.2.3 – elemnt
is an indexed data-name. It refers to the table element against which the argument is compared.
6.46.2.4 – arg
is the argument tested against each element (elemnt) in the search. It is an identifier, a literal, or an arithmetic expression.
6.46.2.5 – cond-name
is a condition-name.
6.47 – SET
The SET statement sets values of indexes associated with table elements. It can also change the value of a conditional variable, change the status of an external switch, and store the address of a COBOL identifier reference at run time.
6.47.1 – 1format TO
The SET statement sets values of indexes associated with table elements. It can also change the value of a conditional variable, change the status of an external switch, and store the address of a COBOL identifier reference at run time. Format 1 - SET { rsult } ... TO val
6.47.1.1 – rsult
is an index-name, the identifier of an index data item, or an elementary numeric data item described as an integer.
6.47.1.2 – val
is a positive integer, which may be signed. It can also be an index-name (or the identifier of an index data item) or an elementary numeric data item described as an integer.
6.47.2 – 2format UP DOWN
The SET statement sets values of indexes associated with table elements. It can also change the value of a conditional variable, change the status of an external switch, and store the address of a COBOL identifier reference at run time. Format 2 - SET { indx } ... { UP BY } increm { DOWN BY }
6.47.2.1 – indx
is an index-name.
6.47.2.2 – increm
is an integer, which may be signed. It can also be the identifier of an elementary numeric data item described as an integer.
6.47.3 – 3format_cond-name
The SET statement sets values of indexes associated with table elements. It can also change the value of a conditional variable, change the status of an external switch, and store the address of a COBOL identifier reference at run time. Format 3 - SET { cond-name } ... TO TRUE
6.47.3.1 – cond-name
is a condition-name that must be associated with a conditional variable.
6.47.4 – 4format_switch-name
The SET statement sets values of indexes associated with table elements. It can also change the value of a conditional variable, change the status of an external switch, and store the address of a COBOL identifier reference at run time. Format 4 - SET { { switch-name } ... TO { ON } } ... { { OFF } }
6.47.4.1 – switch-name
is the name of an external switch defined in the SPECIAL-NAMES paragraph.
6.47.5 – 5format REFERENCE
The SET statement sets values of indexes associated with table elements. It can also change the value of a conditional variable, change the status of an external switch, and store the address of a COBOL identifier reference at run time. Format 5 - SET { pointer-id } ... TO REFERENCE OF identifier
6.47.5.1 – pointer-id
is a data-name whose data description entry must contain the USAGE IS POINTER or POINTER-64 clause.
6.47.5.2 – identifier
is a data item in the File, Working-Storage, Linkage Section, or Sub-Schema Section.
6.47.6 – 6format SUCCESS FAILURE
The SET statement sets values of indexes associated with table elements. It can also change the value of a conditional variable, change the status of an external switch, and store the address of a COBOL identifier reference at run time. Format 6 - SET status-code-id TO { SUCCESS } { FAILURE }
6.47.6.1 – status-code-id
is a word or longword integer data item represented by PIC S9(1) to S9(9) COMP.
6.48 – SORT
The SORT statement handles both files and tables.
6.48.1 – 1format_file
The SORT statement creates a sort file by executing input procedures or transferring records from an input file. It sorts the records in the sort file using one or more keys that you specify. Finally, it returns each record from the sort file, in sorted order, to output procedures or an output file. Format - SORT sortfile { ON { ASCENDING } KEY { sortkey } ... } ... { { DESCENDING } } [ WITH DUPLICATES IN ORDER ] [ COLLATING SEQUENCE IS alpha ] { INPUT PROCEDURE IS first-proc [ { THRU } end-proc ] } { [ { THROUGH } ] } { USING { infile } ... } { OUTPUT PROCEDURE IS first-proc [ { THRU } end-proc ] } { [ { THROUGH } ] } { GIVING { outfile } ... }
6.48.1.1 – sortfile
is a file-name described in a sort-merge file description (SD) entry in the Data Division.
6.48.1.2 – sortkey
is the data-name of a data item in a record associated with sortfile.
6.48.1.3 – alpha
is an alphabet-name defined in the SPECIAL-NAMES paragraph of the Environment Division.
6.48.1.4 – first-proc
is the section-name or paragraph-name of the first (or only) section or paragraph of the INPUT or OUTPUT procedure range.
6.48.1.5 – infile
is the file-name of the input file. It must be described in a file description (FD) entry in the Data Division.
6.48.1.6 – end-proc
is the section-name or paragraph-name of the last section or paragraph of the INPUT or OUTPUT procedure range.
6.48.1.7 – outfile
is the file-name of the output file. It must be described in a file description (FD) entry in the Data Division.
6.48.2 – 2format_table
The SORT statement orders a table. It sorts the table elements based on the keys as specified in the OCCURS for the table. The table keys as specified in the OCCURS can be overridden with keys as specified in the SORT statement. If no key is specified, the table elements are the SORT keys. Format - SORT table-name [ ON { ASCENDING } KEY { sortkey } ... ] ... [ { DESCENDING } ] [ WITH DUPLICATES IN ORDER ] [ COLLATING SEQUENCE IS alpha ].
6.48.2.1 – table-name
is a table described with OCCURS in the Data Division.
6.48.2.2 – sortkey
is the data-name of a data item in the table-name table.
6.48.2.3 – alpha
is an alphabet-name defined in the SPECIAL-NAMES paragraph of the Environment Division.
6.49 – START
The START statement establishes the logical position of the Next Record Pointer in an indexed or relative file. The logical position affects subsequent sequential record retrieval. Format - [ { IS EQUAL TO } ] [ { IS = } ] [ { IS GREATER THAN } ] START file-name [ KEY { IS > } key-data ] [ { IS NOT LESS THAN } ] [ { IS NOT < } ] [ { IS GREATER THAN OR EQUAL TO } ] [ { IS >= } ] [ { IS LESS THAN } ] [ { IS < } ] [ { IS LESS THAN OR EQUAL TO } ] [ { IS <= } ] [ { IS NOT GREATER THAN } ] [ { IS NOT > } ] [ REGARDLESS OF LOCK ] [ { UPDATERS } ] [ ALLOWING { READERS } ] [ { NO OTHERS } ] [ INVALID KEY stment ] [ NOT INVALID KEY stment ] [ END-START ]
6.49.1 – file-name
is the name of an indexed or relative file with sequential or dynamic access. It cannot be the name of a sort or merge file.
6.49.2 – key-data
is the data-name of a data item or the segmented-key name specified as a record key, or the leftmost part of a record key, or the relative key for file-name. It can be qualified.
6.49.3 – stment
is an imperative statement.
6.50 – STOP
The STOP statement permanently terminates or temporarily suspends image execution. Format - STOP { RUN } { disp }
6.50.1 – disp
is any literal, or any figurative constant except ALL literal.
6.51 – STORE
The STORE statement stores a new record in the database, establishes the record as an owner of an empty set of each set type for which the record is an owner record type, and connects the record as a member to the current set of each set type for which the record is an AUTOMATIC member record type. Format - STORE record-name [ [ NEXT TO ] DBKEY ] [ WITHIN { realm-name } ... ] [ [{| REALM |}] ] [ RETAINING [{| RECORD |}] CURRENCY ] [ [{| { SET [ set-name ] ... } |}] ] [ [{| { { set-name } ... } |}] ] [ ON ERROR stment ] [ NOT ON ERROR stment ] [ END-STORE ]
6.51.1 – record-name
names a subschema record type.
6.51.2 – realm-name
names a subschema realm.
6.51.3 – set-name
names a subschema set type.
6.51.4 – stment
is an imperative statement.
6.52 – STRING
The STRING statement concatenates the partial or complete contents of one or more data items into a single data item. Format - STRING { { src-string } ... DELIMITED BY { delim } } ... { { SIZE } } INTO dest-string [ WITH POINTER pointr ] [ ON OVERFLOW stment ] [ NOT ON OVERFLOW stment ] [ END-STRING ]
6.52.1 – src-string
is a nonnumeric literal or identifier of a DISPLAY data item. It is the sending area.
6.52.2 – delim
is a nonnumeric literal or the identifier of a DISPLAY data item. It is the delimiter of src-string.
6.52.3 – dest-string
is the identifier of a DISPLAY data item. It cannot be reference modified. Dest-string is the receiving area that contains the result of the concatenated src-strings.
6.52.4 – pointr
is an elementary numeric data item described as an integer. It points to the position in dest-string to contain the next character moved.
6.52.5 – stment
is an imperative statement.
6.53 – SUBTRACT
The SUBTRACT statement subtracts one, or the sum of two or more, numeric items from one or more items. It stores the result in one or more items.
6.53.1 – 1format FROM
The SUBTRACT statement subtracts one, or the sum of two or more, numeric items from one or more items. It stores the result in one or more items. Format 1 - SUBTRACT { num } ... FROM { rsult [ ROUNDED ] } ... [ ON SIZE ERROR stment ] [ NOT ON SIZE ERROR stment ] [ END-SUBTRACT ]
6.53.1.1 – num
is a numeric literal or the identifier of an elementary numeric item.
6.53.1.2 – rsult
is the identifier of an elementary numeric item. It is the resultant identifier.
6.53.1.3 – stment
is an imperative statement.
6.53.2 – 2format GIVING
The SUBTRACT statement subtracts one, or the sum of two or more, numeric items from one or more items. It stores the result in one or more items. Format 2 - SUBTRACT { num } ... FROM num GIVING { rsult [ ROUNDED ] } ... [ ON SIZE ERROR stment ] [ NOT ON SIZE ERROR stment ] [ END-SUBTRACT ]
6.53.2.1 – num
is a numeric literal or the identifier of an elementary numeric item.
6.53.2.2 – rsult
is the identifier of an elementary numeric item or an elementary numeric edited item. It is the resultant identifier.
6.53.2.3 – stment
is an imperative statement.
6.53.3 – 3format CORRESPONDING
The SUBTRACT statement subtracts one, or the sum of two or more, numeric items from one or more items. It stores the result in one or more items. Format 3 - SUBTRACT { CORRESPONDING } grp-1 FROM grp-2 [ ROUNDED ] { CORR } [ ON SIZE ERROR stment ] [ NOT ON SIZE ERROR stment ] [ END-SUBTRACT ]
6.53.3.1 – grp
is the identifier of a group item.
6.53.3.2 – stment
is an imperative statement.
6.54 – SUPPRESS
The SUPPRESS statement causes the Report Writer Control System (RWCS) to inhibit the presentation of a report group. Format - SUPPRESS PRINTING
6.55 – TERMINATE
The TERMINATE statement causes the Report Writer Control System (RWCS) to complete the processing of the specified report. Format - TERMINATE { report-name } ...
6.55.1 – report-name
names a report defined by a Report Description entry in the Report Section of the Data Division.
6.56 – UNLOCK
The UNLOCK statement removes record locks from a record or all currently locked records in the file. Format - UNLOCK file-name [ RECORD ] [ ALL RECORDS ]
6.56.1 – file-name
is the name of a sequential, relative, or indexed file described in the Data Division.
6.57 – UNSTRING
The UNSTRING statement separates contiguous data in a sending field and stores it in one or more receiving fields. Format - UNSTRING src-string [ DELIMITED BY [ALL] delim [ OR [ALL] delim ] ... ] INTO { dest-string [DELIMITER IN delim-dest] [COUNT IN countr] } ... [ WITH POINTER pointr ] [ TALLYING IN tally-ctr ] [ ON OVERFLOW stment ] [ NOT ON OVERFLOW stment ] [ END-UNSTRING ]
6.57.1 – src-string
is the identifier of an alphanumeric class data item. It cannot be reference modified. Src-string is the sending field.
6.57.2 – delim
is a nonumeric literal or the identifier of an alphanumeric data item. It is the delimiter for the UNSTRING operation.
6.57.3 – dest-string
is the identifier of an alphanumeric, alphabetic, or numeric DISPLAY data item. It is the receiving field for the data from src-string.
6.57.4 – delim-dest
is the identifier of an alphanumeric data item. It is the receiving field for delimiters.
6.57.5 – countr
is the identifier of an elementary numeric data item described as an integer. It contains the count of characters moved.
6.57.6 – pointr
is the identifier of an elementary numeric data item described as an integer. It points to the current character position in src-string.
6.57.7 – tally-ctr
is the identifier of an elementary numeric data item described as an integer. It counts the number of dest-string fields accessed during the UNSTRING operation.
6.57.8 – stment
is an imperative statement.
6.58 – USE
The USE statement specifies Declarative procedures to handle input/output errors and database exception conditions. It can also specify procedures to be executed before the program processes a specific report group. These procedures supplement the standard procedures in the COBOL Run-Time System and OpenVMS RMS.
6.58.1 – 1format AFTER EXCEPTION
The USE statement specifies Declarative procedures to handle input/output errors and database exception conditions. It can also specify procedures to be executed before the program processes a specific report group. These procedures supplement the standard procedures in the COBOL Run-Time System and OpenVMS RMS. Format 1 - { {file-name} ...} { INPUT } USE [GLOBAL] AFTER STANDARD {EXCEPTION }PROCEDURE ON{ OUTPUT }. {ERROR } { I-O } { EXTEND }
6.58.1.1 – file-name
is the name of a file connector described in a file description entry in a Data Division. It cannot refer to a sort or merge file.
6.58.2 – 2format BEFORE REPORTING
The USE statement specifies Declarative procedures to handle input/output errors and database exception conditions. It can also specify procedures to be executed before the program processes a specific report group. These procedures supplement the standard procedures in the COBOL Run-Time System and OpenVMS RMS. Format 2 - USE [GLOBAL] BEFORE REPORTING group-data-name .
6.58.2.1 – group-data-name
is the name of a report group in a report group description entry in a Data Division. It must not appear in more than one USE statement.
6.58.3 – 3format DB-EXCEPTION
The USE statement specifies Declarative procedures to handle input/output errors and database exception conditions. It can also specify procedures to be executed before the program processes a specific report group. Format 3 - USE [GLOBAL] FOR DB-EXCEPTION [ON { {DBM$_exception-condition} ... }]. [ { OTHER }]
6.58.3.1 – DBM$ exception-condition
is a symbolic constant name beginning with the characters "DBM$_". It identifies a DBMS exception condition.
6.59 – WRITE
The WRITE statement releases a logical record to an output or input-output file. It can also position lines vertically on a logical page.
6.59.1 – 1format_sequential
The WRITE statement releases a logical record to an output or input-output file. It can also position lines vertically on a logical page. Format 1 - WRITE rec-name [ FROM src-item ] [ ALLOWING NO OTHERS ] [ { advance-num [ LINE ] } ] [ { BEFORE } { [ LINES ] } ] [ { AFTER } ADVANCING { top-name } ] [ { PAGE } ] [ AT { END-OF-PAGE } stment ] [ { EOP } ] [ NOT AT { END-OF-PAGE } stment ] [ { EOP } ] [ END-WRITE ]
6.59.1.1 – rec-name
is the name of a logical record described in the Data Division File Section. It cannot be qualified. The logical record cannot be in a sort-merge file description entry.
6.59.1.2 – src-item
is the identifier of the data item that contains the data. If src-item is a function-identifier, it must reference an alphanumeric function.
6.59.1.3 – advance-num
is an integer or the identifier of an unsigned data item described as an integer. Its value can be zero.
6.59.1.4 – top-name
is a mnemonic-name equated to "C01" in the SPECIAL-NAMES paragraph of the Environment Division. It represents top-of-page and is equivalent to the PAGE phrase.
6.59.1.5 – stment
is an imperative statement.
6.59.2 – 2format_relative_indexed
The WRITE statement releases a logical record to an output or input-output file. It can also position lines vertically on a logical page. Format 2 - WRITE rec-name [ FROM src-item ] [ ALLOWING NO OTHERS ] [ INVALID KEY stment ] [ NOT INVALID KEY stment ] [ END-WRITE ]
6.59.2.1 – rec-name
is the name of a logical record described in the Data Division File Section. It cannot be qualified. The logical record cannot be in a sort-merge file description entry.
6.59.2.2 – src-item
is the identifier of the data item that contains the data. If src-item is a function-identifier, it must reference an alphanumeric function.
6.59.2.3 – stment
is an imperative statement.
7 – COPY statement
The COPY statement includes text in a COBOL source program.
7.1 – 1format_text-name
The COPY statement includes text in a COBOL source program. Format 1 - COPY text-name [ { OF } library-name ] [ { IN } ] [ { { ==pseudo-text-1== } { ==pseudo-text-2== } } ] [REPLACING { { identifier-1 } BY { identifier-2 } } ... ] . [ { { literal-1 } { literal-2 } } ] [ { { word-1 } { word-2 } } ]
7.1.1 – text-name
is the name of a COBOL library file available during compilation.
7.1.2 – library-name
is the name of the OpenVMS Librarian library file that contains text-name.
7.1.3 – 1__pseudo-text-1__identifier-1__literal-1__word-1
are text-matching arguments that the compiler compares against text-words in the library text.
7.1.4 – 2__pseudo-text-2__identifier-2__literal-2__word-2
are replacement items that the compiler inserts into the source program.
7.2 – 2format_record-name
The COPY statement includes text in a COBOL source program. Format 2 - COPY record-name FROM DICTIONARY [ { { ==pseudo-text-1== } { ==pseudo-text-2== } } ] [REPLACING { { identifier-1 } BY { identifier-2 } } ... ] . [ { { literal-1 } { literal-2 } } ] [ { { word-1 } { word-2 } } ]
7.2.1 – record-name
is a partial or complete Common Data Dictionary/Repository (CDD/Repository) pathname. It specifies the CDD/Repository record description to be copied into the source program.
7.2.2 – 1__pseudo-text-1__identifier-1__literal-1__word-1
are text-matching arguments that the compiler compares against text-words in the library text.
7.2.3 – 2__pseudo-text-2__identifier-2__literal-2__word-2
are replacement items that the compiler inserts into the source program.
8 – REPLACE statement
The REPLACE statement is used to replace source program text.
8.1 – 1format_pseudo-text-name
The REPLACE statement is used to replace source program text. Format 1 - REPLACE {==pseudo-text-1== BY ==pseudo-text-2==} ...
8.1.1 – pseudo-text-1
is a text-matching argument that the compiler compares against text-words in the source program.
8.1.2 – pseudo-text-2
is a replacement item that the compiler inserts into the source program.
8.2 – 2format OFF
The REPLACE OFF statement is used to terminate any text replacement processing currently in effect. Format 2 - REPLACE OFF
9 – Compiler Messages
This subset of VSI COBOL compiler messages includes those that require additional explanation.
9.1 – ACCEXCEPT
DISPLAY now allows [NOT] ON EXCEPTION - check DISPLAY scope within ACCEPT ON EXCEPTION Explanation: Format 6 of the DISPLAY statement with the [NOT] ON EXCEPTION phrase is a conditional statement and may require the use of END-DISPLAY to determine the proper scope of the DISPLAY statement. User Action: Verify the scope of the DISPLAY statement in the program logic. You may need to insert a terminating "end-display". For example, consider this code fragment: accept password-form at line 15 column 20 on exception display "Problem " line 16 not on exception continue end-accept. The "not on exception" is NOT matched with the "accept" as shown by the indentation, but is matched with nearest preceding unterminated statement, the "display". To match the "not on exception" phrase with the "accept" insert an "end-display" so the code looks like: accept password-form at line 15 column 20 on exception display "Problem " line 16 end-display not on exception continue end-accept.
9.2 – BADINT
Integer value is outside of valid range---results are undefined Explanation: The compiler truncates the value, and the results are undefined because your program violates one of these rules: a. The value is greater than that allowed by RMS. b. The value is not less than 2**31. c. The value is equal to zero. User Action: Modify the value so that it is within the valid range.
9.3 – BADPROTCL
*Node <node-name> is an invalid CDD object Explanation: The dictionary object is corrupt. The compiler could not find a required CDD entry. User Action: You must reinsert the definition into the dictionary.
9.4 – CDDERROR
CDD error at node <node-name> Explanation: The dictionary object is corrupt. The compiler could not find a required CDD entry. User Action: You must reinsert the definition into the dictionary.
9.5 – DEBUGOPT
/NOOPTIMIZE is recommended with /DEBUG Explanation: The compiler performs optimization of your COBOL program when you specify /DEBUG, resulting in unusual program behavior when stepping through your program in subsequent debugging sessions. In addition, program SECTION and PARAGRAPH names may not appear when debugging optimized programs. User Action: To suppress this compiler message, you must change the level of optimization on the COBOL command line or specify no optimization. (For example, specify /NOOPTIMIZE, /OPTIMIZE, or /OPTIMIZE=LEVEL=x). To provide the debugger with the best possible information about your program, specify /NOOPTIMIZE.
9.6 – GRPVALCND
VALUE and condition-names invalid with subordinate JUSTIFIED, SYNCHRONIZED, or non-DISPLAY usage Explanation: The compiler accepts the VALUE clause. User Action: Use an explicit MOVE statement in your program to initialize these items.
9.7 – ILLLITERL
CDD record containing symbolic literals invalid in COBOL Explanation: This CDD entry is incompatible with VSI COBOL. The COBOL language does not define symbolic literals, therefore the VSI COBOL compiler ignores them. User Action: You must take the following action: a. Redefine the record definition and reinsert it into the dictionary, omitting the symbolic literal. b. Do not use this record definition with VSI COBOL.
9.8 – INVADVANC
Invalid ADVANCING operand Explanation: The operand must be one of the following: a. PAGE. b. a mnemonic-name. c. an unsigned integer data item. d. an unsigned integer literal. User Action: Recode the program using one of the four valid operands
9.9 – MISS01
Missing level 01 or 77 entry before this item Explanation: If the current item is a condition-name, the compiler ignores the definition; otherwise, the compiler treats the current item as an 01 level item. User Action: Recode the program using a level 01 or level 77 entry.
9.10 – MULTIDIM
Invalid multidimensional CDD OCCURS Explanation: This CDD entry is incompatible with VSI COBOL. CDD supports the definition of multidimensional tables more generally than VSI COBOL does. The compiler uses only one dimension of the information contained in a multidimensional table definition. User Action: You must take the following action: a. Redefine the record definition in the dictionary, omitting this multidimensional table definition. b. Do not use this record definition with VSI COBOL.
9.11 – NOTRECORD
Node <node-name> is an <object-name>, not a CDD record definition---COPY ignored Explanation: VSI COBOL requires a pathname to reference a CDD record description. The compiler ignores the COPY FROM DICTIONARY statement. User Action: You must use a different pathname in your COPY FROM DICTIONARY statement or correct the CDD entry to describe a record.
9.12 – NOV3EVAL
/STANDARD=V3 evaluation order not supported for this construct Explanation: The compiler generates this message for items that may be affected by the evaluation order in the INSPECT, STRING, UNSTRING, and DIVIDE statements. Specifically, this message appears when you specify /STANDARD=V3 and either a subscript or a reference modification occurs in a place that, for VAX COBOL Version 3.0, required a different evaluation order User Action: Review the code indicated by the message and refer to the online help information for the /STANDARD qualifier to determine whether or not your program needs a change.
9.13 – NOV3ODO
/STANDARD=V3 variable length item rules not supported for this construct Explanation: The compiler generates this message when you specify /STANDARD=V3 for destinations where OCCURS DEPENDING ON requires different behavior in the MOVE statement than VAX COBOL Version 3.0. User Action: Review the code indicated by the message and refer to the online help information about the /STANDARD qualifier to determine whether or not your program needs a change.
9.14 – ODOSAMDD
OCCURS DEPENDING ON data-name must be defined in the same DATA DIVISION as the OCCURS DEPENDING ON. Explanation: The compiler ignores the error. User Action: You must take the following actions: a. Redefine the OCCURS DEPENDING ON data-name in the same Data Division as the OCCURS DEPENDING ON. b. Recompile your program.
9.15 – REAMISIO
READ statement required for OPEN I-O on file Explanation: The program opens the file in I-O mode, but does not contain a READ statement. A DELETE or REWRITE operation on a sequentially accessed file requires a previously executed READ or START statement. User Action: You must take one of the following actions: a. Add a READ statement to your program. b. Check the file declaration for the EXTERNAL attribute and add one to your program, if appropriate.
9.16 – REDEFFILL
Redefinition of FILLER invalid in COBOL Explanation: The compiler ignores the redefinition and treats the item as a separate data description entry. User Action: Remove the erroneous redefinition.
9.17 – REDEFNAM
Incorrect data-name in REDEFINES clause Explanation: The compiler assumes the correct data-name, if possible. Otherwise, the compiler ignores the REDEFINES clause. User Action: Correct the data-name and recompile your program.
9.18 – REFINVSEC
REFERENCE data name defined in an invalid section Explanation: Data name must be defined in the File, or Working-Storage Section. The compiler ignores the entire VALUE IS clause. User Action: Remove the VALUE IS reference clause.
9.19 – SECTGLOB
Invalid GLOBAL clause Explanation: This data-item either: a. does not have an explicit name. b. is not an 01 or 77 item. c. is not defined in the File or Working-Storage Sections. User Action: You must take one of the following actions: a. Remove the GLOBAL clause. b. Check entries that contain the GLOBAL clause and make certain they are named. c. Check your program to ensure that the GLOBAL clause is an 01 or 77 item and make the necessary corrections. d. Make certain that the data-item is in the File or Working-Storage section. If it is not, remove the GLOBAL clause.
9.20 – SELOBJECTS
Invalid number of selection objects Explanation: In the WHEN clause of an EVALUATE statement, the number of selection objects must equal the number of selection subjects. User Action: Recode the program making certain that you have an equal number of selection objects and selection subjects.
9.21 – BADITMLEN
Length for database record-item "!AF" must be greater than zero Explanation: The minimum size for a COBOL data item is 1 byte. In a DBMS Data Description entry, the minimum size for a subschema data item is 0 bytes. The compiler treats the record-item as if it has a length of 1 byte, which may produce run-time errors. User Action: You must take one of the following actions: a. Redefine the subschema data item to be at least 1 byte, and recompile the subschema with the DDL Utility b. Do not use this subschema with VSI COBOL
9.22 – BADITMMUL
Length for database record-item ".!AF" must be multiple of 8 bits Explanation: This entry is incompatible with VSI COBOL. The smallest unit of data that can be defined in a VSI COBOL program is 1 byte (8 bits). The compiler rounds the length up to the next multiple of 8 bits. User Action: You must take the following actions: a. Redefine the subschema data item to be a multiple of 8 bits. b. Recompile the subschema with the DDL Utility.
9.23 – BADITMOFF
Offset for database record-item "!AF" must be multiple of 8 bits Explanation: This entry is incompatible with VSI COBOL. The smallest unit of data that can be defined in a VSI COBOL program is 1 byte (8 bits). The compiler rounds the offset up to the next multiple of 8 bits. User Action: You must take the following actions: a. Redefine the subschema data item to be a multiple of 8 bits. b. Recompile the subschema with the DDL Utility.
9.24 – BADRECMUL
Length for database record "!AF" must be multiple of 8 bits Explanation: This entry is incompatible with VSI COBOL. The smallest unit of data that can be defined in a VSI COBOL program is 1 byte (8 bits). The compiler rounds the length up to the next multiple of 8 bits. User Action: You must take the following actions: a. Redefine the subschema data item to be a multiple of 8 bits. b. Recompile the subschema with the DDL Utility..!
9.25 – CDDACCERR
Error in accessing subschema---DB statement ignored Explanation: The VSI COBOL compiler could not access the subschema and/or schema specified in your DB statement. Make certain that the schema and subschema exist in the CDD. Also, verify that your logical names resolve to the schema and subschema that you intend to use. The compiler ignores the DB statement. User Action: Check your CDD access path or CDD access authorization.
9.26 – CDDSTRIDE
Invalid stride for database record-item "!AF" Explanation: This entry is incompatible with VSI COBOL. The stride attribute describes the separation (in bits) between one occurrence of a table item and the next occurrence. This should be the same as the allocated length of a single occurrence of the item. The compiler issues this message whenever these two lengths do not agree. The compiler gives the record-item a stride equal to the length of one occurrence of the table item. User Action: You must take the following actions: a. Redefine your subschema to ensure that these two database record-item lengths are identical. b. Recompile the subschema containing this record-item with the DBMS DDL Utility.
9.27 – CNTSGNOUT
Unable to complete subschema processing Explanation: The compiler failed to exit the CDD when it completed subschema processing. The compiler terminates subschema processing. User Action: Recompile your program.
9.28 – FLDACCERR
Error in accessing record-item "!AF" from subschema Explanation: The subschema containing the record item is most likely corrupt. User Action: Recompile the subschema with the DBMS DDL Utility.
9.29 – ILLNUMSUB
Invalid multidimensional database record-item "!AF" Explanation: This entry is incompatible with VSI COBOL. The DBMS Data Definition Language defines multidimensional tables more generally than VSI COBOL does. The compiler uses one dimension of information of the multidimensional table definition. User Action: You must take one of the following actions: a. Redefine the record definition in the dictionary, omitting such multidimensional table definitions. b. Do not use this record definition with VSI COBOL.
9.30 – INVDATTYP
Unsupported subschema datatype for "!AF" Explanation: The compiler treats the item as if it were alphanumeric with a length equal to the original data type. User Action: You must take the following actions: a. Update the data type subschema definition. b. Recompile the subschema containing this definition with the DBMS DDL Utility.
9.31 – NEGRECLEN
Invalid length for database record "!AF" Explanation: The subschema containing the record definition with the invalid length is most likely corrupt. The compiler assigns the record a length of one byte. This may produce run-time errors. User Action: Recompile the subschema with the DBMS DDL Utility.
9.32 – NOOFFSET
Offset required for database record-item "!AF" Explanation: The required offset-into-the-record attribute is missing in the entry for this subschema record-item. Most likely the subschema is corrupt. User Action: Recompile the subschema using the DBMS DDL Utility.
9.33 – NORECORDS
Subschema must have at least one database record Explanation: This DBMS DDL entry is invalid in COBOL. The compiler terminates subschema processing. User Action: You must take one of the following actions: a. Redefine the subschema including a record-type definition and recompile the subschema with the DBMS DDL Utility. b. Do not use such subschema definitions with VSI COBOL.
9.34 – NOUPBND
Upper-bound required for database record-item "!AF" Explanation: The compiler encountered a table definition with no upper-bound. Most likely the subschema record description is corrupt. User Action: Recompile the subschema with the DBMS DDL Utility.
9.35 – RECACCERR
Error in accessing record "!AF" from subschema Explanation: The subschema containing the record is most likely corrupt. User Action: Recompile the subschema using the DBMS DDL Utility.
9.36 – RLMACCERR
Error in accessing realm "!AF" from subschema Explanation: The subschema containing the realm is most likely corrupt. User Action: Recompile the subschema with the DBMS DDL Utility.
9.37 – SETACCERR
Error in accessing set "!AF" from subschema Explanation: The subschema containing the set is most likely corrupt. User Action: Recompile the subschema with the DBMS DDL Utility.
9.38 – SMLNPICDB
Numeric database record-item "!AF" must represent at least one digit Explanation: This subschema entry is incompatible with VSI COBOL. The DBMS Data Definition Language allows the definition of numeric record-items to consist of zero digits; VSI COBOL does not. User Action: You must take the following actions: a. Correct the definition of the numeric record-item. b. Recompile the subschema with the DBMS DDL Utility.
9.39 – OFFSRSE1
OFFSET invalid in a format 3 record selection expression Explanation: You can use OFFSET in the database key identifier form of the record selection expression, but not in the record search access form. User Action: Correct the record selection expression and recompile your program.
9.40 – OPDCMPFN
Operand subordinate to another database group operand Explanation: The list of record-items for this statement cannot contain any item that is subordinate to another item in the list. User Action: You must take the following actions: a. Update the subschema for the database. b. Recompile the subschema with the DBMS DDL Utility.
10 – Run-Time Messages
This subset of VSI COBOL run-time messages includes those that require additional explanation.
10.1 – ACCEPT_CVT_ERROR
Error during ACCEPT from default input device Explanation: The data you entered in response to an ACCEPT WITH CONVERSION statement, which did not include an ON EXCEPTION phrase, caused a conversion error. The data in question was not properly formatted for the data type of the data-item you entered. User Action: If you want your program to handle incorrectly formatted data, add an ON EXCEPTION phrase to the ACCEPT statement. When the ON EXECEPTION phrase executes, your application can take the necessary corrective action.
10.2 – ALREADY_OPEN
File is already open Explanation: The program attempts to open a file on a file connector that is already open. User Action: Verify the program logic. If you expect that some cases will attempt to open a file connector that is already open, add a declarative procedure to handle this condition.
10.3 – ANNUITYBOUNDS
argument(s) to FUNCTION ANNUITY out of bounds Explanation: One or both of these rules were violated: a. Argument-1 must be greater than or equal to zero. b. Argument-2 must be positive. User Action: If this is not the desired result, modify the source program to ensure a valid argument or avoid the function with an invalid argument.
10.4 – BUG_CHECK
Internal consistency check failure Explanation: The system detects a defect in the COBOL Run-time Library. Under normal operation, this message should never appear. User Action: Please report the problem via the normal problem reporting channels and include an example that reproduces the problem.
10.5 – CALL_FAILED
Call failed to find program Explanation: The program specified in the CALL statement is not part of the run-unit, and the CALL statement does not include an ON OVERFLOW or ON EXCEPTION phrase. User Action: You must take one or more of the following actions: a. If you think that the program specified in the CALL statement may not be part of the run-unit, add an ON OVERFLOW or ON EXCEPTION phrase to the CALL statement. If the program named in the error message is part of the run-unit, check the scope of names rules. The named program may not be in a scope that is visible to the calling program. b. Check to see if the DCL LINK command produced any undefined symbol warnings. Executing a CALL statement to a program named in an undefined symbol warning results in the CALL_FAILED error at run time. c. Check to see if the object file containing the called program was properly linked into the run-unit. Specify /MAP/FULL/CROSS with the LINK command to produce a listing map that shows the object files and the programs within the object files that are part of the run-unit. d. Verify the spelling of the named program.
10.6 – CANCEL_FAILED
Cancel failed to find program Explanation: The program specified in the CANCEL statement is not part of the run-unit. User Action: You must take one or more of the following actions: a. If you think that the program specified in the CANCEL statement may not be part of the run-unit, add an ON OVERFLOW phrase to the CANCEL statement. If the program named in the error message is part of the run-unit, check the scope of names rules. The named program may not be in a scope that is visible to the calling program. b. Check to see if the DCL LINK command produced any undefined symbol warnings. Executing a CANCEL statement to a program named in an undefined symbol warning results in the CANCEL_FAILED error at run time. c. Check to see if the object file containing the called program was properly linked into the run-unit. Specify /MAP/FULL/CROSS with the LINK command to produce a listing map that shows the object files and the programs within the object files that are part of the run-unit. d. Verify the spelling of the named program.
10.7 – CHARBOUNDS
argument to FUNCTION CHAR out of bounds Explanation: Function argument must be greater than zero and less than or equal to the number of positions in the collating sequence. User Action: If this is not the desired result, modify the source program to ensure a valid argument or avoid the function with an invalid argument.
10.8 – CLOSE_ERROR
Unknown error during CLOSE Explanation: The system produced an error when closing a file. No more detailed information is available. User Action: Use the special symbol RMS-CURRENT-STS to see which RMS error caused the CLOSE statement to fail. If the RMS condition is common, please submit a problem report suggesting that a better message be provided. Be sure to include the value of RMS-CURRENT-STS in your report.
10.9 – CLOSE_LOCKED
File was closed with lock Explanation: The program attempted to perform an OPEN statement on a file that had been closed with a CLOSE WITH LOCK statement. User Action: Check the program logic. The WITH LOCK phrase indicates that the specified file connector cannot be used in a subsequent OPEN statement for the duration of the execution of the run-unit. The WITH LOCK phrase has no relation to the ALLOWING NO OTHERS file sharing option.
10.10 – DATEINTBOUNDS
argument to FUNCTION DATE-OF-INTEGER out of bounds Explanation: Function argument must be greater than zero. User Action: If this is not the desired result, modify the source program to ensure a valid argument or avoid the function with an invalid argument.
10.11 – DAYINTBOUNDS
argument to FUNCTION DAY-OF-INTEGER out of bounds Explanation: Function argument must be greater than zero. User Action: If this is not the desired result, modify the source program to ensure a valid argument or avoid the function with an invalid argument.
10.12 – DELETE_ERROR
Error during DELETE on file Explanation: The system produced an error when executing a DELETE statement. No more detailed information is available. User Action: Use the special symbol RMS-CURRENT-STS to see which RMS error caused the DELETE statement to fail. If the RMS condition is common, please submit a problem report suggesting that a better message be provided. Be sure to include the value of RMS-CURRENT-STS in your report.
10.13 – DISPLAY_ERROR
Error during DISPLAY on file Explanation: This error indicates an unexpected error condition during the execution of a DISPLAY statement. Under normal operation, this message should never appear. User Action: Check to see if there is any external interference with the display device. For all device types, possible problems may include a device that is off line or a user who does not have the necessary privileges to write to a display device. If the device is a file, possible problems may include a full disk or disk quota exceeded.
10.14 – DIVBY_ZER
Divide by zero; execution continues Explanation: The program executed a DIVIDE operation with the value zero for the divisor, and the statement does not contain an ON SIZE ERROR clause. Execution continues with undefined results. User Action: You must take one of the following actions: a. Check the program logic. If you expect that your program may attempt to divide by zero, add an ON SIZE ERROR clause to the DIVIDE statement. b. If this error occurs in the context of an expression that cannot include an ON SIZE ERROR clause, such as an IF statement, evaluate the expression in a DIVIDE or COMPUTE statement with an ON SIZE ERROR clause, storing the result in a temporary variable. Use that variable in the expression context.
10.15 – FACTBOUNDS
argument to FUNCTION FACTORIAL out of bounds Explanation: Function argument must be in the range of 0 through 33. User Action: If this is not the desired result, modify the source program to ensure a valid argument or avoid the function with an invalid argument.
10.16 – FILE_ATTRIB
File attributes not matched Explanation: The file organization of the file on the disk does not match the organization specified in the file connector. User Action: You must take the following actions: a. Check the program logic, and verify that the file you specified is the one you intended. b. Use the DCL command DIRECTORY/FULL to check the file organization of the file.
10.17 – FILE_LOCKED
File is locked by another program Explanation: The specified disk file has already been opened by another file connector, using file sharing options that prohibit the current program from opening the same file. The program that successfully opened the file could be part of the same run-unit, or it could belong to a different person running another program. User Action: You must take the following actions: a. Check the program logic, and verify that the file being opened is the one you intended. b. If you expect that some cases will attempt to open a file that is already open, add a declarative procedure to handle this condition. c. If the file should be available for sharing, use the DCL command SHOW DEVICE /FILES to find the process that has the file open and locked. In a clustered environment, perform this DCL command on each node in the cluster. d. Once you have identified the process, use the DCL command SHOW PROCESS /CONTINUOUS to find the program that is being executed. e. Check the program logic and the file sharing options for the program that has the file locked.
10.18 – FILE_NOT_FOUND
File not found Explanation: The specified file is not present. User Action: You must take the following actions: a. Check the spelling of the filename. If the name looks correct, examine any logical names that are part of the name. b. Use the DCL command DIRECTORY to see if the file exists and in which directory it is located.
10.19 – GOTO_ALT
GO TO with no preceding ALTER Explanation: The program executed a GO TO statement with no target. An example is a GO TO statement whose target is altered by one or more ALTER statements, but the program executes the GO TO statement before executing any of the ALTER statements. User Action: You must take either of the following actions: a. Modify the GO TO statement in the source file to include an initial target. b. Check the program logic to ensure that the program executes ALTER statements before it executes the referenced GO TO statements.
10.20 – INSVIRMEM
Failed to allocate virtual memory Explanation: The COBOL Run-time Library attempted to allocate virtual memory using the HP C routine malloc() or LIB$GET_VM. The virtual memory allocation failed. Under normal operation, this message should never appear. User Action: You must take the following actions: a. If the program is large, raise the virtual memory parameters. You can determine the current virtual memory usage from the "virtual pages" item of the display from the DCL command SHOW PROCESS/CONTINUOUS. b. Use the AUTHORIZE utility to check the page file quota (Pgflquo). c. Use the SYSGEN utility to check the parameter VIRTUALPAGECNT.
10.21 – INTDATEBOUNDS
argument to FUNCTION INTEGER-OF-DATE out of bounds Explanation: Function argument must be an integer of the form YYYYMMDD. One or more of these rules were violated: a. YYYY must be greater than 1600 and less than or equal to 9999 b. MM must be in the range of 1 through 12. c. DD must be in the range of 1 through 31 and valid for the particular month and year combination. User Action: If this is not the desired result, modify the source program to ensure a valid argument or avoid the function with an invalid argument.
10.22 – INTDAYBOUNDS
argument to FUNCTION INTEGER-OF-DAY out of bounds Explanation: Function argument must be an integer of the form YYYYDDD. One or more of these rules were violated: a. YYYY must be greater than 1600 and less than or equal to 9999 b. DDD must be in the range of 1 through 366 and valid for the year specified. User Action: If this is not the desired result, modify the source program to ensure a valid argument or avoid the function with an invalid argument.
10.23 – INVALID_FNAME
Filename is too long or otherwise invalid Explanation: There is a syntax error in the specified filename, or the filename is too long. User Action: Check the spelling of the filename, including any punctuation characters. For VMS systems, make sure that the file name, file type, and each piece of the directory specification are each less than 39 characters long. The total length of the filename string cannot exceed 255 characters.
10.24 – INVALID_FOOTING
Invalid footing specified on file Explanation: The FOOTING clause in the FD must specify a value larger than zero and less than the pagesize specified by the LINAGE clause. User Action: Check the program logic to ensure that the above conditions are met.
10.25 – INVALID_SWITCH
Invalid external switch value Explanation: The logical COB$SWITCHES does not specify a valid list of switches. The logical must translate to a comma-separated list of numbers from 1 to 16. User Action: Check the value of logical COB$SWITCHES using the DCL command SHOW LOGICAL COB$SWITCHES.
10.26 – INVARGMTH
argument to one of the following FUNCTIONs is out of bounds: ACOS, ASIN, LOG, LOG10, SQRT. Explanation: Function argument must be as follows: ACOS, ASIN: Function argument must be greater than or equal to -1 and less than or equal to 1. LOG, LOG10: Function argument must be greater than 0. SQRT: Function argument must be greater than or equal to 0. User Action: If this is not the desired result, modify the source program to ensure a valid argument or avoid the function with an invalid argument.
10.27 – INVDECDAT
Invalid decimal data Explanation: A numeric data-item declared as USAGE IS DISPLAY, or with an implied declaration of USAGE IS DISPLAY, contains characters that are not digits or the sign position does not contain a valid sign representation. User Action: You must determine how invalid characters are being stored in the variable. Some possible reasons why this can occur are as follows: a. The variable in question is a parameter in a CALL statement and the called routine treats the variable as an alphanumeric field. b. The variable in question participates in a REDEFINES operation with an alphanumeric variable. c. The variable is defined as an element of a record, and alphanumeric data is moved to a group item that contains that variable. If the invalid data is caused by numeric data-items that contain leading blank characters instead of leading zeros, recompile the program specifying /CONVERT=LEADING_BLANKS.
10.28 – IO_NOT_MASS_STORAGE
Open I-O on non-mass storage device Explanation: The program attempted to execute an OPEN statement for random or dynamic access on a file that is not a disk file. Non-disk files cannot perform random access. User Action: You must take the following actions: a. Check the program logic, and verify that the file being opened is the one you intended. b. Change the access mode to sequential, or move the file to a disk device.
10.29 – KEY_COUNT_ERROR
Attempting to open indexed file whose actual keys do not match those declared Explanation: The program specified more keys for a file than had been defined for that file. User Action: You must take the following actions: a. Check that the file being specified is the one you intended. b. Check the number of keys for the file using the DCL command DIRECTORY/FULL. c. Use the CONVERT utility to add key definitions to the file.
10.30 – KEY_MATCH_ERROR
Attempting to open indexed file whose actual keys do not match those declared Explanation: The program specified different datatype and key positions than had been defined for that file. User Action: You must take the following actions: a. Check that the file being specified is the one you intended. b. Check the type and position of keys using the DCL command ANALYZE/RMS.
10.31 – LOCKED_FAILED
Record locked by another user; not available Explanation: The system attempted to perform an operation on a record that was already locked by another file connector or program. User Action: You must take the following actions: a. In a file sharing environment, this condition is expected to occur from time to time. Add a declarative procedure to trap this error. b. If your program does not require sharing that file, remove the ALLOWING clause from the OPEN statement and the APPLY LOCK-HOLDING clause in the ENVIRONMENT DIVISION (if present).
10.32 – LOCKED_OK
Record locked by another user; available Explanation: While executing a START or READ statement with a REGARDLESS phrase, the system encountered a locked record. The record is available in the record area. User Action: In a file sharing environment, this condition is expected when using the REGADARDLESS phrase. Add a declarative procedure to handle this condition.
10.33 – LOWERLENZERO
FUNCTION LOWER-CASE argument length cannot be zero. Explanation: A group consisting solely of a variable-length table was used as an argument to LOWER-CASE and its current lowbound was 0. User Action: If this is not the desired result, modify the source program to ensure a valid argument or avoid the function with an invalid argument.
10.34 – MODBOUNDS
argument to FUNCTION MOD out of bounds. Explanation: The second argument to FUNCTION MOD cannot be zero. User Action: If this is not the desired result, modify the source program to ensure a valid argument or avoid the function with an invalid argument.
10.35 – NESERRPER
Nesting error for PERFORM Explanation: The last statement the program executed was a PERFORM statement whose range was exited in an order that violates the rules for nesting PERFORM statements in COBOL programs. PERFORM statement ranges must be exited in reverse order from the order in which they are activated. User Action: Check the program logic of the PERFORM range nesting to ensure that the program exits from nested PERFORM ranges in the reverse order in which they are activated.
10.36 – NO_CURRENT
No current record, no previous READ Explanation: The program executed a REWRITE or DELETE statement for a file in sequential access mode when there was no current record. The I-O operation immediately before the REWRITE or DELETE must be a READ statement. This rule applies to indexed files with duplicate primary keys that are opened in dynamic access mode. User Action: Check the program logic to ensure that no I-O statement executes between the READ and REWRITE or DELETE statements.
10.37 – NO_NEXT_RECORD
No next logical record exists Explanation: The program attempted a sequential READ after the first such READ failed with an end of file error, or after a failed START statement. User Action: Verify the program logic. If you expect that your program will attempt a sequential READ in one of these situations, add a declarative procedure to handle this condition.
10.38 – NO_SPACE
No file space on device Explanation: The OPEN statement failed because the device is full. User Action: You must take the following actions: a. Verify the device where the file resides. b. Delete unneeded files to free more space.
10.39 – NOT_INPUT
File not open, or incompatible open mode Explanation: The program attempted to execute a READ statement on a file connector that was not opened, or not opened in the correct mode. User Action: You must take the following actions: a. Verify the program logic, paying particular attention to the open mode. Consult the description of the valid open modes for the READ statement, based on file organization and access mode. Refer to the table under the OPEN statement in the COBOL Reference Manual for this information. b. Verify that the OPEN operation was successful.
10.40 – NOT_IO
File not open, or incompatible open mode Explanation: The program attempted to execute a REWRITE or a DELETE statement on a file connector that was not opened, or not opened in the correct mode. User Action: You must take the following actions: a. Verify the program logic, paying particular attention to the open mode. Consult the description of the valid open modes for the REWRITE or DELETE statement, based on file organization and access mode. Refer to the table under the OPEN statement in the COBOL Reference Manual for this information. b. Verify that the OPEN operation was successful.
10.41 – NOT_LOCKED_IDX
Previous indexed START or READ did not lock record Explanation: When your program executes a REWRITE or DELETE statement for a file in sequential access mode, the current record must be locked. This message indicates that, for an indexed file, this condition was not met. User Action: You must take the following actions: a. Verify that the previous START or READ statement that established the current record did not include an ALLOWING UPDATERS file sharing option. This option does not lock the record. b. Check the program logic to ensure that there are no UNLOCK statements that unlocked the current record.
10.42 – NOT_LOCKED_REL
Previous relative START or READ did not lock record Explanation: When your program executes a REWRITE or DELETE statement for a file in sequential access mode, the current record must be locked. This message indicates that, for a relative file, this condition was not met. User Action: You must take the following actions: a. Verify that the previous START or READ statement that established the current record did not include an ALLOWING UPDATERS file sharing option. This option does not lock the record. b. Check the program logic to ensure that there are no UNLOCK statements that unlocked the current record.
10.43 – NOT_MASS_STORAGE
Open on unknown or non-mass storage device Explanation: The specified device is not a valid device. User Action: You must take the following actions: a. Check the spelling of the filespec. b. If the spelling is correct, verify that any logicals used in the name are properly defined. c. Use the DCL command DIRECTORY to verify that the device exists.
10.44 – NOT_OPEN
File not open, or incompatible open mode Explanation: The program attempted to execute a CLOSE statement on a file connector that was not opened, or not opened in the correct mode. User Action: You must take the following actions: a. Verify the program logic, paying particular attention to the open mode. Consult the description of the valid open modes for the CLOSE statement, based on file organization and access mode. Refer to the table under the OPEN statement in the COBOL Reference Manual for this information. b. Verify that the OPEN operation was successful. c. If you expect that your program may attempt to close unopened files, add a declarative procedure to handle this condition.
10.45 – NOT_OUTPUT
File not open, or incompatible open mode Explanation: The program attempted to execute a WRITE statement on a file connector that was not opened, or not opened in the correct mode. User Action: You must take the following actions: a. Verify the program logic, paying particular attention to the open mode. Consult the description of the valid open modes for the WRITE statement, based on file organization and access mode. Refer to the table under the OPEN statement in the COBOL Reference Manual for this information. b. Verify that the OPEN operation was successful.
10.46 – NUMVALARGINV
argument to FUNCTION NUMVAL or NUMVAL-C is invalid. Explanation: The argument does not conform to an allowable format (see Reference Manual for format). User Action: If this is not the desired result, modify the source program to ensure a valid argument or avoid the function with an invalid argument.
10.47 – OPEN_ERROR
Error during OPEN on file Explanation: The system produced an error when executing an OPEN statement. No more detailed information is available. User Action: Use the special symbol RMS-CURRENT-STS to see which RMS error caused the OPEN statement to fail. If the RMS condition is common, please submit a problem report suggesting that a better message be provided. Be sure to include the value of RMS-CURRENT-STS in your report.
10.48 – OPEN_MFT
Error during open of multifile tape Explanation: The system produced an error when attempting to open a file that is present on a multiple file tape. User Action: You must take the following actions: a. Check that the correct tape is in the tape drive. b. For files opened for input, check that the file indicated by its position exists on the tape. Use the DCL command DIRECTORY and count the files that are displayed. c. For files opened for output, verify that the file position specified in the APPLY clause makes the file the last one on the tape and that all previous files exist.
10.49 – ORDLENONE
the length of the argument to FUNCTION ORD is not one character Explanation: Function argument must be one charcter in length. User Action: If this is not the desired result, modify the source program to ensure a valid argument or avoid the function with an invalid argument.
10.50 – PAGE_SIZE
Invalid pagesize specified on file Explanation: The specified pagesize is zero. User Action: Change the pagesize to a non-zero value.
10.51 – PERMANENT_ERROR
Unknown permanent error Explanation: The system produced an unspecified error during an I-O operation. Under normal operation, this message should never appear. User Action: Use the special symbol RMS-CURRENT-STS to see which RMS error caused the statement to fail. Please submit a problem report suggesting that a better message be provided. Be sure to include the value of RMS-CURRENT-STS in your report.
10.52 – PRESVALBOUNDS
argument to FUNCTION PRESENT-VALUE out of bounds. Explanation: The first argument to FUNCTION PRESENT-VALUE must be greater than -1. User Action: If this is not the desired result, modify the source program to ensure a valid argument or avoid the function with an invalid argument.
10.53 – RANDOMBOUNDS
argument to FUNCTION RANDOM out of bounds. Explanation: The argument to FUNCTION RANDOM must be greater than or equal to zero. User Action: If this is not the desired result, modify the source program to ensure a valid argument or avoid the function with an invalid argument.
10.54 – READ_ERROR
Error during READ on file Explanation: The system produced an error when attempting to read from a file. No more detailed information is available. User Action: Use the special symbol RMS-CURRENT-STS to see which RMS error caused the read operation to fail. If the RMS condition is common, please submit a problem report suggesting that a better message be provided. Be sure to include the value of RMS-CURRENT-STS in your report.
10.55 – RECACTPER
Recursize activation of PERFORM Explanation: The program attempted to execute a PERFORM statement that has the same end paragraph or section as a currently active PERFORM statement. Recursive activation of PERFORM statements violates the rules for nesting PERFORM statements in COBOL programs. PERFORM statements with the same end paragraph or section cannot be active at the same time. User Action: Check the program logic of the PERFORM statements to ensure that the program exits from the first PERFORM statement before attempting to execute a subsequent PERFORM statement with the same end paragraph or section.
10.56 – REMBOUNDS
argument to FUNCTION REM out of bounds. Explanation: The 2nd argument to FUNCTION REM cannot be zero. User Action: If this is not the desired result, modify the source program to ensure a valid argument or avoid the function with an invalid argument.
10.57 – REVERSELENZERO
FUNCTION REVERSE argument length cannot be zero. Explanation: A group consisting solely of a variable-length table was used as an argument to REVERSE and its current lowbound was 0. User Action: If this is not the desired result, modify the source program to ensure a valid argument or avoid the function with an invalid argument.
10.58 – REWRITE_ERROR
Error during REWRITE on file Explanation: The system produced an error when attempting to update a file. No more detailed information is available. User Action: Use the special symbol RMS-CURRENT-STS to see which RMS error caused the REWRITE statement to fail. If the RMS condition is common, please submit a problem report suggesting that a better message be provided. Be sure to include the value of RMS-CURRENT-STS in your report.
10.59 – REWRITE_SIZE
Attempt to rewrite a different record size Explanation: The record size specified for a REWRITE statement was less than the minimum or greater than the maximum record size specified for the file. User Action: Verify the program logic, paying particular attention to the variables used in OCCURS DEPENDING ON phrases.
10.60 – SIZE_CHANGED
Size of rewritten record changed Explanation: For a file with sequential file organization, the REWRITE statement must not change the record size. User Action: Verify the program logic, paying particular attention to the variables used in OCCURS DEPENDING ON phrases.
10.61 – SORT_ERROR
Error during SORT or MERGE on SD Explanation: The program produced an unknown error during a sort operation. User Action: Check the secondary status displayed with the error message. Consult the VMS documentation on SORT/MERGE for more information about specific SORT errors.
10.62 – START_ERROR
Error during START Explanation: The system produced an error while attempting to execute a START statement. No more detailed information is available. User Action: Use the special symbol RMS-CURRENT-STS to see which RMS error caused the START statement to fail. If the RMS condition is common, please submit a problem report suggesting that a better message be provided. Be sure to include the value of RMS-CURRENT-STS in your report.
10.63 – SWITCH_FAIL
SET external switch statement failed Explanation: The system produced an error when attempting to change the switch setting. Under normal operation, this error should not occur. User Action: Check to see that the logical name tables have not overflowed. If the problem is reproducible, please submit a problem report along with sample code demonstrating the problem.
10.64 – UNDEF_EXP
Attempting undefined exponentiations; Execution continues Explanation: The system produced a size error when attempting to perform an undefined exponentiation operation whose associated statement does not include a SIZE ERROR clause. User Action: Add an ON SIZE ERROR or a NOT ON SIZE ERROR clause to the statement in your program that causes the error.
10.65 – UNLOCK_ERROR
Error during UNLOCK Explanation: The system produced an error while executing an UNLOCK statement. No more detailed information is available. User Action: Use the special symbol RMS-CURRENT-STS to see which RMS error caused in the UNLOCK statement to fail. If the RMS condition is common, please submit a problem report suggesting that a better message be provided. Be sure to include the value of RMS-CURRENT-STS in your report.
10.66 – UNLOCK_FAILED
UNLOCK on file that is not open Explanation: The program attemped to execute an UNLOCK statement on a file connector that was not open. User Action: Verify the program logic, paying particular attention to areas where the program opens and closes the specified file connector.
10.67 – UPPERLENZERO
FUNCTION UPPER-CASE argument length cannot be zero. Explanation: A group consisting solely of a variable-length table was used as an argument to UPPER-CASE and its current lowbound was 0. User Action: If this is not the desired result, modify the source program to ensure a valid argument or avoid the function with an invalid argument.
10.68 – WRITE_ERROR
Error during WRITE Explanation: The program produced an error while executing a WRITE statement. No more detailed information is available. User Action: Use the special symbol RMS-CURRENT-STS to see which RMS error caused the WRITE statement to fail. If the RMS condition is common, please submit a problem report suggesting that a better message be provided. Be sure to include the value of RMS-CURRENT-STS in your report.
10.69 – WRITE_SIZE
Attempt to write a different record size Explanation: The program attempted to write a record that was less than the minimum or greater than the maximum record size specified for the file. User Action: Verify the program logic, paying particular attention to the variables used in DEPENDING ON phrases.
11 – Parameters
{file-spec [/file-qualifier]}... Specifies one or more COBOL source programs to be compiled. If a file specification does not contain a file type, the compiler uses the default file type of COB. You can specify more than one input file but you must use separators. Each file is compiled separately when you separate the file specifications with a comma. Files separated by plus signs are concatenated in a single compilation. No wild card characters are allowed in the file specification.
12 – Directives
A directive is a structured comment that is interpreted by the compiler. All VSI COBOL directives begin with the charaters "*DC", where the asterisk (*) signals the beginning of the structured comment to the compiler. VSI COBOL provides directives for ALIGNMENT only.
12.1 – ALIGNMENT Directives
The syntax of the ALIGNMENT directives is as follows: *DC SET ALIGNMENT *DC SET NOALIGNMENT *DC END-SET ALIGNMENT You can use these ALIGNMENT directives to alter the current alignment for binary data by specifying new alignment information from within your source program. The SET ALIGNMENT directive specifies natural alignment. The SET NOALIGNMENT directive specifies OpenVMS VAX compatible alignment. The END-SET ALIGNMENT directive terminates the current SET ALIGNMENT (or SET NOALIGNMENT) directive. You can also nest these ALIGNMENT directives within a source program by specifying dirrerent alignments for a set of data items. For more information about the ALIGNMENT directives, see the online help on /ALIGNMENT and the COBOL User Manual.
13 – Qualifiers
This list includes the VSI COBOL command qualifiers and options for the COBOL command.
13.1 /ALIGNMENT
/ALIGNMENT[=[NO]PADDING] /NOALIGNMENT (D) Specifies the alignment of binary data items within record structures. Specifying /ALIGNMENT uses OpenVMS Alpha and I64 data alignment to increase performance and conformity to the OpenVMS Alpha and I64 calling standards. The /ALIGNMENT qualifier specifies natural alignment; it aligns all COMP, COMP-1, COMP-2, INDEX, and POINTER data along natural boundaries. A natural boundary is the smallest boundary at which data can be aligned without crossing the next boundary for that type. For example, longword is the natural boundary for four byte integers. Specifying /ALIGNMENT is equivalent to using the SYNCHRONIZED clause or using ALIGNMENT compiler directives. (Refer to the COBOL Reference Manual for information about the SYNCHRONIZED clause.) The /ALIGNMENT=PADDING option indicates Alpha and I64 natural alignment and padding of records according to the OpenVMS Alpha and I64 calling standard. The default, /NOALIGNMENT, specifies OpenVMS VAX compatible data alignment. This qualifier aligns data on byte boundaries for compatibility with HP COBOL for OpenVMS VAX and other OpenVMS VAX languages. The alignment you specify remains in effect throughout a given compilation, except as modified by ALIGNMENT compiler directives. For more information about the behavior of the /ALIGNMENT qualifier and ALIGNMENT compiler directives, refer to the Directives section (in this online HELP facility) and the COBOL User Manual.
13.2 /ANALYSIS_DATA
/ANALYSIS_DATA[=file-spec] /NOANALYSIS_DATA (D) Indicates whether an ANA file is created during compilation. If you have the Source Code Analyzer (SCA) installed on your system, you can use the /ANALYSIS_DATA qualifier to generate an output file of source-code analysis information. The source-code information file generated by the /ANALYSIS_DATA qualifier has a default file name of the primary source file and a default file type of ANA. SCA uses the ANA file to display information about program symbols and source files. The default, /NOANALYSIS_DATA, does not generate an ANA file. For more information about SCA, see the Guide to Source Code Analyzer for OpenVMS Systems.
13.3 /ANSI_FORMAT
/ANSI_FORMAT /NOANSI_FORMAT (D) Indicates that the source program is in conventional ANSI format. The compiler then expects 80-character card image records with optional sequence numbers in character positions 1 through 6, indicators in position 7, Area A beginning in position 8, Area B beginning in position 12, and the identification area in positions 73 through 80. The default, /NOANSI_FORMAT, indicates that the source program is in VSI COBOL terminal format, where Area A begins in position 1, Area B begins in position 5, and the source program records do not have line numbers.
13.4 /ARCHITECTURE
/ARCHITECTURE=option /ARCHITECTURE=GENERIC (D) Determines the type of Alpha chip code that will be generated for a particular program. The /ARCHITECTURE qualifier uses the same options (keywords) as the /OPTIMIZE=TUNE qualifier. Whereas the /OPTIMIZE=TUNE qualifier is primarily used by certain higher-level optimizations for instruction scheduling purposes, the /ARCHITECTURE qualifier determines the type of code instructions generated for the program unit being compiled. OpenVMS Alpha V7.1 and subsequent releases provide an operating system kernel that includes an instruction emulator. This emulator allows new instructions, not implemented on the host processor chip, to execute and produce correct results. Applications using emulated instructions will run correctly, but may incur significant software emulation overhead at runtime. All Alpha processors implement a core set of instructions. Certain Alpha processor versions include additional instruction extensions. The following /ARCHITECTURE options are supported: GENERIC Generates code that is appropriate for all Alpha processor generations. This is the default. Programs compiled with the GENERIC option run all implementations of the Alpha architecture without any instruction emulation overhead. HOST Generates code for the processor generation in use on the system being used for compilation. Programs compiled with this option on other implementations of the Alpha architecture may encounter instruction emulation overhead. EV4 Generates code for the 21064, 21064A, 21066, and 21068 implementations of the Alpha architecture. Programs compiled with the EV4 option run without instruction emulation overhead on all Alpha processors. EV5 Generates code for some 21164 chip implementations of the Alpha architecture that use only the base set of Alpha instructions (no extensions). Programs compiled with the EV5 option run without instruction emulation overhead on all Alpha processors. EV56 Generates code for some 21164 chip implementations that use the byte and word manipulation instruction extensions of the Alpha architecture. Programs compiled with the EV56 option may incur emulation overhead on EV4 and EV5 processors, but will still run correctly on OpenVMS Alpha V7.1 (or later) systems. EV6 Generates code for the 21264 chip implementation that uses the following extensions to the base Alpha instruction set: BWX (Byte/Word manipulation) and MAX (Multimedia) instructions, and square root and FIX (Floating-point convert) instructions. Programs compiled with the EV6 option may incur emulation overhead on EV4, EV5, EV56, and PCA56 processors, but will still run correctly on OpenVMS Alpha V7.1 (or later) systems. EV67, EV68 Generates code for the 21264A chip implementation that uses the following extensions to the base Alpha instruction set: BWX (Byte/Word manipulation) and MAX (Multimedia) instructions, square root and FIX (Floating-point convert) instructions, and CIX (Count) instructions. Programs compiled with the EV67 or EV68 options may incur emulation overhead on EV4, EV5, EV56, EV6, and PCA56 processors, but will still run correctly on OpenVMS Alpha V7.1 (or later) systems. PCA56 Generates code for the 21164PC chip implementation that uses the byte and word manipulation instruction extensions and multimedia instruction extensions of the Alpha architecture. Programs compiled with the PCA56 option may incur emulation overhead on EV4, EV5, and EV56 processors, but still run correctly on OpenVMS Alpha V7.1 (or later) systems. /ARCHITECTURE is currently ignored on OpenVMS I64.
13.5 /ARITHMETIC
/ARITHMETIC={NATIVE,STANDARD} Specifies whether native arithmetic or standard arithmetic is used to evaluate arithmetic operations and statements. NATIVE Selects native arithmetic. Arithmetic operations will produce results that are reasonably compatible with releases of HP COBOL for OpenVMS Alpha prior to V2.7 and also with HP COBOL for OpenVMS VAX. STANDARD Selects standard arithmetic. Most common arithmetic operations will produce results that are predictable, reasonable, and portable. In this context, portable means that the results will be identical from implementation to implementation. Choosing the STANDARD option forces /MATH_INTERMEDIATE=CIT4. The default is /ARITHMETIC=NATIVE.
13.6 /AUDIT
/AUDIT[=("string",...)] /NOAUDIT (D) Controls whether user-supplied text is included in a CDD/Repository history list entry if a compilation accesses the dictionary. You can specify from 1 to 64 strings with the /AUDIT qualifier. If you specify more than one string, separate them with commas and enclose the list in parentheses. If you specify /AUDIT without a string, the compiler creates standard history list entries with no additional text in the dictionary for COPY FROM DICTIONARY records and for information put in the dictionary as a result of specifying the /DEPENDENCY_DATA qualifier. Only one user-supplied string is included in these entries, even though up to 64 can be specified. The default, /NOAUDIT, suppresses the creation of history list entries.
13.7 /CHECK
/CHECK[=(option[,...])] /NOCHECK (D) Specifies conditions to be checked at execution time. Controls whether the system checks the validity of numeric digits or PERFORM statements, indexes, subscripts, reference modification, and the OCCURS DEPENDING ON depending item for specific run-time errors. If you specify a qualifier option, the default options do not change unless they are individually modified. You can select one or more of the following options: [NO]PERFORM Verifies that PERFORM statement rules are met. The default is NOPERFORM. [NO]BOUNDS Verifies the range of subscripts and reference modifiers. The default is NOBOUNDS. [NO]DECIMAL Validates numeric digits when using display numeric items in a numeric context. The default is NODECIMAL. [NO]DUPLICATE_KEYS Verifies that the duplicate key specification for indexed file keys in the source program matches the duplicate key specification in the physical file. The default is NODUPLICATE_KEYS. ALL Same as /CHECK without any options. NONE Same as /NOCHECK. Default if /CHECK is not used. Specifying /CHECK=PERFORM controls whether the system checks PERFORM statements. Incorrect use of PERFORM statements can produce unpredictable results and, when used with the PERFORM option, causes the system to generate a run-time message and abort the program. Specifying /CHECK=BOUNDS controls whether the system checks the range of subscripts, indexes, and the depending item in the DEPENDING ON phrase of the OCCURS clause. The system generates a run-time message and aborts the program if it detects one of these errors: If DEPENDING ON is not specified and a subscript or index is greater than the upper bound or less than or equal to zero If DEPENDING ON is specified and a subscript or index is greater than the depending item or less than or equal to zero If a depending item is less than the low bound or greater than the upper bound, and either a subscripted or indexed item references a table or a group containing the table is referenced as a sending item Specifying /CHECK=DECIMAL controls whether the system checks for numeric characters when using numeric display items in a numeric context and generates an error if any digit is invalid (not numeric). Specify /CHECK=DECIMAL to validate data produced by other systems that might use a different internal representation for numeric data. You can also use this qualifier option to detect logic errors in programs that result in text data being moved to numeric data items. Specifying /CHECK=DECIMAL produces extra instructions to perform these checks, which may result in slightly larger images and slightly longer execution times than the /CHECK=NODECIMAL qualifier option. The default, /NOCHECK, is the equivalent of /CHECK=NONE. Specify /CHECK with the /NOOPTIMIZE qualifier, as optimization can make finding error found by /CHECK more difficult.
13.8 /CONDITIONALS
/CONDITIONALS[=(character,...)] /NOCONDITIONALS (D) Controls whether the conditional compilation lines in a source program are compiled or treated as comments. Specifying /CONDITIONALS results in all conditional compilation lines being compiled. Specifying /CONDITIONALS=(selector,...), where a selector is a list of one or more characters from A to Z, results in the selected conditional compilation lines being compiled. If you specify more than one selector, separate them with commas and enclose the list in parentheses. The default, /NOCONDITIONALS, results in all conditional compilation lines being treated as comments during compilation.
13.9 /CONVERT
/CONVERT[=(option[,...])] /NOCONVERT (D) Instructs the compiler to perform certain conversions to your data. You can select the following option: [NO]LEADING_BLANKS Controls whether or not the compiler changes blanks to zeros in numeric display items. Specifying /CONVERT=LEADING_BLANKS instructs the compiler to check for and change blanks to zeros in numeric display items. Specify /CONVERT=LEADING_BLANKS, if you are using a non-VAX system, to convert your existing COBOL programs to run on an OpenVMS Alpha or I64 system by changing blanks in the data to zeros at run time. Specifying /CONVERT=LEADING_BLANKS produces extra instructions to perform these data conversions, which may result in slightly larger images and slightly longer execution times than the /NOCONVERT qualifier. The default is /NOCONVERT.
13.10 /COPY_LIST
/COPY_LIST /NOCOPY_LIST (D) Controls whether source statements included by COPY statements are printed in the listing file. The /COPY_LIST qualifier has no effect unless you also specify the /LIST qualifier. The default, /NOCOPY_LIST, suppresses the listing of text copied from library files; only the COPY statement appears in the listing file.
13.11 /CROSS_REFERENCE
/CROSS_REFERENCE[=(option[,...])] /NOCROSS_REFERENCE (D) Controls whether the source listing file includes a cross-reference listing. The /CROSS_REFERENCE qualifier has no effect unless you also specify the /LIST qualifier. You can select one or both of the following options: ALPHABETICAL The compiler sorts user-defined names in alphabetical order and lists them with the source program line numbers on which they appear. /CROSS_REFERENCE=ALPHABETICAL is the equivalent of /CROSS_REFERENCE. DECLARED Produces a listing of user-defined names in order of declaration. If you specify /CROSS_REFERENCE=(ALPHABETICAL, DECLARED), the compiler produces a listing of user-defined names in both alphabetical and declared order in the same compilation. In the listing file, the pound sign ( ) indicates the source line containing the definition of the user-defined name, while the asterisk (*) indicates a line on which the associated data item is modified. The default, /NOCROSS_REFERENCE, suppresses the cross-reference listing.
13.12 /DEBUG
/DEBUG[=(option[,...])] /NODEBUG Controls whether the compiler produces traceback and local symbol table information for the VMS Debugger. The /DEBUG qualifier allows you to refer to data items by data name, and to Procedure Division locations by line number, paragraph name, and section name. You can also view source lines from source files and files included by simple COPY statements. The debugger cannot reference source lines from CDD/Repository or any line in which text has been replaced. If you specify a qualifier option, the default options do not change unless they are individually modified. You can select one or more of the following options: [NO]SYMBOLS Produces a local symbol table that allows you to refer to data items by data name and to source lines by line number. The default is NOSYMBOLS. [NO]TRACEBACK Produces traceback information only to provide the debugger with compiler-generated line numbers and names. The default is TRACEBACK. ALL Provides traceback and local symbol table information. /DEBUG=ALL is the equivalent of /DEBUG or /DEBUG=(TRACEBACK,SYMBOLS). NONE Omits traceback and local symbol table information. /DEBUG=NONE is the equivalent of /NODEBUG. The default is /DEBUG=TRACEBACK.
13.13 /DEPENDENCY_DATA
/DEPENDENCY_DATA /NODEPENDENCY_DATA (D) Controls whether or not a compiled module entity is stored in CDD/Repository. If you have CDD/REpository installed on your system, you can use the /DEPENDENCY_DATA qualifier to store CDD/Repository relationship information in the dictionary. The information generated will correlate the VSI COBOL program with: a. The object file created by the compilation b. CDD/Repository entities specified in COPY FROM DICTIONARY statements c. CDD/Repository entities explicitly referenced in the RECORD DEPENDENCY statements The default, /NODEPENDENCY_DATA, indicates that a compiled module entity and CDD/Repository relationships will not be recorded in CDD/Repository.
13.14 /DIAGNOSTICS
/DIAGNOSTICS[=file-spec] /NODIAGNOSTICS (D) Creates a diagnostic file containing compiler messages and diagnostic information. The diagnostic file is reserved for use by HP. The Language-Sensitive Editor (LSE) uses the diagnostic file to display diagnostic messages and to position the cursor on the line and column where a source error exists. The default file type for a diagnostic file is DIA. The default, /NODIAGNOSTICS, suppresses the creation of a diagnostic file.
13.15 /DISPLAY_FORMATTED
/DISPLAY_FORMATTED /NODISPLAY_FORMATTED (D) In COBOL DISPLAY statements, supports the WITH CONVERSION syntax implicitly for numeric data fields which contain non-printing values. The compile-time qualifier /DISPLAY_FORMATTED must be explicitly present in the compilation command line to cause the conversion of non-printing numeric values to human-readable printing values when they are displayed at the user's terminal display unit. The default, /NODISPLAY_FORMATTED, retains the behaviour of not converting non-printing numeric values when displaying them to the user's terminal display.
13.16 /FIPS
/FIPS=74 /NOFIPS (D) Supports the Federal Information Processing Standards Publication 21--1 (FIPS-PUB 21--1), issued by the U.S. National Bureau of Standards, interpretation of file status. FIPS-PUB 21--1 specifies that a file status of 10 be returned when reporting at end conditions. The /FIPS=74 qualifier returns a file status of 10 when reporting at end conditions. The following table compares the file status values that are returned when you use or do not use the /FIPS=74 qualifier. Note that these at end file status values apply to any file organization accessed sequentially. __________________________________________________________________ FILE STATUS VALUES __________________________________________________________________ /FIPS=74 /NOFIPS __________________________________________________________________ The file has no next logical record. 10 13 An optional file was not present. 10 15 The program did not establish a valid 10 16 next record. __________________________________________________________________ The default, /NOFIPS, ensures version to version compatibility for COBOL. The /FIPS=74 and /NOFIPS qualifier only apply when you also specify /STANDARD=V3.
13.17 /FLAGGER
/FLAGGER[(=option,...)] /NOFLAGGER (D) Allows you to specify a FIPS level of COBOL syntax, in accordance with the Federal Information Processing Standards Publication 21-3 (FIPS-PUB 21-3) issued by the U.S. National Bureau of Standards, beyond which the compiler generates informational messages. To receive these informational messages, you must also specify /WARNINGS=ALL or /WARNINGS=INFORMATIONAL. Use the /FLAGGER qualifier when you know that your target system's compiler has a low level of FIPS syntax support. The following table shows the required functional processing modules and the optional modules supported by VSI COBOL. The table also shows the COBOL subsets that correspond to the FIPS levels of Minimum, Intermediate, and High. The levels numbers (0, 1, and 2) correspond to the levels indicated in the 1985 ANSI COBOL standard. __________________________________________________________________ RELATIONSHIP AMONG VSI COBOL MODULES, SUBSETS, AND LEVELS __________________________________________________________________ COBOL Subsets ________________________________________ Minimum Intermediate High __________________________________________________________________ Required Modules __________________________________________________________________ Nucleus 1 1 2 Sequential I-O 1 1 2 Relative I-O 0 1 2 Indexed I-O 0 1 2 Interprogram Communication 1 1 2 Sort-merge 0 1 1 Source Text Manipulation 0 1 2 __________________________________________________________________ Optional Modules __________________________________________________________________ Report Writer --, or 1 --, or 1 --, or 1 Segmentation --, 1, or 2 --, 1, or 2 --, 1, or 2 __________________________________________________________________ Table Legend: 0---Null level (the module is not included in the subset) 1---First nonnull level 2---Second nonnull level Dash---Optional __________________________________________________________________ When you use the /FLAGGER qualifier with its options, you receive informational messages for syntax in the source program as follows: a. Not within the FIPS validation level you selected b. Within the optional module you selected c. For obsolete language elements as defined by the ANSI 1985 standard for the COBOL language d. For HP extensions to the COBOL language You can select one or more of the following options: HIGH_FIPS Flags language constructs that are above the FIPS high validation level, such as HP extensions to ANSI COBOL. INTERMEDIATE_FIPS Flags language constructs that are above the FIPS intermediate validation level, such as language constructs that are within the FIPS high validation level or HP extensions to ANSI COBOL. MINIMUM_FIPS Flags language constructs that are above the FIPS minimum validation level, such as language constructs that are within the FIPS high and intermediate validation levels or HP extensions to ANSI COBOL. OBSOLETE Flags language constructs that the ANSI 1985 COBOL Standard identifies as obsolete. If a language construct is within the selected FIPS validation level or optional module and is also on the obsolete list, the compiler generates only the obsolete informational message. OPTIONAL_FIPS Flags language constructs that are within FIPS optional modules, including Report Writer and Segmentation. REPORT_WRITER A subset of OPTIONAL_FIPS that flags language constructs that are within the FIPS optional module Report Writer. SEGMENTATION A subset of OPTIONAL_FIPS that flags language constructs that are within the FIPS optional module Segmentation. SEGMENTATION_1 A subset of OPTIONAL_FIPS that flags language constructs that are above the level 1 of the FIPS optional module Segmentation. You can use any combination of qualifier options. If you specify more than one validation level, the compiler uses the lowest level. If you use the /FLAGGER qualifier without specifying a FIPS level and with another option, the compiler assumes /FLAGGER=HIGH_FIPS. You cannot specify the /FLAGGER qualifier with the /STANDARD=V3 qualifier. The default is /NOFLAGGER. For additional information about the required and optional modules for the COBOL language, refer to the American National Standard Programming Language - COBOL, ANSI X3.23-1895, ISO 1989-1985. For more information about the FIPS validation levels, see Federal Information Processing Standards Publication 21-3.
13.18 /FLOAT
/FLOAT=[option] Specifies the floating-point data format to be used in memory for single and double precision data items. You can use the /FLOAT qualifier at compile time to specify either VAX F_floating or IEEE S_floating formats for single precision data items or VAX D_floating or VAX G_floating or IEEE T_floating formats for double precision data items. You cannot mix VAX and IEEE formats in the same compilation unit. You can select one of the following options: D_FLOAT Specifies that the memory format for COMP-1 data is VAX F_floating and for COMP-2 data is VAX D_floating. The default is D_FLOAT on OpenVMS Alpha. Note that D_floating on Alpha and I64 is not 100% compatible with D_floating on VAX. G_FLOAT Specifies that the memory format for COMP-1 data is VAX F_floating and for COMP-2 data is VAX G_floating. Note that G_floating on I64 is not 100% compatible with G_floating on Alpha and VAX. IEEE_FLOAT Specifies that the memory format for COMP-1 data is IEEE S_floating and for COMP-2 data is IEEE T_floating. The default is IEEE_FLOAT on OpenVMS I64. The IEEE standard for binary floating-point arithmetic, ANSI/IEEE 754-1985, defines four floating-point formats in two groups, basic and extended, each group having two widths, single and double. The Alpha architecture supports the basic single and double formats. Refer to the Alpha Architecture Reference Manual for more information about using floating-point data types with the Alpha architecture. Because the Alpha and I64 architectures are IEEE-compliant, you can run existing COBOL programs containing IEEE floating-point data formats with VSI COBOL. Specifying /FLOAT without an option is equivalent to specifying /FLOAT=D_FLOAT on OpenVMS Alpha and /FLOAT=IEEE_FLOAT on OpenVMS I64.
13.19 /GRANULARITY
/GRANULARITY[=option ] Specifies the minimum size of a memory access. Use this qualifier if different processes sharing memory attempt to update different parts of the same aligned quadword concurrently. The option can be one of the following: o BYTE - Used if concurrent processes sharing memory may be updating different bytes within the same quadword. o LONG - Used if concurrent processes sharing memory may be updating different longwords within the same quadword. o QUAD - (default) Used for best performance if you are sure that no concurrent updates will occur within the same aligned quadword.
13.20 /INCLUDE
/INCLUDE=(pathname[,...]) /NOINCLUDE (D) Provides an additional level of search for non-dictionary COPY files whose names do not include a directory component. Each pathname argument can be either a logical name or a legal directory specification. The compiler first searches for copy files in the current default directory. If the file is not found, each "pathname" location is searched in the order of specification on the command line. The first file located that satisfies the COPY statement is used and the search terminates. /NOINCLUDE, which is the default, means to only search for files in the current default directory. This option applies to .LIB files or .TLB files depending on the type of COPY statement used.
13.21 /LIST
/LIST[=file-spec] /NOLIST Controls whether the compiler produces an output listing file. When you specify /LIST, you can control the defaults applied to the output file specification by your placement of the qualifier in the command. The listing file always contains a listing of the source program. Other portions of the listing file are optionally produced under the control of the /MACHINE_CODE, /MAP, and /CROSS_REFERENCE qualifiers. The /LIST qualifier is required when you want to use the /CROSS_REFERENCE, /COPY_LIST, /FLAGGER, /MACHINE_CODE, or /MAP qualifiers. In batch mode, /LIST, the default, causes the compiler to create an output listing file with the same file name as the input source file and with a default file type of LIS. In interactive mode, /NOLIST, the default, suppresses the creation of a listing file.
13.22 /MACHINE_CODE
/MACHINE_CODE /NOMACHINE_CODE (D) Controls whether the listing file contains a list of compiler generated machine code. The /MACHINE_CODE qualifier has no effect unless you also specify the /LIST qualifier. The default, /NOMACHINE_CODE, suppresses compiler generated machine code in the listing file. If you specify the /MACHINE_CODE qualifier with the /OPTIMIZE qualifier, the machine code listing may not reflect the actual code executed for a given statement nor the order of execution.
13.23 /MAP
/MAP[=option] /NOMAP (D) Controls whether the compiler produces the following maps in the listing file: a. data names, procedure names, file names, and their attributes b. external references such as user-called routines or Run-Time Library routines You can control the format of the data name, procedure name, and file name maps in the listing file by specifying one or both of the following options: ALPHABETICAL Produces an alphabetical list of map items /MAP=ALPHABETICAL is the equivalent of /MAP. DECLARED Produces a list of map items in the order in which they were declared If you specify /MAP=(ALPHABETICAL,DECLARED), the compiler produces both alphabetical and declared map listings. The /MAP qualifier has no effect unless you also specify the /LIST qualifier. The default, /NOMAP, suppresses the creation of maps in the listing file.
13.24 /MATH_INTERMEDIATE
/MATH_INTERMEDIATE[={FLOAT,CIT3,CIT4}] Specifies the intermediate data type to be used when the result of an arithmetic operation can not be represented exactly. FLOAT Selects double-precision floating-point for the intermediate data type. Intermediate values are truncated to the most significant 53 bits, providing approximately 15 decimal digits of precision. CIT3 Selects COBOL Intermediate Temporary (design 3) for the intermediate data type. Intermediate values are truncated to the most significant 18 decimal digits. CIT4 Selects COBOL Intermediate Temporary (design 4) for the intermediate data type. Intermediate values are truncated to the most significant 32 decimal digits. The default is /MATH_INTERMEDIATE=FLOAT.
13.25 /NAMES
/NAMES[(=option)] /NAMES=UPPER (D) Controls whether the compiler translates external names (program-id's,literal entry-names in CALL statements, external data items) to uppercase, lowercase or leaves it unchanged. AS_IS Causes VSI COBOL not to change the case of literal entry-names for CALL statements. The AS_IS option has no effect on other external datanames or program-id names. VSI COBOL does not support mixed-case of external data names or program-id names. However, specifying the AS_IS option may be useful for calling non-Cobol routines. When AS_IS is specified, external datanames and program-id's are treated as if UPPER has been specified. LOWER Causes VSI COBOL to force all external names (program-id's, literal entry-names in CALL statements, external data items) to be lowercase. UPPER Causes VSI COBOL to force all external names (program-id's, literal entry-names in CALL statements, external data items) to be uppercase. This is the default. The default is /NAMES=UPPER.
13.26 /NATIONALITY
/NATIONALITY[(=option)] /NATIONALITY=US (D) Controls whether national language features are selected. US The default currency sign and symbol are the Dollar sign and Japanese language support features are disabled. JAPAN The default currency sign and symbol are the Yen sign and Japanese language support features are enabled. /NODIAGNOSTICS and /NOANALYSIS_DATA are specified implicitly. The specific features enabled include: . Yen currency-sign . National character user-defined-words . National data items (PIC N) . National literal (N"") The default is /NATIONALITY=US.
13.27 /OBJECT
/OBJECT[=file-spec] (D) /NOOBJECT Controls whether the compiler produces an object file. By default, the compiler produces an object file with the same file name as the input file and a default file type of OBJ. However, you can define a different file name or a different file type by specifying /OBJECT=file-spec. Specify /NOOBJECT to speed up compilations during program development and when you want to check syntax.
13.28 /OPTIMIZE
/OPTIMIZE[=LEVEL=n] /OPTIMIZE=TUNE=option /OPTIMIZE=LEVEL=4 (D) /OPTIMIZE=TUNE=GENERIC (D) /NOOPTIMIZE Controls how the compiler produces optimized code. The default is /OPTIMIZE, which is the same as /OPTIMIZE=(LEVEL=4, TUNE=GENERIC). For a debugging session, use the negative form (/NOOPTIMIZE or /OPTIMIZE=LEVEL=0) to ensure that the debugger has sufficient information to locate errors in the source program. In most cases, using /OPTIMIZE will make the program execute faster. As a side effect of getting the fastest execution speeds, using /OPTIMIZE can produce larger object modules and longer compile times than /NOOPTIMIZE. LEVEL=n You can select one of the following levels: 0 Has the same effect as /NOOPTIMIZE. All optimizations are turned off. 1 Has some optimizations (such as instruction scheduling). 2 Adds more optimizations (such as loop unrolling and split lifetime analysis) to those in level 1. 3 Adds more optimizations (such as decimal shadowing) to those in level 2. All optimizations are turned on. 4 Is identical to level 3. /OPTIMIZE=LEVEL=4 is the equivalent of /OPTIMIZE or not specifying /OPTIMIZE. Specify /NOOPTIMIZE if you specify /DEBUG when compiling a program. /NOOPTIMIZE expedites and simplifies your debugging session by putting the machine code in the same order as the lines in the source program. Optimizations can cause unexpected and confusing behavior in a debugging session. For more information about debugging your program with the /NOOPTIMIZE qualifier, see the COBOL User Manual. Specify /NOOPTIMIZE if you specify /MACHINE_CODE when compiling a program to ensure that the machine code listing reflects the actual code executed for a given statement as well as the order of execution. The /NOOPTIMIZE qualifier is also useful in conjunction with /CHECK, as optimization can make checking more difficult. Specifying /OPTIMIZE, the default, usually makes programs run faster. However, using /OPTIMIZE produces extra instructions to perform the optimization, which may result in larger object modules and longer compile times than the /NOOPTIMIZE qualifier. To speed compilations during program development, you may want to compile with the /NOOBJECT qualifier when you want to check syntax, with /NOOPTIMIZE when you check for correct execution, and later with /OPTIMIZE for your final check. For more information about optimizing your program with the /OPTIMIZE qualifier, see the COBOL User Manual. TUNE=keyword Specifies the kind of optimized code to be generated. The keyword can be any of the following: Keyword Meaning ------- ------- GENERIC Generates and schedules code that will execute well for both generations of Alpha processors. This provides generally efficient code for those cases where both processor generations are likely to be used. HOST Generates and schedules code optimized for the processor generation in use on the system being used for compilation. EV4 Generates and schedules code optimized for the 21064, 21064A, 21066, and 21068 implementations of the Alpha chip. EV5 Generates and schedules code optimized for the 21164 implementation of the Alpha chip. This processor generation is faster than EV4. EV56 Generates code for some 21164 chip implementations that use the byte and word manipulation instruction extensions of the Alpha architecture. Running programs compiled with the EV56 keyword may incur emulation overhead on EV4 and EV5 processors, but will still run correctly on OpenVMS Alpha V7.1 (or later) systems. EV6 Generates and schedules code for the 21264 chip implementation that uses the following extensions to the base Alpha instruction set: BWX (Byte/Word manipulation) and MAX (Multimedia) instructions, square root and FIX (Floating-point convert) instructions. Running programs compiled with the EV6 keyword may incur emulation overhead on EV4, EV5, EV56, and PCA56 processors, but will still run correctly on OpenVMS Alpha V7.1 (or later) systems. EV67,EV68 Generates and schedules code for the 21264A chip implementation that uses the following extensions to the base Alpha instruction set: BWX (Byte/Word manipulation) and MAX (Multimedia) instructions, square root and FIX (Floating-point convert) instructions, and CIX (Count) instructions. Running programs compiled with the EV67 or EV68 keywords may incur emulation overhead on EV4, EV5, EV56, EV6, and PCA56 processors, but will still run correctly on OpenVMS Alpha V7.1 (or later) systems. PCA56 Generates code for the 21164PC chip implementation that uses the byte and word manipulation instruction extensions and multimedia instruction extensions of the Alpha architecture. Running programs compiled with the PCA56 keyword may incur emulation overhead on EV4, EV5, and EV56 processors, but will still run correctly on OpenVMS Alpha V7.1 (or later) systems. /OPTIMIZE=TUNE is currently ignored on OpenVMS I64.
13.29 /RESERVED_WORDS
/RESERVED_WORDS[=(option[,...])] /RESERVED_WORDS=XOPEN (D) Controls whether the compiler recognizes certain COBOL words as reserved words. You can select the following option: [NO]XOPEN Controls whether or not the compiler recognizes reserved words defined by the COBOL X/Open Portability Guide. Use /RESERVED_WORDS=NOXOPEN if your program uses one or more of the X/Open reserved words as an identifier. The default is /RESERVED_WORDS=XOPEN. The X/Open reserved words are as follows: AUTO FULL BACKGROUND-COLOR HIGHLIGHT BELL LOWLIGHT BLINK REQUIRED EOL RETURN-CODE EOS REVERSE-VIDEO ERASE SCREEN FOREGROUND-COLOR SECURE UNDERLINE [NO]FOREIGN_EXTENSIONS Controls whether or not the compiler recognizes reserved words used by foreign extensions (language constructs that are not part of HP COBOL). Use /RESERVED_WORDS=FOREIGN_EXTENSIONS if you want the compiler to output specific diagnostics of foreign extensions to assist you in porting to VSI COBOL from other COBOL dialects. Do not use this option if your program uses any of the foreign_extensions reserved words as user-defined words. The reserved words that are recognized for foreign_extensions are: ADDRESS OTHERWISE CHANGED PASSWORD CORE-INDEX POSITIONING DBCS RECORDING DISP RECORD-OVERFLOW DISPLAY-1 RELOAD EJECT REMARKS ENTRY REORG-CRITERIA EXAMINE RETURNING EXHIBIT SERVICE GOBACK SKIP1 ID SKIP2 KANJI SKIP3 NAMED TRACE NOTE TRANSFORM [NO]200X Controls whether or not the compiler recognizes selected reserved words defined by the ANSI-200x draft standard. Use /RESERVED_WORDS=NO200X if your program uses one or more of these reserved words as an identifier. The default is /RESERVED_WORDS=NO200X. The selected ANSI-200x draft standard reserved words are as follows: BINARY-CHAR FLOAT-LONG BINARY-DOUBLE FLOAT-SHORT BINARY-LONG OPTIONS BINARY-SHORT SIGNED COL SYMBOL FLOAT-EXTENDED UNSIGNED
13.30 /SEPARATE_COMPILATION
/SEPARATE_COMPILATION /NOSEPARATE_COMPILATION (D) Specifies that a source file that contains multiple separately-compiled programs (SCPs) should be compiled into an object file that consists of a concatenation of modules, each containing a single procedure. This object may be inserted into an object library from which the linker can extract the procedures that are specifically needed. The default, /NOSEPARATE_COMPILATION, specifies that such a program should be compiled as a single unit, producing an object file that consists of one module with multiple embedded procedures. If this object is inserted into an object library and any part of a module must be loaded, the linker must extract the entire object.
13.31 /SEQUENCE_CHECK
/SEQUENCE_CHECK /NOSEQUENCE_CHECK (D) Controls whether the compiler produces a sequence check on the line numbers in columns 1 through 6 of the source program. Source programs written in terminal format always pass the sequence check. The default, /NOSEQUENCE_CHECK, suppresses sequence checking.
13.32 /STANDARD
/STANDARD[(=option,...)] /STANDARD=85 (D) Controls whether the compiler generates code according to either the ANSI 1974 or 1985 COBOL standard and produces informational messages associated with specific language features. To receive these informational messages, you must also specify /WARNINGS=ALL or /WARNINGS=INFORMATIONAL. You can select one or more of the following options: 85 Produces code according to the 1985 ANSI standard for certain constructs. The default is /STANDARD=85. [NO]V3 Produces code in the manner of version 3.4 of VAX COBOL in specific instances, and issues informational messages for language constructs that would cause different run-time results if /STANDARD=85 had been specified. The default is NOV3. [NO]SYNTAX Produces informational diagnostics on language features that point out HP extensions to the ANSI 1985 COBOL Standard. The default is NOSYNTAX. [NO]XOPEN Produces code for the ASSIGN clause and default file-sharing behavior in the manner of the X/Open CAE specification for the COBOL language. The default is NOXOPEN. [NO]MIA Issue informational diagnostics for the language elements which do not conform to the MIA (Multivendor Integration Architecture). The default is NOMIA. VSI COBOL is based on the ANSI 1985 COBOL standard. As such, VSI COBOL provides full support for the /STANDARD=85 qualifier option as well as support for some features of the /STANDARD=V3 qualifier option that were available with VAX COBOL Version 4.0 and higher. For information about the HP COBOL for OpenVMS VAX implementation of the /STANDARD=V3 qualifier option, see the COBOL User Manual. When you specify /STANDARD=V3 in the following specific instances, VSI COBOL exhibits behavior that is consistent with the ANSI 1985 COBOL standard: . When evaluating subscripts in STRING, UNSTRING, INSPECT (Format 3), and the REMAINDER phrase of the DIVIDE statement. . When evaluating reference modification in STRING, UNSTRING, and INSPECT (Format 3) statements. . When evaluating the order of identifiers in some PERFORM (Format 4) statements. . When interpreting PIC P items in some move and comparison operations. . When determining the size of variable-length tables in some MOVE statements. When you specify /STANDARD=V3 in the following four specific instances, VSI COBOL exhibits behavior that is identical to the VAX COBOL Version 4.0 and higher behavior, when specifying /STANDARD=V3: a. EXIT PROGRAM statement in a main program If you specify /STANDARD=V3, the compiler treats an EXIT PROGRAM statement as a return in both main programs and subprograms. Specify /STANDARD=85 to bypass an EXIT PROGRAM statement in the body of a main program and execute the statements following the EXIT PROGRAM statement. If the program is a subprogram, the EXIT PROGRAM statement acts as a return to the program that called the subprogram. b. I-O file status values If you specify /STANDARD=V3, you receive the file status values listed in the left-hand column, labeled V3. If you specify /STANDARD=85, you receive the file status values listed in the right-hand column, labeled 85. The following table explains the I-O error conditions and lists the corresponding file status values for the /STANDARD qualifier using the V3 and 85 options. __________________________________________________________________ I-O File Status Values for the /STANDARD Qualifier __________________________________________________________________ I-O Error Condition Status Value ________________________ V3 85 __________________________________________________________________ READ successful -- detected alternate duplicate key. 00 02 READ successful -- record shorter than fixed file attribute. 00 04 CLOSE reel/unit attempted on nonreel/unit device. 00 07 READ fails -- relative key digits exceed relative key. 00 14 WRITE fails -- relative key digits exceed relative key. 00 24 OPEN I-O on file that is not mass storage. 00 37 WRITE fails -- attempt to write a record of a different size than in the file description. 00 44 READ fails -- no next logical record (EOF detected). 13 10 READ fails -- no next logical record (EOF on OPTIONAL file). 15 10 READ fails -- no valid next record (already at EOF). 16 10 READ NEXT or sequential READ -- no valid next record pointer. 16 46 READ or START fails -- optional input file not present. 25 23 READ successful -- record longer than fixed file attribute. 30 04 OPEN on relative or indexed file that is not mass storage. 30 37 REWRITE fails -- attempt to rewrite record of different size. 30 44 CLOSE fails -- file not currently open. 94 42 DELETE or REWRITE fails -- previous I-O not successful READ. 93 43 OPEN fails -- file previously closed with LOCK. 94 38 OPEN fails -- file created with different organization. 94 39 OPEN fails -- file created with different prime record key. 94 39 OPEN fails -- file created with different alternate record keys. 94 39 OPEN fails -- file currently open. 94 41 READ or START fails -- file not opened INPUT or I-O. 94 47 WRITE fails -- file not opened OUTPUT, EXTEND, or I-O. 94 48 DELETE or REWRITE fails -- file not opened I-O. 94 49 OPEN INPUT on a nonoptional file -- file not found. 97 35 __________________________________________________________________ c. No Valid Next Record condition If all of the following conditions exist: . The no valid next record (NVNR) condition exists. . Your program attempts a sequential READ statement. . Your program includes an AT END branch associated with the READ statement. And if you specify /STANDARD=V3, the following occurs: 1. The file status variable, if any, for the file is set to 16. 2. The statements associated with the AT END statement are executed. 3. The program continues to execute normally. If you specify /STANDARD=85, the following occurs: 1. The file status variable, if any, for the file is set to 46. 2. The statements associated with the AT END statement are not executed. 3. The program terminates execution abnormally (unless you have provided for this situation with a Declaratives USE AFTER STANDARD EXCEPTION procedure). d. Opening nonoptional files in OPEN I-O and EXTEND modes If you specify /STANDARD=V3, the compiler creates nonoptional files opened in I-O or EXTEND mode, if the file is unavailable. If you specify /STANDARD=85, the compiler does not create nonoptional files opened in I-O or EXTEND mode if the file is unavailable; instead, the I/O system issues a run-time error. Specifying /STANDARD=V3 with the /FIPS=74 qualifier instructs the compiler to produce code according to the 1974 ANSI standard for certain constructs that are supported by the Federal Information Processing Standards Publication 21--1 (FIPS-PUB 21--1), issued by the U.S. National Bureau of Standards, interpretation of file status. Specifying /STANDARD=V3 with the /NOFIPS qualifier ensures version to version compatibility for COBOL. Specifying /STANDARD=SYNTAX with the /WARNINGS=ALL qualifier instructs the compiler to produce and print informational messages on language features that point out HP extensions to the ANSI 1985 COBOL Standard. Specifying /STANDARD=MIA with the /WARNINGS=ALL qualifier instructs the compiler to produce and print informational messages on language features that point out langauges element which do not conform to the MIA specifications: . HP syntax extensions from base standards (ANSI-85, JIS-88) . Two of four optional modules . All obsolete language elements of required modules in base standards . Language elements omitted from required modules in base standards due to the different implementation of the vendors . HP specific Japanese features out of MIA extension elements related to Japanese Not specifying /STANDARD or specifying /STANDARD, /NOSTANDARD, /STANDARD=(85,NOV3,NOSYNTAX,NOXOPEN,NOMIA), or /STANDARD=(NO85,NOV3,NOSYNTAX,NOXOPEN,NOMIA) is equivalent to specifying /STANDARD=85.
13.33 /TIE
/TIE /NOTIE (D) Generates code that allows native OpenVMS I64 images to call translated Alpha images and translated OpenVMS Alpha images to call native OpenVMS I64 images. This qualifier is supported on OpenVMS I64 systems only. Specify /TIE when you want to use native, compiled code with shared translated Alpha images, either because the code might call into a translated Alpha image or because it might be called from a translated Alpha image. If you specify /TIE, you should link the object module using the LINK command qualifier /NATIVE_ONLY. See the OpenVMS Linker Utility Manual for information about the /NATIVE_ONLY qualifier. Specifying /NOTIE, the default, indicates that your compiled code is not associated with a translated Alpha image.
13.34 /TRUNCATE
/TRUNCATE /NOTRUNCATE (D) Controls how the compiler stores values in COMPUTATIONAL receiving items if high-order truncation is necessary. If you specify /TRUNCATE, the compiler truncates values according to the number of decimal digits specified by the PICTURE size. Specifying /TRUNCATE increases program execution time. The default, /NOTRUNCATE, instructs the compiler to truncate values according to the hardware storage unit (word, longword, or quadword) allocated to the receiving item.
13.35 /VERSION
/VERSION /NOVERSION (D) Directs the compiler to print out the compiler version and platform. The compiler version is the same as in the listing file. This qualifier helps you to report what compiler you are using. When this qualifier is specified, the compiler just prints its version and exits. No other qualifiers are processed, no source file is read, and no object module is produced. The syntax for using this qualifier is: COBOL/VERSION The default is /NOVERSION.
13.36 /VFC
/VFC (D) /NOVFC Generates VFC record format for the following types of files: . LINAGE . REPORT WRITER . APPLY PRINT-CONTROL . WRITE ADVANCING . ORGANIZATION SEQUENTIAL with GLOBAL . ORGANIZATION SEQUENTIAL with EXTERNAL If you specify /NOVFC, these output files are generated with Stream_LF record format.
13.37 /WARNINGS
/WARNINGS[=(option[,...])] /NOWARNINGS Controls whether the compiler prints warning or informational messages as well as error and severe error messages. You can select one or more of the following options: [NO]INFORMATION Produces additional informational messages. The default is NOINFORMATION. [NO]OTHER Produces warning messages. The default is OTHER. ALL Provides the messages produced by the INFORMATION and OTHER options. /WARNINGS=ALL is the equivalent of /WARNINGS. NONE Omits the listing of all messages. /WARNINGS=NONE is the equivalent of /NOWARNINGS. If you specify a qualifier option, the default options do not change unless they are individually modified. The default is /WARNINGS=OTHER. Specifying /WARNINGS=ALL or /WARNINGS=INFORMATIONAL with the /STANDARD=SYNTAX qualifier option instructs the compiler to produce and print informational messages on language features that point out HP extensions to the ANSI 1985 COBOL Standard. Specify /WARNINGS=INFORMATIONAL to receive the FIPS messages about HP extensions that the compiler produces when you specify /FLAGGER[(=option,...)].