Copyright (C) 1999-2000 Ralf Lämmel (CWI, Amsterdam) & Chris Verhoef (WINS, Universiteit van Amsterdam)
This grammar has been been recovered from IBM's
VS COBOL II Reference Summary (Document Number: SX26-3721-05)
in a semi-automatic, formal process. In this unique process, many
problems in the IBM document have been detected and fixed in a
traceable way. The process is described by the authors of the
grammar in the paper Semi-automatic Grammar Recovery
(HTML, Postscript, Pdf). The process builds
upon previous work of the authors in the field of program
transformation, reverse engineering and specification environments.
Note that the grammar should be regarded as a specification (of
context-free syntax + lexical syntax) rather than a realistic
parser + scanner description. So, for example, issues usually
handled by a pre-processor are not covered by the formal
definition. Also, the grammar specification is still ambigious.
However, from this grammar we automatically derived a prototype
parser. The grammar has been tested for large test sets of COBOL
code: 8 test sets from different countries with 1.819.765 LOC
(before preprocessing: 1.631.825) or 109.697.736 BYTES (before
preprocessing: 113.481.950).
If you have any remark or a question, contact the authors of
this grammar: Ralf
Lämmel (CWI, Amsterdam,
Email: ralf@cwi.nl) & Chris Verhoef (WINS, Universiteit van Amsterdam,
Email: x@wins.uva.nl). This is
Version 1.0.3 of the grammar. It has been released on May, 2nd,
2000. Version 1.0 (i.e., the first version) of the grammar has been
released on December, 3rd, 1999. Refer to the ChangeLog for details. This document is
maintained by Ralf Lämmel.
Acknowledgement
Many thanks to Bob Diertens for helping us with preprocessing the
test sets. Many thanks to Peter Aarnoutse for the answers to our
COBOL questions. The system LDL
supporting language-centric software protoyping has been used for
nearly all aspects of specification/implementation in this project,
namely grammar recovery, parsing test sets, generation of the
actual browsable grammar.
Contents
- Number of rules: 231
- Number of sorts: 202
- Number of top sorts: 2
- Number of bottom sorts: 0
- Number of lexical sorts: 17
- Number of keywords: 363
The following rules define the context-free syntax of VS COBOL II
using a variant of EBNF (Extended Backus Naur Form). Details of the
notation (such as the special infix operator "||" for permutation
phrases) are explained elsewhere. The
start symbol of the context-free grammar is
cobol-source-program. All sorts on right-hand sides are
linked to the corresponding definitions, whereas the sorts on the
left-hand sides are linked to the table of all sorts which is
useful to navigate to the use sites of a sort.
sign-clause |
= |
[ "SIGN" [ "IS" ] ] ( "LEADING" | "TRAILING" ) [ "SEPARATE" [ "CHARACTER" ] ] |
usage-clause |
= |
[ "USAGE" [ "IS" ] ] ( "BINARY" | "COMP" | "COMP-1" | "COMP-2" | "COMP-3" | "COMP-4" | "COMPUTATIONAL" | "COMPUTATIONAL-1" | "COMPUTATIONAL-2" | "COMPUTATIONAL-3" | "COMPUTATIONAL-4" | "DISPLAY" | "DISPLAY-1" | "INDEX" | "PACKED-DECIMAL" | "POINTER" ) |
close-statement |
= |
"CLOSE" |
|
|
{ file-name [ ( ( "REEL" | "UNIT" ) [ ( [ "FOR" ] "REMOVAL" | [ "WITH" ] "NO" "REWIND" ) ] | [ "WITH" ] ( "NO" "REWIND" | "LOCK" ) ) ] }+ |
control-cbl-statement |
= |
( "*CONTROL" | "*CBL" ) { ( "SOURCE" | "NOSOURCE" | "LIST" | "NOLIST" | "MAP" | "NOMAP" ) }+ [ "." ] |
use-statement |
= |
"USE" [ "GLOBAL" ] "AFTER" [ "STANDARD" ] ( "EXCEPTION" | "ERROR" ) "PROCEDURE" |
|
|
[ "ON" ] ( { file-name }+ | "INPUT" | "OUTPUT" | "I-O" | "EXTEND" ) |
use-statement |
= |
"USE" [ "GLOBAL" ] "AFTER" [ "STANDARD" ] [ ( "BEGINNING" | "ENDING" ) ] |
|
|
[ ( "FILE" | "REEL" | "UNIT" ) ] "LABEL" "PROCEDURE" [ "ON" ] ( { file-name }+ | "INPUT" | "OUTPUT" | "I-O" | "EXTEND" ) |
relational-operator |
= |
[ "IS" ] |
|
|
( [ "NOT" ] ( "GREATER" [ "THAN" ] | ">" | "LESS" [ "THAN" ] | "<" | "EQUAL" [ "TO" ] | "=" ) |
|
|
| "GREATER" [ "THAN" ] "OR" "EQUAL" [ "TO" ] |
|
|
| ">=" |
|
|
| "LESS" [ "THAN" ] "OR" "EQUAL" [ "TO" ] |
|
|
| "<" "=" ) |
mode |
= |
( "F" | "V" | "U" | "S" ) |
figurative-constant |
= |
( "ZERO" | "ZEROS" | "ZEROES" |
|
|
| "SPACE" | "SPACES" |
|
|
| "HIGH-VALUE" | "HIGH-VALUES" |
|
|
| "LOW-VALUE" | "LOW-VALUES" |
|
|
| "QUOTE" | "QUOTES" |
|
|
| "ALL" literal |
|
|
| "NULL" | "NULLS" ) |
special-register |
= |
( "ADDRESS" "OF" data-name |
|
|
| "DEBUG-ITEM" |
|
|
| "LENGTH" "OF" identifier |
|
|
| "RETURN-CODE" |
|
|
| "SHIFT-OUT" |
|
|
| "SHIFT-IN" |
|
|
| "SORT-CONTROL" |
|
|
| "SORT-CORE-SIZE" |
|
|
| "SORT-FILE-SIZE" |
|
|
| "SORT-MESSAGE" |
|
|
| "SORT-MODE-SIZE" |
|
|
| "SORT-RETURN" |
|
|
| "TALLY" |
|
|
| "WHEN-COMPILED" ) |
Disclaimer
The following lexical definition serves as a tendentious
description of the terminals in the context-free syntax. It has
been derived manually from IBM's VS COBOL II Application
Programming Language Reference (Document Number: GC26-4047-07).
Note that this lexical definition is not claimed to reflect the
actual scanner we use to test the grammar. Note also that
preprocessing issues (e.g., continuation lines and copy book
expansion) are not addressed by this definition. This lexical
definition is written using some standard notation for regular
expressions in the spirit of the LEX notation. Details of the
notation are explained elsewhere.
/*
Some kinds of user-defined words are required to contain at least one
alphabetic. A corresponding class of character-strings is defined below.
*/
alphabetic-user-defined-word = ([0-9]+ [\-]*)* [0-9]* [A-Za-z] [A-Za-z0-9]* ([\-]+ [A-Za-z0-9]+)*
/*
From the reference:
; A COBOL word is a character-string of not more than 30 characters which
; forms a user-defined word, a system-name, or a reserved word. Except for
; arithmetic operators and relation characters, each character of a COBOL
; word is selected from the set of letters, digits, and the hyphen; the
; hyphen cannot appear as the first or last character in such words. Each
; lowercase letter is considered to be equivalent to its corresponding
; uppercase letter.
We do not enforce the constraint on the maximum length of COBOL words.
*/
cobol-word = [A-Za-z0-9]+ ([\-]+ [A-Za-z0-9]+)*
/*
From the reference:
; A comment is a character-string that can contain any combination of
; characters from the character set of the computer.
We do not provide a lexical definition because we prefer to regard the
problem of recognizing comment entries as a preprocessing issue.
*/
comment-entry = ...
/*
DBCS literals are not specified in this version.
*/
dbcs = ...
/*
From the reference:
; In this manual, the word integer appearing in a format represents a
; numeric literal of nonzero value that contains no sign and no decimal
; point; any other restrictions are included with the description of the
; format.
It is actually questionable, if we should forbid nonzero values at the
lexical level. Moreover, for some uses of integer, zero is actually allowed
in contrast to the above rule.
*/
integer = [0]* [1-9] [0-9]*
/*
From the reference:
; Level-numbers: 01-49,66,77,88.
; Each word must be a 1-digit or 2-digit integer.
*/
level-number =
( [0]? [1-9]
| [1-4] [0-9]
| "66"
| "77"
| "88" )
/*
From the reference:
; A nonnumeric literal is a character-string enclosed in quotation marks
; ("), and can contain any allowable character from the character set of the
; computer. The maximum length of a nonnumeric literal is 160 characters.
; The enclosing quotation marks are excluded from the literal when the
; program is compiled. An embedded quotation mark must be represented by a
; pair of quotation marks (""). For example, "THIS ISN""T WRONG"
;x A nonnumeric literal can be enclosed in apostrophes ('). If the APOST
;x option is specified, these apostrophes are excluded from the literal when
;x the program is compiled. An embedded apostrophe must be represented by a
;x pair of apostrophes (''). For example, 'THIS ISN''T WRONG'
...
;x Hexadecimal notation can be used for nonnumeric literals. This
;x hexadecimal notation has the following format:
;x ___ Hexadecimal Notation Format for Nonnumeric Literals ________________
; | |
;x | X"hexadecimal_digits" |
; | |
; |________________________________________________________________________|
;x X"
;x The opening delimiter for hexadecimal notation of a nonnumeric literal
;x (If the compiler option APOST is specified, the opening delimiter is
;x X'.)
;x "
;x The closing delimiter for the hexadecimal notation of a nonnumeric
;x literal. (If the compiler option APOST is specified, the closing
;x delimiter is '.)
Nonnumeric literals with double-byte characters are not supported in this
version of this lexical definition.
*/
nonnumeric =
( [\"] (~[\"] | [\"] [\"])* [\"]
| [\'] (~[\'] | [\'] [\'])* [\']
| [Xx] [\"] hexdigits [\"]
| [Xx] [\'] hexdigits [\'] )
auxiliaries
begin
hexdigits = [0-9A-Fa-f]+
end
/*
From the reference:
; A numeric literal is a character-string whose characters are selected from
; the digits 0 through 9, a sign character (+ or -), and the decimal point.
; If the literal contains no decimal point, it is an integer. (In this
; manual, the word integer appearing in a format represents a numeric
; literal of nonzero value that contains no sign and no decimal point; any
; other restrictions are included with the description of the format.) The
; following rules apply:
; o One through 18 digits are allowed.
; o Only one sign character is allowed. If included, it must be the
; leftmost character of the literal. If the literal is unsigned, it is
; positive in value.
; o Only one decimal point is allowed. If a decimal point is included, it
; is treated as an assumed decimal point (that is, as not taking up a
; character position in the literal). The decimal point can appear
; anywhere within the literal except as the rightmost character.
We do not enforce the constraint on the length of numeric literals in the
definition below. We omit a definition of floating-point literal values
available as an IBM extension.
*/
numeric = [\+\-]? ([0-9]* [\.] [0-9]+ | [0-9]+)
/*
options-list is meant to model compiler options for the CBL (PROCESS)
Statement. We consider this compiler directing statement as a preprocessing
problem. Thus, we omit a definition.
*/
options-list = ...
/*
From the reference:
; A PICTURE character-string is composed of the fcurrency symbol and certain
; combinations of characters in the COBOL character set. PICTURE
; character-strings are delimited only by the separator space, separator
; comma, separator semicolon, or separator period.
; Any punctuation character that appears as part of the specification of a
; PICTURE character-string is not considered as a punctuation character, but
; rather as a symbol used in the specification of that PICTURE
; character-string.
There are various rules on the order and the valid combination of
characters. We do not enforce these constraints in the following
simplified definition. The definition of picture character-strings is
definitely subject to improvement.
*/
picture-string = currency? (picchar+ repeat?)+ (punctuation (picchar+ repeat?)+)*
auxiliaries
begin
currency = ~[0-9ABCDPRSVXZa-z\*\+\-\/\,\.\;\(\)\=\'\"\
\n]
picchar =
( [ABEGPSVXZabegpsvxz90\+\-\*\$]
| "CR"
| "DB" )
repeat = "(" [0-9]+ ")"
punctuation = [\/\,\.\:]
end
/*
From the reference:
Priority-numbers: 00-99
Each word must be a 1-digit or 2-digit integer.
*/
priority-number = [0-9] [0-9]
/*
From the reference:
; pseudo-text
; A sequence of character-strings and/or separators bounded by, but not
; including, pseudo-text-1 delimiters (==). Both characters of each
; pseudo-text-1 delimiter must appear on one line; however,
; character-strings within pseudo-text-1 can be continued.
*/
quoted-pseudo-text = "==" ~[\=]* "=="
/*
Sequence numbers are needed for compiler-directing statements.
These preprocessing issues are not addressed in the version.
*/
sequence-number = ...
/*
See sequence-number.
*/
sequence-number-field = ...
/*
From the reference:
; A system-name is a character string that is defined by IBM to have a
; specific meaning to the system. There are three types of system-names:
;| o computer-name
;| o language-name
;| o implementor-name.
; There are two types of implementor-names:
;| o environment-name
;| o assignment-name.
If we abstract from the problem to reject reserved words as user-defined
words, user-defined words are COBOL words.
*/
system-name = cobol-word
/*
From the reference:
;| Within a source program the following rules apply for all COBOL words:
;| o A reserved word cannot be used as a user-defined word or as a
;| system-name.
;| o The same COBOL word, however, can be used as both a user-defined word
;| and as a system-name. The classification of a specific occurrence of
;| a COBOL word is determined by the context of the clause or phrase in
;| which it occurs.
If we abstract from the problem to reject reserved words as user-defined
words, user-defined words are COBOL words.
*/
user-defined-word = cobol-word
/*
The class zero were introduced by us in the context of correcting the
uses of the sort integer. The reference constrains integer to be a nonzero
value, whereas some use sites allow zero. We relaxed those use sites from
integer to (integer|zero). Now we have to define the trivial class zero.
*/
zero = [0]+
In the table below all the sorts of the grammar are listed in
alphabetical order. For each sort all the use sites are listed.
There are sorts without any use site --- the so-called top sorts. The navigation bar below allows you to go
directly to those sorts starting with a certain letter. There are
no sorts starting with h, k, x and y.
[a] [b] [c] [d] [e] [f] [g] h [i] [j] k [l] [m] [n] [o] [p] [q] [r] [s] [t] [u] [v] [w] x y [z]
There are two top sorts. cobol-source-program is the actual
start symbol of the grammar, whereas
compiler-directing-statement is the top rule for compiler
directing statement such as the COPY statement. The latter top sort
is not eliminated because we assume that compiler directing
statements are handled during preprocessing anyway and there is no
sensible way to connect compiler directing statements with the
actual context-free syntax of COBOL programs. Details of the
terminology used (top sorts, bottom sorts etc.) are explained
elsewhere.
There are no bottom sorts because we eliminated them in a process
of completing and correcting. We eliminated all bottom sorts by
connecting used and defined sorts, by providing context-free or
lexical productions. Details of the terminology used (top sorts,
bottom sorts etc.) are explained elsewhere.
In the table below all the keywords used in the grammar are listed
in alphabetical order. For each keyword all the use sites are
listed. Note that most but not all keywords are reserved words in
the sense of COBOL. The navigation bar below allows you to go
directly to those keywords starting with a certain letter. There
are no keywords starting with X and Y. Tokens which
do not start with a letter are listed at the beginning of the
table.
[A] [B] [C] [D] [E] [F] [G] [H] [I] [J] [K] [L] [M] [N] [O] [P] [Q] [R] [S] [T] [U] [V] [W] X Y [Z]
The diagrams below visualize the context-free syntax using a
variant of syntax diagrams. Details of this notation are explained
elsewhere. We just want to point out
that there is a special notation for permutation phrases in order
to express that order is immaterial. Therefore, phrases are stacked
using vertical lines based on double bars ("||"). All sorts in the
diagrams are linked to the corresponding definitions, whereas the
section headers (i.e., the sorts defined by the actual diagrams)
are linked to the table of all sorts which is useful to navigate to
the use sites of a sort.
_____________________________________________________________________________________
| |
| >>_____IDENTIFICATION_____DIVISION__.__program-id-cobol-source-program____________> |
| |__ID______________| |
| >_________________________________________________________________________________> |
| |__identification-division-content__| |
| >_________________________________________________________________________________> |
| |__ENVIRONMENT__DIVISION__.__environment-division-content__| |
| >_________________________________________________________________________________> |
| |__DATA__DIVISION__.__data-division-content__| |
| >_________________________________________________________________________________> |
| |__procedure-division__| |
| >________________________________________________________________________________>< |
| |__________________________________________END__PROGRAM__program-name__.__| |
| | <______________________________ | |
| |____nested-cobol-source-program__|__| |
|_____________________________________________________________________________________|
_________________________________________________________
| |
| >>__PROGRAM-ID___________program-name_________________> |
| |__.__| |
| >____________________________________________________>< |
| |____________INITIAL_________________| |__.__| |
| |__IS__| |__PROGRAM__| |
|_________________________________________________________|
___________________________________________________________________________________
| |
| >>_____IDENTIFICATION_____DIVISION__.__program-id-nested-cobol-source-program___> |
| |__ID______________| |
| >_______________________________________________________________________________> |
| |__identification-division-content__| |
| >_______________________________________________________________________________> |
| |__ENVIRONMENT__DIVISION__.__environment-division-content__| |
| >_______________________________________________________________________________> |
| |__DATA__DIVISION__.__data-division-content__| |
| >_______________________________________________________________________________> |
| |__procedure-division__| |
| >___________________________________________END__PROGRAM__program-name__.______>< |
| | <______________________________ | |
| |____nested-cobol-source-program__|__| |
|___________________________________________________________________________________|
_____________________________________________________________________________
| |
| >>__PROGRAM-ID___________program-name_____________________________________> |
| |__.__| |
| >________________________________________________________________________>< |
| |_______________COMMON___________________________________| |__.__| |
| |__IS__| | |__INITIAL__| | |__PROGRAM__| |
| |__INITIAL________________| |
| |__COMMON__| |
|_____________________________________________________________________________|
________________________________________________________________________
| |
| >>__________________________________________________________________>< |
| || |__AUTHOR_____________________________________| || |
| || |__.__| | <________________ | || |
| || |____comment-entry__|__| || |
| ||__________________________________________________________|| |
| || |__INSTALLATION_____________________________________| || |
| || |__.__| | <________________ | || |
| || |____comment-entry__|__| || |
| ||__________________________________________________________|| |
| || |__DATE-WRITTEN_____________________________________| || |
| || |__.__| | <________________ | || |
| || |____comment-entry__|__| || |
| ||__________________________________________________________|| |
| || |__DATE-COMPILED_____________________________________| || |
| || |__.__| | <________________ | || |
| || |____comment-entry__|__| || |
| ||__________________________________________________________|| |
| |__SECURITY_____________________________________| |
| |__.__| | <________________ | |
| |____comment-entry__|__| |
|________________________________________________________________________|
_________________________________________________________________
| |
| >>___________________________________________________________>< |
| |__configuration-section__| |__input-output-section__| |
|_________________________________________________________________|
_____________________________________________________________________
| |
| >>__CONFIGURATION__SECTION__.__configuration-section-paragraphs__>< |
|_____________________________________________________________________|
__________________________________________________________________________
| |
| >>_____________________________________________________________________> |
| |__source-computer-paragraph__| |__object-computer-paragraph__| |
| >_____________________________________________________________________>< |
| |__special-names-paragraph__| |
|__________________________________________________________________________|
___________________________________________________________________
| |
| >>__SOURCE-COMPUTER__.__________________________________________> |
| >______________________________________________________________>< |
| |__computer-name_____________________________________.__| |
| |______________DEBUGGING__MODE__| |
| |__WITH__| |
|___________________________________________________________________|
________________________________________________________________________________________________________________________________
| |
| >>__OBJECT-COMPUTER__._______________________________________________________________________________________________________> |
| >___________________________________________________________________________________________________________________________>< |
| |__computer-name_______________________________________________________object-computer-paragraph-sequence-phrase__.__| |
| |__MEMORY______________integer_____WORDS__________| |
| |__SIZE__| |__CHARACTERS__| |
| |__MODULES_____| |
|________________________________________________________________________________________________________________________________|
_________________________________________________________________________________
| |
| >>____________________________________________________________________________> |
| |__________________________________SEQUENCE____________alphabet-name__| |
| |__PROGRAM__| |__COLLATING__| |__IS__| |
| >____________________________________________________________________________>< |
| |__SEGMENT-LIMIT____________priority-number__| |
| |__IS__| |
|_________________________________________________________________________________|
_________________________________________________________________________________________________________________________________________
| |
| >>__SPECIAL-NAMES__.__________________________________________________________________________________________________________________> |
| | <_____________________________________________________________________________________________________ | |
| |_______environment-name____________mnemonic-name________________________________________________________|__| |
| | |__IS__| | |
| |__environment-name_______________mnemonic-name__________________________________________________| |
| | |__IS__| |__special-names-paragraph-status-phrase__| | |
| |__special-names-paragraph-status-phrase_________________________________| |
| >___special-names-paragraph-clauses__________________________________________________________________________________________________>< |
| |__.__| |
|_________________________________________________________________________________________________________________________________________|
_______________________________________________________
| |
| >>_________________________________________________>< |
| || | <__________________ | || |
| || |____alphabet-clause__|__| || |
| ||_________________________________________|| |
| || | <_____________________________ | || |
| || |____symbolic-characters-clause__|__| || |
| ||_________________________________________|| |
| || | <_______________ | || |
| || |____class-clause__|__| || |
| ||_________________________________________|| |
| || |__currency-sign-clause__| || |
| ||_________________________________________|| |
| |__decimal-point-clause__| |
|_______________________________________________________|
___________________________________________________________________________________________________
| |
| >>__ALPHABET__alphabet-name_______________STANDARD-1___________________________________________>< |
| |__IS__| |__STANDARD-2________________________________________| |
| |__NATIVE____________________________________________| |
| |__EBCDIC____________________________________________| |
| | <______________________________________________ | |
| |____literal______________________________________|__| |
| |________THROUGH_____literal_____| |
| | |__THRU_____| | |
| | <________________ | |
| |____ALSO__literal__|______| |
|___________________________________________________________________________________________________|
__________________________________________________________________________________________________________________________
| |
| <_________________________________________________________ |
| <_____________________ <__________ | |
| >>__SYMBOLIC________________________symbolic-character__|_____________________integer__|__|___________________________>< |
| |__CHARACTERS__| |_____ARE_____| |__IN__alphabet-name__| |
| |__IS___| |
|__________________________________________________________________________________________________________________________|
_________________________________________________________________________________
| |
| <________________________________________ |
| >>__CLASS__class-name______________literal________________________________|__>< |
| |__IS__| |_____THROUGH_____literal__| |
| |__THRU_____| |
|_________________________________________________________________________________|
_________________________________________________
| |
| >>__CURRENCY________________________literal__>< |
| |__SIGN__| |__IS__| |
|_________________________________________________|
________________________________________
| |
| >>__DECIMAL-POINT____________COMMA__>< |
| |__IS__| |
|________________________________________|
___________________________________________________________________________________________________
| |
| >>_____ON__________________________condition___________________________________________________>< |
| | |__STATUS__| |__IS__| |__OFF__________________________condition__| | |
| | |__STATUS__| |__IS__| | |
| |__OFF__________________________condition_______________________________________________| |
| |__STATUS__| |__IS__| |__ON__________________________condition__| |
| |__STATUS__| |__IS__| |
|___________________________________________________________________________________________________|
________________________________________________________________
| |
| >>__INPUT-OUTPUT__SECTION__._________________________________> |
| |__file-control-paragraph__| |
| >___________________________________________________________>< |
| |__i-o-control-paragraph__| |
|________________________________________________________________|
_______________________________________
| |
| >>__FILE-CONTROL__._________________> |
| >__________________________________>< |
| | <_____________________ | |
| |____file-control-entry__|__| |
|_______________________________________|
___________________________________________________________________
| |
| >>__select-clause__assign-clause________________________________> |
| >___________________________________________________________.__>< |
| || |__reserve-clause__| || |
| ||__________________________________________________|| |
| || |________________________________SEQUENTIAL__| || |
| || |__ORGANIZATION____________| || |
| || |__IS__| || |
| ||__________________________________________________|| |
| || |__padding-character-clause__| || |
| ||__________________________________________________|| |
| || |__record-delimiter-clause__| || |
| ||__________________________________________________|| |
| || |__ACCESS________________________SEQUENTIAL__| || |
| || |__MODE__| |__IS__| || |
| ||__________________________________________________|| |
| || |__password-clause__| || |
| ||__________________________________________________|| |
| |__file-status-clause__| |
|___________________________________________________________________|
____________________________________________________________________________________________________
| |
| >>__select-clause__assign-clause_________________________________________________________________> |
| >____________________________________________________________________________________________.__>< |
| || |__reserve-clause__| || |
| ||________________________________RELATIVE___________________________________________|| |
| || |__ORGANIZATION____________| || |
| || |__IS__| || |
| ||___________________________________________________________________________________|| |
| || |__ACCESS___________________________SEQUENTIAL________________________________| || |
| || |__MODE__| |__IS__| | |__relative-key-clause__| | || |
| || |_____RANDOM______relative-key-clause_____| || |
| || |__DYNAMIC__| || |
| ||___________________________________________________________________________________|| |
| || |__password-clause__| || |
| ||___________________________________________________________________________________|| |
| |__file-status-clause__| |
|____________________________________________________________________________________________________|
_________________________________________________________________________
| |
| >>__select-clause__assign-clause______________________________________> |
| >_________________________________________________________________.__>< |
| || |__reserve-clause__| || |
| ||________________________________INDEXED_________________|| |
| || |__ORGANIZATION____________| || |
| || |__IS__| || |
| ||________________________________________________________|| |
| || |__ACCESS___________________________SEQUENTIAL_____| || |
| || |__MODE__| |__IS__| |__RANDOM______| || |
| || |__DYNAMIC_____| || |
| ||__record-key-clause_____________________________________|| |
| ||________________________________________________________|| |
| || |__password-clause__| || |
| ||________________________________________________________|| |
| || | <______________________________ | || |
| || |____alternate-record-key-clause__|__| || |
| ||________________________________________________________|| |
| |__file-status-clause__| |
|_________________________________________________________________________|
___________________________________________
| |
| >>__SELECT__________________file-name__>< |
| |__OPTIONAL__| |
|___________________________________________|
______________________________________________________
| |
| <________________________ |
| >>__ASSIGN_________________assignment-name_____|__>< |
| |__TO__| |__literal__________| |
|______________________________________________________|
_____________________________________________
| |
| >>__RESERVE__integer_____________________>< |
| |_____AREA______| |
| |__AREAS__| |
|_____________________________________________|
_______________________________________________________________________
| |
| >>__PADDING________________________________qualified-data-name_____>< |
| |__CHARACTER__| |__IS__| |__literal______________| |
|_______________________________________________________________________|
____________________________________________________________
| |
| >>__RECORD__DELIMITER_______________STANDARD-1__________>< |
| |__IS__| |__assignment-name__| |
|____________________________________________________________|
__________________________________________________________
| |
| >>__RECORD_______________________qualified-data-name__>< |
| |__KEY__| |__IS__| |
|__________________________________________________________|
___________________________________________________________________________
| |
| >>__ALTERNATE_____________________________________qualified-data-name___> |
| |__RECORD__| |__KEY__| |__IS__| |
| >______________________________________________________________________>< |
| |__password-clause__| |______________DUPLICATES__| |
| |__WITH__| |
|___________________________________________________________________________|
____________________________________________________________
| |
| >>__RELATIVE_______________________qualified-data-name__>< |
| |__KEY__| |__IS__| |
|____________________________________________________________|
_______________________________________
| |
| >>__PASSWORD____________data-name__>< |
| |__IS__| |
|_______________________________________|
______________________________________________________________________________________
| |
| >>______________STATUS____________qualified-data-name_____________________________>< |
| |__FILE__| |__IS__| |__qualified-data-name__| |
|______________________________________________________________________________________|
_____________________________________________________________________________
| |
| >>__I-O-CONTROL__.________________________________________________________> |
| | <________________________________________ | |
| |_______qsam-or-sam-i-o-control-entries_____|__.__| |
| |__vsam-i-o-control-entries_________| |
| >________________________________________________________________________>< |
| |__sort-merge-i-o-control-entries__.__| |
|_____________________________________________________________________________|
___________________________________________________________________________________________________________________
| |
| >>_____RERUN__ON_____assignment-name_____________________integer__RECORDS________________________file-name_____>< |
| | |__file-name________| |__EVERY__| |__END_______________REEL_____| |__OF__| | |
| | |__OF__| |__UNIT__| | |
| | <____________ | |
| |__SAME_______________________________________file-name____file-name__|_________________________________| |
| | |__RECORD__| |__AREA__| |__FOR__| | |
| | <_____________________________________ | |
| |__MULTIPLE__FILE________________________________file-name___________________________|__________________| |
| | |__TAPE__| |__CONTAINS__| |__POSITION__integer__| | |
| | <____________ | |
| |__APPLY__WRITE-ONLY______________file-name__|__________________________________________________________| |
| |__ON__| |
|___________________________________________________________________________________________________________________|
____________________________________________________________________________________________________
| |
| >>_____RERUN__ON_____assignment-name__________________integer__RECORDS____________file-name_____>< |
| | |__file-name________| |__EVERY__| |__OF__| | |
| | <____________ | |
| |__SAME_______________________________________file-name____file-name__|__________________| |
| |__RECORD__| |__AREA__| |__FOR__| |
|____________________________________________________________________________________________________|
_______________________________________________________________________________________
| |
| >>__________________________________________________________________________________> |
| |__RERUN__ON__assignment-name__| |
| <___________________________________________________________________________ |
| <____________ | |
| >_____SAME_____RECORD________________________________file-name____file-name__|__|__>< |
| |__SORT________| |__AREA__| |__FOR__| |
| |__SORT-MERGE__| |
|_______________________________________________________________________________________|
___________________________________________________________________________________________________________
| |
| >>______________________________________________________________________________________________________> |
| |__FILE__SECTION__._____________________________________________________________________________| |
| | <_________________________________________________________________ | |
| | <___________________________ | | |
| |____file-and-sort-description-entry____record-description-entry__|__|__| |
| >_______________________________________________________________________________________________________> |
| |__WORKING-STORAGE__SECTION__.________________________________________________| |
| | <____________________________________ | |
| |_______record-description-entry________|__| |
| |__data-item-description-entry__| |
| >______________________________________________________________________________________________________>< |
| |__LINKAGE__SECTION__.________________________________________________| |
| | <____________________________________ | |
| |_______record-description-entry________|__| |
| |__data-item-description-entry__| |
|___________________________________________________________________________________________________________|
________________________________
| |
| >>__data-description-entry__>< |
|________________________________|
________________________________
| |
| >>__data-description-entry__>< |
|________________________________|
_________________________________________________________________________
| |
| >>_____FD_____file-name__file-and-sort-description-entry-clauses__.__>< |
| |__SD__| |
|_________________________________________________________________________|
_____________________________________________
| |
| >>_______________________________________>< |
| || |__external-clause__| || |
| ||_______________________________|| |
| || |__global-clause__| || |
| ||_______________________________|| |
| || |__block-contains-clause__| || |
| ||_______________________________|| |
| || |__record-clause__| || |
| ||_______________________________|| |
| || |__label-records-clause__| || |
| ||_______________________________|| |
| || |__value-of-clause__| || |
| ||_______________________________|| |
| || |__data-records-clause__| || |
| ||_______________________________|| |
| || |__linage-clause__| || |
| ||_______________________________|| |
| || |__recording-mode-clause__| || |
| ||_______________________________|| |
| |__code-set-clause__| |
|_____________________________________________|
____________________________
| |
| >>____________EXTERNAL__>< |
| |__IS__| |
|____________________________|
__________________________
| |
| >>____________GLOBAL__>< |
| |__IS__| |
|__________________________|
_______________________________________________________________________________________________
| |
| >>__BLOCK______________________________________________integer_____________________________>< |
| |__CONTAINS__| |_____integer_____TO__| |__zero_____| |_____CHARACTERS_____| |
| |__zero_____| |__RECORDS_____| |
|_______________________________________________________________________________________________|
____________________________________________________________________________________
| |
| >>__RECORD_______________________________________________________________________> |
| >_________________________integer_______________________________________________>< |
| | |__CONTAINS__| |__zero_____| |__CHARACTERS__| | |
| |_____________________integer_____TO_____integer_________________________| |
| | |__CONTAINS__| |__zero_____| |__zero_____| |__CHARACTERS__| | |
| |__record-varying-phrase_________________________________________________| |
| |__DEPENDING____________data-name__| |
| |__ON__| |
|____________________________________________________________________________________|
_________________________________________________________________________________________________________________
| |
| >>____________VARYING________________________________________________________________________________________>< |
| |__IS__| |__IN__| |__SIZE__| |______________integer__| |__TO__integer__| |__CHARACTERS__| |
| |__FROM__| |
|_________________________________________________________________________________________________________________|
_______________________________________________________________
| |
| >>__LABEL_____RECORD____________________STANDARD___________>< |
| | |__IS__| | |__OMITTED_________| |
| |__RECORDS_____________| | <____________ | |
| |__ARE__| |____data-name__|__| |
|_______________________________________________________________|
__________________________________________________________________________
| |
| <___________________________________________________ |
| >>__VALUE__OF____system-name_______________qualified-data-name_____|__>< |
| |__IS__| |__literal______________| |
|__________________________________________________________________________|
________________________________________________________
| |
| <____________ |
| >>__DATA_____RECORD___________________data-name__|__>< |
| | |__IS__| | |
| |__RECORDS_____________| |
| |__ARE__| |
|________________________________________________________|
_______________________________________________________________________________
| |
| >>__LINAGE_______________data-name__________________linage-footing-phrase__>< |
| |__IS__| |__integer____| |__LINES__| |
|_______________________________________________________________________________|
_________________________________________________________________________________________________________________
| |
| >>____________________________________________________________________________________________________________> |
| |______________FOOTING_______________data-name_____| |_________________________TOP_____data-name_____| |
| |__WITH__| |__AT__| |__integer____| |__LINES__| |__AT__| |__integer____| |
| >____________________________________________________________________________________________________________>< |
| |_________________________BOTTOM_____data-name_____| |
| |__LINES__| |__AT__| |__integer____| |
|_________________________________________________________________________________________________________________|
_______________________________________________
| |
| >>__RECORDING________________________mode__>< |
| |__MODE__| |__IS__| |
|_______________________________________________|
___________________________________________
| |
| >>__CODE-SET____________alphabet-name__>< |
| |__IS__| |
|___________________________________________|
________________________________________________________________________________
| |
| >>__level-number_________________________data-description-entry-clauses__.__>< |
| |_____data-name_____| |
| |__FILLER_____| |
|________________________________________________________________________________|
__________________________________________
| |
| >>__66__data-name__renames-clause__.__>< |
|__________________________________________|
_______________________________________________________
| |
| >>__88__condition-name__condition-value-clause__.__>< |
|_______________________________________________________|
______________________________________________
| |
| >>________________________________________>< |
| || |__redefines-clause__| || |
| ||________________________________|| |
| || |__blank-when-zero-clause__| || |
| ||________________________________|| |
| || |__external-clause__| || |
| ||________________________________|| |
| || |__global-clause__| || |
| ||________________________________|| |
| || |__justified-clause__| || |
| ||________________________________|| |
| || |__occurs-clause__| || |
| ||________________________________|| |
| || |__picture-clause__| || |
| ||________________________________|| |
| || |__sign-clause__| || |
| ||________________________________|| |
| || |__synchronized-clause__| || |
| ||________________________________|| |
| || |__usage-clause__| || |
| ||________________________________|| |
| |__data-value-clause__| |
|______________________________________________|
______________________________
| |
| >>__REDEFINES__data-name__>< |
|______________________________|
_________________________________________
| |
| >>__BLANK_________________ZERO_______>< |
| |__WHEN__| |__ZEROS___| |
| |__ZEROES__| |
|_________________________________________|
______________________________________
| |
| >>_____JUSTIFIED__________________>< |
| |__JUST_______| |__RIGHT__| |
|______________________________________|
____________________________________________________________________________________
| |
| >>__OCCURS__integer______________________________________________________________> |
| |__TIMES__| |
| >________________________________________________________________________________> |
| | <__________________________________________________________________ | |
| | <______________________ | | |
| |_______ASCENDING_____________________________qualified-data-name__|__|__| |
| |__DESCENDING__| |__KEY__| |__IS__| |
| >_______________________________________________________________________________>< |
| | <_____________ | |
| |__INDEXED______________index-name__|__| |
| |__BY__| |
|____________________________________________________________________________________|
____________________________________________________________________________________
| |
| >>__OCCURS___________________________integer_______________DEPENDING_____________> |
| |_____integer_____TO__| |__TIMES__| |
| |__zero_____| |
| >_____________qualified-data-name________________________________________________> |
| |__ON__| |
| >________________________________________________________________________________> |
| | <__________________________________________________________________ | |
| | <______________________ | | |
| |_______ASCENDING_____________________________qualified-data-name__|__|__| |
| |__DESCENDING__| |__KEY__| |__IS__| |
| >_______________________________________________________________________________>< |
| | <_____________ | |
| |__INDEXED______________index-name__|__| |
| |__BY__| |
|____________________________________________________________________________________|
_________________________________________________
| |
| >>_____PICTURE_______________picture-string__>< |
| |__PIC______| |__IS__| |
|_________________________________________________|
_______________________________________________________________________________
| |
| >>___________________________LEADING_______________________________________>< |
| |__SIGN____________| |__TRAILING__| |__SEPARATE___________________| |
| |__IS__| |__CHARACTER__| |
|_______________________________________________________________________________|
_______________________________________________
| |
| >>_____SYNCHRONIZED________________________>< |
| |__SYNC__________| |_____LEFT______| |
| |__RIGHT__| |
|_______________________________________________|
______________________________________________________
| |
| >>____________________________BINARY______________>< |
| |__USAGE____________| |__COMP_____________| |
| |__IS__| |__COMP-1___________| |
| |__COMP-2___________| |
| |__COMP-3___________| |
| |__COMP-4___________| |
| |__COMPUTATIONAL____| |
| |__COMPUTATIONAL-1__| |
| |__COMPUTATIONAL-2__| |
| |__COMPUTATIONAL-3__| |
| |__COMPUTATIONAL-4__| |
| |__DISPLAY__________| |
| |__DISPLAY-1________| |
| |__INDEX____________| |
| |__PACKED-DECIMAL___| |
| |__POINTER__________| |
|______________________________________________________|
_____________________________________________________________________________
| |
| <________________________________________ |
| >>_____VALUE___________________literal________________________________|__>< |
| | |__IS__| | |_____THROUGH_____literal__| |
| |__VALUES_____________| |__THRU_____| |
| |__ARE__| |
|_____________________________________________________________________________|
__________________________________
| |
| >>__VALUE____________literal__>< |
| |__IS__| |
|__________________________________|
________________________________________________________________________________
| |
| >>__RENAMES__qualified-data-name____________________________________________>< |
| |_____THROUGH_____qualified-data-name__| |
| |__THRU_____| |
|________________________________________________________________________________|
___________________________________________________________________________________________________________
| |
| >>__PROCEDURE__DIVISION_______________________________._________________________________________________> |
| | <____________ | |
| |__USING____data-name__|__| |
| >_______________________________________________________________________________________________________> |
| | <__________________________________________________ | |
| |__DECLARATIVES__.____section-header__.__use-statement__.__paragraphs__|__END__DECLARATIVES__.__| |
| >___sections___________________________________________________________________________________________>< |
|___________________________________________________________________________________________________________|
_____________________________________________________________
| |
| >>__PROCEDURE__DIVISION_______________________________.___> |
| | <____________ | |
| |__USING____data-name__|__| |
| >___paragraphs___________________________________________>< |
|_____________________________________________________________|
______________________________________________________________
| |
| >>__paragraphs____________________________________________>< |
| | <________________________________ | |
| |____section-header__.__paragraphs__|__| |
|______________________________________________________________|
______________________________________________________
| |
| >>__section-name__SECTION_________________________>< |
| |__priority-number__| |
|______________________________________________________|
___________________________________________________
| |
| >>_____________________________________________>< |
| | <___________ | | <____________ | |
| |____sentence__|__| |____paragraph__|__| |
|___________________________________________________|
________________________________________________
| |
| >>__paragraph-name__._______________________>< |
| | <___________ | |
| |____sentence__|__| |
|________________________________________________|
______________________
| |
| >>__altered-goto__>< |
|______________________|
___________________________
| |
| >>__statement-list__.__>< |
|___________________________|
________________________
| |
| <____________ |
| >>____statement__|__>< |
|________________________|
________________________________________
| |
| >>_____accept-statement_____________>< |
| |__add-statement_____________| |
| |__alter-statement___________| |
| |__call-statement____________| |
| |__cancel-statement__________| |
| |__close-statement___________| |
| |__compute-statement_________| |
| |__continue-statement________| |
| |__delete-statement__________| |
| |__display-statement_________| |
| |__divide-statement__________| |
| |__entry-statement___________| |
| |__evaluate-statement________| |
| |__exit-statement____________| |
| |__exit-program-statement____| |
| |__goback-statement__________| |
| |__go-to-statement___________| |
| |__if-statement______________| |
| |__initialize-statement______| |
| |__inspect-statement_________| |
| |__merge-statement___________| |
| |__move-statement____________| |
| |__multiply-statement________| |
| |__open-statement____________| |
| |__perform-statement_________| |
| |__read-statement____________| |
| |__release-statement_________| |
| |__return-statement__________| |
| |__rewrite-statement_________| |
| |__search-statement__________| |
| |__set-statement_____________| |
| |__sort-statement____________| |
| |__start-statement___________| |
| |__stop-statement____________| |
| |__string-statement__________| |
| |__subtract-statement________| |
| |__unstring-statement________| |
| |__write-statement___________| |
|________________________________________|
________________________________________________________________
| |
| >>__ACCEPT__identifier______________________________________>< |
| |__FROM_____mnemonic-name________| |
| |__environment-name__| |
|________________________________________________________________|
_____________________________________________________
| |
| >>__ACCEPT__identifier__FROM_____DATE____________>< |
| |__DAY__________| |
| |__DAY-OF-WEEK__| |
| |__TIME_________| |
|_____________________________________________________|
________________________________________________________________________
| |
| <___________________ <____________________________ |
| >>__ADD_______identifier_____|__TO____identifier_________________|___> |
| |__literal_____| |__ROUNDED__| |
| >____________________________________________________________________> |
| |____________SIZE__ERROR__statement-list__| |
| |__ON__| |
| >____________________________________________________________________> |
| |__NOT____________SIZE__ERROR__statement-list__| |
| |__ON__| |
| >___________________________________________________________________>< |
| |__END-ADD__| |
|________________________________________________________________________|
________________________________________________________________
| |
| <___________________ |
| >>__ADD_______identifier_____|_______________identifier______> |
| |__literal_____| |__TO__| |__literal_____| |
| <____________________________ |
| >___GIVING____identifier_________________|___________________> |
| |__ROUNDED__| |
| >____________________________________________________________> |
| |____________SIZE__ERROR__statement-list__| |
| |__ON__| |
| >____________________________________________________________> |
| |__NOT____________SIZE__ERROR__statement-list__| |
| |__ON__| |
| >___________________________________________________________>< |
| |__END-ADD__| |
|________________________________________________________________|
____________________________________________________________________
| |
| >>__ADD_____CORRESPONDING_____identifier__TO__identifier_________> |
| |__CORR___________| |
| >________________________________________________________________> |
| |__ROUNDED__| |____________SIZE__ERROR__statement-list__| |
| |__ON__| |
| >________________________________________________________________> |
| |__NOT____________SIZE__ERROR__statement-list__| |
| |__ON__| |
| >_______________________________________________________________>< |
| |__END-ADD__| |
|____________________________________________________________________|
____________________________________________________________________
| |
| >>__ALTER________________________________________________________> |
| <________________________________________________________ |
| >_____procedure-name__TO_____________________procedure-name__|__>< |
| |__PROCEED__TO__| |
|____________________________________________________________________|
_______________________________________________________________________________________________
| |
| >>__CALL_____identifier_____________________________________________________________________> |
| |__literal_____| |
| >___________________________________________________________________________________________> |
| | <______________________________________________________________________ | |
| | <________________________________ | | |
| |__USING_______________________________________identifier__________________|_____|__| |
| | |____________REFERENCE__| |__ADDRESS__OF__identifier__| | |
| | |__BY__| |__file-name________________| | |
| | <_____________________________________ | |
| |____________CONTENT_________________________identifier_____|_____| |
| |__BY__| | |__LENGTH__OF__| | |
| |__ADDRESS__OF__identifier_______| |
| |__literal_______________________| |
| |
| >__________________________________________________________________________________________>< |
| |____________OVERFLOW__statement-list__| |__END-CALL__| |
| |__ON__| |
|_______________________________________________________________________________________________|
_______________________________________________________________________________________________
| |
| >>__CALL_____identifier_____________________________________________________________________> |
| |__literal_____| |
| >___________________________________________________________________________________________> |
| | <______________________________________________________________________ | |
| | <________________________________ | | |
| |__USING_______________________________________identifier__________________|_____|__| |
| | |____________REFERENCE__| |__ADDRESS__OF__identifier__| | |
| | |__BY__| |__file-name________________| | |
| | <_____________________________________ | |
| |____________CONTENT_________________________identifier_____|_____| |
| |__BY__| | |__LENGTH__OF__| | |
| |__ADDRESS__OF__identifier_______| |
| |__literal_______________________| |
| |
| >___________________________________________________________________________________________> |
| |____________EXCEPTION__statement-list__| |
| |__ON__| |
| >__________________________________________________________________________________________>< |
| |__NOT____________EXCEPTION__statement-list__| |__END-CALL__| |
| |__ON__| |
|_______________________________________________________________________________________________|
_______________________________________
| |
| <___________________ |
| >>__CANCEL_______identifier_____|__>< |
| |__literal_____| |
|_______________________________________|
____________________________________________________________________________________
| |
| >>__CLOSE________________________________________________________________________> |
| <________________________________________________________________________ |
| >_____file-name______________________________________________________________|__>< |
| |________REEL____________________________________________| |
| | |__UNIT__| |________________REMOVAL_________| | |
| | | |__FOR__| | | |
| | |______________NO__REWIND__| | |
| | |__WITH__| | |
| |_________________NO__REWIND_______________________| |
| |__WITH__| |__LOCK________| |
|____________________________________________________________________________________|
_______________________________________________________
| |
| <____________________________________ |
| >>__CLOSE____file-name__________________________|__>< |
| |______________LOCK__| |
| |__WITH__| |
|_______________________________________________________|
______________________________________________________________
| |
| <____________________________ |
| >>__COMPUTE____identifier_________________|_____=__________> |
| |__ROUNDED__| |__EQUAL__| |
| >___arithmetic-expression__________________________________> |
| >__________________________________________________________> |
| |____________SIZE__ERROR__statement-list__| |
| |__ON__| |
| >__________________________________________________________> |
| |__NOT____________SIZE__ERROR__statement-list__| |
| |__ON__| |
| >_________________________________________________________>< |
| |__END-COMPUTE__| |
|______________________________________________________________|
__________________
| |
| >>__CONTINUE__>< |
|__________________|
_______________________________________________________
| |
| >>__DELETE__file-name_______________________________> |
| |__RECORD__| |
| >___________________________________________________> |
| |__INVALID_____________statement-list__| |
| |__KEY__| |
| >___________________________________________________> |
| |__NOT__INVALID_____________statement-list__| |
| |__KEY__| |
| >__________________________________________________>< |
| |__END-DELETE__| |
|_______________________________________________________|
____________________________________________
| |
| <___________________ |
| >>__DISPLAY_______identifier_____|_______> |
| |__literal_____| |
| >________________________________________> |
| |__UPON_____mnemonic-name________| |
| |__environment-name__| |
| >_______________________________________>< |
| |______________NO__ADVANCING__| |
| |__WITH__| |
|____________________________________________|
________________________________________________________________________
| |
| <____________________________ |
| >>__DIVIDE_____identifier_____INTO____identifier_________________|___> |
| |__literal_____| |__ROUNDED__| |
| >____________________________________________________________________> |
| |____________SIZE__ERROR__statement-list__| |
| |__ON__| |
| >____________________________________________________________________> |
| |__NOT____________SIZE__ERROR__statement-list__| |
| |__ON__| |
| >___________________________________________________________________>< |
| |__END-DIVIDE__| |
|________________________________________________________________________|
__________________________________________________________
| |
| >>__DIVIDE_____identifier_____INTO_____identifier______> |
| |__literal_____| |__literal_____| |
| <____________________________ |
| >___GIVING____identifier_________________|_____________> |
| |__ROUNDED__| |
| >______________________________________________________> |
| |____________SIZE__ERROR__statement-list__| |
| |__ON__| |
| >______________________________________________________> |
| |__NOT____________SIZE__ERROR__statement-list__| |
| |__ON__| |
| >_____________________________________________________>< |
| |__END-DIVIDE__| |
|__________________________________________________________|
__________________________________________________________
| |
| >>__DIVIDE_____identifier_____BY_____identifier________> |
| |__literal_____| |__literal_____| |
| <____________________________ |
| >___GIVING____identifier_________________|_____________> |
| |__ROUNDED__| |
| >______________________________________________________> |
| |____________SIZE__ERROR__statement-list__| |
| |__ON__| |
| >______________________________________________________> |
| |__NOT____________SIZE__ERROR__statement-list__| |
| |__ON__| |
| >_____________________________________________________>< |
| |__END-DIVIDE__| |
|__________________________________________________________|
__________________________________________________________________
| |
| >>__DIVIDE_____identifier_____INTO_____identifier______________> |
| |__literal_____| |__literal_____| |
| >___GIVING__identifier_________________REMAINDER__identifier___> |
| |__ROUNDED__| |
| >______________________________________________________________> |
| |____________SIZE__ERROR__statement-list__| |
| |__ON__| |
| >______________________________________________________________> |
| |__NOT____________SIZE__ERROR__statement-list__| |
| |__ON__| |
| >_____________________________________________________________>< |
| |__END-DIVIDE__| |
|__________________________________________________________________|
__________________________________________________________________
| |
| >>__DIVIDE_____identifier_____BY_____identifier________________> |
| |__literal_____| |__literal_____| |
| >___GIVING__identifier_________________REMAINDER__identifier___> |
| |__ROUNDED__| |
| >______________________________________________________________> |
| |____________SIZE__ERROR__statement-list__| |
| |__ON__| |
| >______________________________________________________________> |
| |__NOT____________SIZE__ERROR__statement-list__| |
| |__ON__| |
| >_____________________________________________________________>< |
| |__END-DIVIDE__| |
|__________________________________________________________________|
_____________________________________________________
| |
| >>__ENTRY__literal_______________________________>< |
| | <____________ | |
| |__USING____data-name__|__| |
|_____________________________________________________|
_____________________________________________________________________________________________
| |
| >>__EVALUATE_____identifier_______________________________________________________________> |
| |__literal________________| | <____________________________________ | |
| |__arithmetic-expression__| |____ALSO_____identifier________________|__| |
| |__condition______________| |__literal________________| |
| |__TRUE___________________| |__arithmetic-expression__| |
| |__FALSE__________________| |__condition______________| |
| |__TRUE___________________| |
| |__FALSE__________________| |
| <_______________________________________________________________________________ |
| <__________________________________________________________ | |
| >_______WHEN__evaluate-phrase____________________________________|__statement-list__|_____> |
| | <________________________ | |
| |____ALSO__evaluate-phrase__|__| |
| >________________________________________________________________________________________>< |
| |__WHEN__OTHER__statement-list__| |__END-EVALUATE__| |
|_____________________________________________________________________________________________|
________________________________________________________________________________________________________
| |
| >>_____ANY__________________________________________________________________________________________>< |
| |__condition_________________________________________________________________________________| |
| |__TRUE______________________________________________________________________________________| |
| |__FALSE_____________________________________________________________________________________| |
| |________________identifier__________________________________________________________________| |
| |__NOT__| |__literal________________| |_____THROUGH________identifier________________| |
| |__arithmetic-expression__| |__THRU_____| |__literal________________| |
| |__arithmetic-expression__| |
|________________________________________________________________________________________________________|
______________
| |
| >>__EXIT__>< |
|______________|
_______________________
| |
| >>__EXIT__PROGRAM__>< |
|_______________________|
________________
| |
| >>__GOBACK__>< |
|________________|
______________________________________
| |
| >>__GO____________procedure-name__>< |
| |__TO__| |
|______________________________________|
___________________________________
| |
| >>__GO____________MORE-LABELS__>< |
| |__TO__| |
|___________________________________|
________________________________________________________________
| |
| <_________________ |
| >>__GO______________procedure-name__|__DEPENDING_____________> |
| |__TO__| |__ON__| |
| >___identifier______________________________________________>< |
|________________________________________________________________|
____________________________________________
| |
| >>__paragraph-name__.__GO____________.__>< |
| |__TO__| |
|____________________________________________|
_________________________________________________________
| |
| <____________ |
| >>__IF__condition___________________statement__|______> |
| |__THEN__| |__NEXT__SENTENCE__| |
| |
| >____________________________________________________>< |
| | <____________ | |__END-IF__| |
| |__ELSE_______statement__|_____| |
| |__NEXT__SENTENCE__| |
| |
|_________________________________________________________|
___________________________________________________________________________________________
| |
| <_____________ |
| >>__INITIALIZE____identifier__|_________________________________________________________> |
| >______________________________________________________________________________________>< |
| | <______________________________________________________________ | |
| |__REPLACING_______ALPHABETIC__________________________BY_____identifier_____|__| |
| |__ALPHANUMERIC_________| |__DATA__| |__literal_____| |
| |__NUMERIC______________| |
| |__ALPHANUMERIC-EDITED__| |
| |__NUMERIC-EDITED_______| |
| |__DBCS_________________| |
| |__EGCS_________________| |
|___________________________________________________________________________________________|
_______________________________________________________________________________________________________________
| |
| >>__INSPECT__identifier__TALLYING___________________________________________________________________________> |
| <___________________________________________________________________________________________________ |
| <_____________________________________________________________________________ | |
| >_____identifier__FOR_______CHARACTERS_______________________________________________________________|__|__>< |
| | | <______________________ | | |
| | |____before-after-phrase__|__| | |
| | <___________________________________________________ | |
| |_____ALL______________identifier_____________________________________|__| |
| |__LEADING__| |__literal_____| | <______________________ | |
| |____before-after-phrase__|__| |
|_______________________________________________________________________________________________________________|
_______________________________________________________________
| |
| >>__INSPECT__identifier__CONVERTING_____identifier_____TO___> |
| |__literal_____| |
| >______identifier__________________________________________>< |
| |__literal_____| | <______________________ | |
| |____before-after-phrase__|__| |
|_______________________________________________________________|
__________________________________________________________________________________________________________________________
| |
| >>__INSPECT__identifier__TALLYING______________________________________________________________________________________> |
| <___________________________________________________________________________________________________ |
| <_____________________________________________________________________________ | |
| >_____identifier__FOR_______CHARACTERS_______________________________________________________________|__|__REPLACING___> |
| | | <______________________ | | |
| | |____before-after-phrase__|__| | |
| | <___________________________________________________ | |
| |_____ALL______________identifier_____________________________________|__| |
| |__LEADING__| |__literal_____| | <______________________ | |
| |____before-after-phrase__|__| |
| <___________________________________________________________________________________________________ |
| >________CHARACTERS__BY_____identifier__________________________________________________________________|_____________>< |
| | |__literal_____| | <______________________ | | |
| | |____before-after-phrase__|__| | |
| | <_________________________________________________________________________ | |
| |_____ALL______________identifier_____BY_____identifier_____________________________________|__| |
| |__LEADING__| |__literal_____| |__literal_____| | <______________________ | |
| |__FIRST____| |____before-after-phrase__|__| |
|__________________________________________________________________________________________________________________________|
_______________________________________________________________________________________________________________
| |
| >>__INSPECT__identifier__REPLACING__________________________________________________________________________> |
| <___________________________________________________________________________________________________ |
| >________CHARACTERS__BY_____identifier__________________________________________________________________|__>< |
| | |__literal_____| | <______________________ | | |
| | |____before-after-phrase__|__| | |
| | <_________________________________________________________________________ | |
| |_____ALL______________identifier_____BY_____identifier_____________________________________|__| |
| |__LEADING__| |__literal_____| |__literal_____| | <______________________ | |
| |__FIRST____| |____before-after-phrase__|__| |
|_______________________________________________________________________________________________________________|
_______________________________________________________
| |
| >>_____BEFORE_______________________identifier_____>< |
| |__AFTER___| |__INITIAL__| |__literal_____| |
|_______________________________________________________|
____________________________________________________________________________________________________
| |
| <__________________________________________________________________ |
| <______________________ | |
| >>__MERGE__file-name_________________ASCENDING___________________qualified-data-name__|__|_______> |
| |__ON__| |__DESCENDING__| |__KEY__| |
| <____________ |
| >_____________________________________________________________USING__file-name____file-name__|___> |
| |___________________SEQUENCE____________alphabet-name__| |
| |__COLLATING__| |__IS__| |
| >______OUTPUT__PROCEDURE____________procedure-name______________________________________________>< |
| | |__IS__| |_____THROUGH_____procedure-name__| | |
| | |__THRU_____| | |
| | <____________ | |
| |__GIVING____file-name__|____________________________________________________________| |
|____________________________________________________________________________________________________|
_____________________________________________________
| |
| <_____________ |
| >>__MOVE_____identifier_____TO____identifier__|__>< |
| |__literal_____| |
|_____________________________________________________|
____________________________________________________________________
| |
| <_____________ |
| >>__MOVE_____CORRESPONDING_____identifier__TO____identifier__|__>< |
| |__CORR___________| |
|____________________________________________________________________|
________________________________________________________________________
| |
| <____________________________ |
| >>__MULTIPLY_____identifier_____BY____identifier_________________|___> |
| |__literal_____| |__ROUNDED__| |
| >____________________________________________________________________> |
| |____________SIZE__ERROR__statement-list__| |
| |__ON__| |
| >____________________________________________________________________> |
| |__NOT____________SIZE__ERROR__statement-list__| |
| |__ON__| |
| >___________________________________________________________________>< |
| |__END-MULTIPLY__| |
|________________________________________________________________________|
__________________________________________________________
| |
| >>__MULTIPLY_____identifier_____BY_____identifier______> |
| |__literal_____| |__literal_____| |
| <____________________________ |
| >___GIVING____identifier_________________|_____________> |
| |__ROUNDED__| |
| >______________________________________________________> |
| |____________SIZE__ERROR__statement-list__| |
| |__ON__| |
| >______________________________________________________> |
| |__NOT____________SIZE__ERROR__statement-list__| |
| |__ON__| |
| >_____________________________________________________>< |
| |__END-MULTIPLY__| |
|__________________________________________________________|
____________________________________________________________________________________
| |
| <__________________________________________________________________ |
| <________________________________________________ | |
| >>__OPEN_______INPUT____file-name______________________________________|_____|__>< |
| | |_____REVERSED___________________| | |
| | |______________NO__REWIND__| | |
| | |__WITH__| | |
| | <__________________________________________ | |
| |__OUTPUT____file-name________________________________|_______| |
| | |______________NO__REWIND__| | |
| | |__WITH__| | |
| | <____________ | |
| |__I-O____file-name__|________________________________________| |
| | <____________ | |
| |__EXTEND____file-name__|_____________________________________| |
| |
|____________________________________________________________________________________|
_________________________________________________
| |
| <_______________________________ |
| <____________ | |
| >>__OPEN_______INPUT____file-name__|______|__>< |
| | <____________ | |
| |__OUTPUT____file-name__|__| |
| | <____________ | |
| |__I-O____file-name__|_____| |
| | <____________ | |
| |__EXTEND____file-name__|__| |
| |
|_________________________________________________|
___________________________________________________________________
| |
| >>__PERFORM_____________________________________________________> |
| >______procedure-name__________________________________________>< |
| | |_____THROUGH_____procedure-name__| | |
| | |__THRU_____| | |
| |__statement-list__END-PERFORM__________________________| |
|___________________________________________________________________|
__________________________________________________________________________________________________________________________
| |
| >>__PERFORM_____procedure-name_______________________________________perform-varying-phrase__perform-after-phrase_____>< |
| | |_____THROUGH_____procedure-name__| | |
| | |__THRU_____| | |
| |__perform-varying-phrase__statement-list__END-PERFORM________________________________________________| |
|__________________________________________________________________________________________________________________________|
_____________________________________________________________________________________________________
| |
| >>__PERFORM_____procedure-name__________________________________________identifier_____TIMES_____>< |
| | |_____THROUGH_____procedure-name__| |__integer_____| | |
| | |__THRU_____| | |
| |_____identifier_____TIMES__statement-list__END-PERFORM__________________________| |
| |__integer_____| |
|_____________________________________________________________________________________________________|
_________________________________________________________________________________________
| |
| >>__PERFORM___________________________________________________________________________> |
| >______procedure-name_______________________________________perform-until-phrase_____>< |
| | |_____THROUGH_____procedure-name__| | |
| | |__THRU_____| | |
| |__perform-until-phrase__statement-list__END-PERFORM__________________________| |
|_________________________________________________________________________________________|
________________________________________________________________
| |
| >>________________________________________UNTIL__condition__>< |
| |______________TEST_____BEFORE_____| |
| |__WITH__| |__AFTER___| |
|________________________________________________________________|
______________________________________________________________________________________________________________________________
| |
| >>________________________________________VARYING_____identifier_____FROM_____identifier_____BY_____identifier_____UNTIL___> |
| |______________TEST_____BEFORE_____| |__index-name__| |__index-name__| |__literal_____| |
| |__WITH__| |__AFTER___| |__literal_____| |
| >___condition_____________________________________________________________________________________________________________>< |
|______________________________________________________________________________________________________________________________|
____________________________________________________________________________________________________________
| |
| >>______________________________________________________________________________________________________>< |
| | <__________________________________________________________________________________________ | |
| |____AFTER_____identifier_____FROM_____identifier_____BY_____identifier_____UNTIL__condition__|__| |
| |__index-name__| |__index-name__| |__literal_____| |
| |__literal_____| |
|____________________________________________________________________________________________________________|
__________________________________________________________________
| |
| >>__READ__file-name____________________________________________> |
| |__NEXT__| |__RECORD__| |
| >______________________________________________________________> |
| |__INTO__identifier__| |
| >______________________________________________________________> |
| |____________END__statement-list__| |
| |__AT__| |
| >_____________________________________________________________>< |
| |__NOT____________END__statement-list__| |__END-READ__| |
| |__AT__| |
|__________________________________________________________________|
_______________________________________________________________________
| |
| >>__READ__file-name_________________________________________________> |
| |__RECORD__| |__INTO__identifier__| |
| >___________________________________________________________________> |
| |__KEY____________qualified-data-name__| |
| |__IS__| |
| >___________________________________________________________________> |
| |__INVALID_____________statement-list__| |
| |__KEY__| |
| >__________________________________________________________________>< |
| |__NOT__INVALID_____________statement-list__| |__END-READ__| |
| |__KEY__| |
|_______________________________________________________________________|
______________________________________________________
| |
| >>__RELEASE__record-name__________________________>< |
| |__FROM__identifier__| |
|______________________________________________________|
____________________________________________________________________
| |
| >>__RETURN__file-name____________________________________________> |
| |__RECORD__| |__INTO__identifier__| |
| >_____________END__statement-list________________________________> |
| |__AT__| |
| >_______________________________________________________________>< |
| |__NOT____________END__statement-list__| |__END-RETURN__| |
| |__AT__| |
|____________________________________________________________________|
_______________________________________________________
| |
| >>__REWRITE__record-name____________________________> |
| |__FROM__identifier__| |
| >___________________________________________________> |
| |__INVALID_____________statement-list__| |
| |__KEY__| |
| >___________________________________________________> |
| |__NOT__INVALID_____________statement-list__| |
| |__KEY__| |
| >__________________________________________________>< |
| |__END-REWRITE__| |
|_______________________________________________________|
_____________________________________________________________
| |
| >>__SEARCH__identifier____________________________________> |
| |__VARYING_____identifier_____| |
| |__index-name__| |
| >_________________________________________________________> |
| |____________END__statement-list__| |
| |__AT__| |
| <________________________________________ |
| >_____WHEN__condition_____statement-list_____|____________> |
| |__NEXT__SENTENCE__| |
| >________________________________________________________>< |
| |__END-SEARCH__| |
|_____________________________________________________________|
_________________________________________________________________________________________________________________
| |
| >>__SEARCH__ALL__identifier___________________________________________________________________________________> |
| |____________END__statement-list__| |
| |__AT__| |
| >___WHEN_____qualified-data-name_______________EQUAL__________________identifier______________________________> |
| | |__IS__| | |__TO__| | |__literal________________| | |
| | |__=________________| |__arithmetic-expression__| | |
| |__condition-name-reference___________________________________________________________| |
| >_____________________________________________________________________________________________________________> |
| | <_______________________________________________________________________________________________ | |
| |____AND_____qualified-data-name_______________EQUAL__________________identifier___________________|__| |
| | |__IS__| | |__TO__| | |__literal________________| | |
| | |__=________________| |__arithmetic-expression__| | |
| |__condition-name-reference___________________________________________________________| |
| >______statement-list________________________________________________________________________________________>< |
| |__NEXT__SENTENCE__| |__END-SEARCH__| |
|_________________________________________________________________________________________________________________|
__________________________________________________________
| |
| <___________________ |
| >>__SET_______index-name_____|__TO_____index-name_____>< |
| |__identifier__| |__identifier__| |
| |__integer_____| |
|__________________________________________________________|
________________________________________________________________
| |
| <_____________ |
| >>__SET____index-name__|_____UP__BY__________identifier_____>< |
| |__DOWN__BY__| |__integer_____| |
|________________________________________________________________|
_____________________________________________________
| |
| <____________________________________ |
| <________________ | |
| >>__SET______mnemonic-name__|__TO_____ON______|__>< |
| |__OFF__| |
|_____________________________________________________|
______________________________________________________
| |
| <___________________________ |
| >>__SET____condition-name-reference__|__TO__TRUE__>< |
|______________________________________________________|
_________________________________________________
| |
| <________________________________ |
| >>__SET_______identifier__________________|___> |
| |__ADDRESS__OF__identifier__| |
| >___TO_____identifier________________________>< |
| |__ADDRESS__OF__identifier__| |
| |__NULL_____________________| |
| |__NULLS____________________| |
|_________________________________________________|
________________________________________________________________________________________________
| |
| <__________________________________________________________________ |
| <______________________ | |
| >>__SORT__file-name_________________ASCENDING___________________qualified-data-name__|__|____> |
| |__ON__| |__DESCENDING__| |__KEY__| |
| >____________________________________________________________________________________________> |
| |______________DUPLICATES_________________________| |
| |__WITH__| |__IN__| |__ORDER__| |
| >____________________________________________________________________________________________> |
| |___________________SEQUENCE____________alphabet-name__| |
| |__COLLATING__| |__IS__| |
| <____________ |
| >______USING____file-name__|_________________________________________________________________> |
| |__INPUT__PROCEDURE____________procedure-name_______________________________________| |
| |__IS__| |_____THROUGH_____procedure-name__| |
| |__THRU_____| |
| |
| <____________ |
| >______GIVING____file-name__|_______________________________________________________________>< |
| |__OUTPUT__PROCEDURE____________procedure-name_______________________________________| |
| |__IS__| |_____THROUGH_____procedure-name__| |
| |__THRU_____| |
| |
|________________________________________________________________________________________________|
__________________________________________________________________________________________________
| |
| >>__START__file-name___________________________________________________________________________> |
| >______________________________________________________________________________________________> |
| |__KEY_______________EQUAL________________________________________qualified-data-name__| |
| |__IS__| | |__TO__| | |
| |__=_________________________________________| |
| |__GREATER___________________________________| |
| | |__THAN__| | |
| |__>_________________________________________| |
| |__NOT__LESS_________________________________| |
| | |__THAN__| | |
| |__NOT__<____________________________________| |
| |__GREATER______________OR__EQUAL____________| |
| | |__THAN__| |__TO__| | |
| |__>=________________________________________| |
| >______________________________________________________________________________________________> |
| |__INVALID_____________statement-list__| |
| |__KEY__| |
| >_____________________________________________________________________________________________>< |
| |__NOT__INVALID_____________statement-list__| |__END-START__| |
| |__KEY__| |
|__________________________________________________________________________________________________|
_____________________________
| |
| >>__STOP_____RUN_________>< |
| |__literal__| |
|_____________________________|
___________________________________________________________________________
| |
| >>__STRING______________________________________________________________> |
| <_______________________________________________________________ |
| <___________________ | |
| >__________identifier_____|__DELIMITED_______________identifier_____|___> |
| |__literal_____| |__BY__| |__literal_____| |
| |__SIZE________| |
| >___INTO__identifier____________________________________________________> |
| |______________POINTER__identifier__| |
| |__WITH__| |
| >_______________________________________________________________________> |
| |____________OVERFLOW__statement-list__| |
| |__ON__| |
| >_______________________________________________________________________> |
| |__NOT____________OVERFLOW__statement-list__| |
| |__ON__| |
| >______________________________________________________________________>< |
| |__END-STRING__| |
|___________________________________________________________________________|
__________________________________________________________
| |
| <___________________ |
| >>__SUBTRACT_______identifier_____|__FROM______________> |
| |__literal_____| |
| <____________________________ |
| >_____identifier_________________|_____________________> |
| |__ROUNDED__| |
| >______________________________________________________> |
| |____________SIZE__ERROR__statement-list__| |
| |__ON__| |
| >______________________________________________________> |
| |__NOT____________SIZE__ERROR__statement-list__| |
| |__ON__| |
| >_____________________________________________________>< |
| |__END-SUBTRACT__| |
|__________________________________________________________|
_________________________________________________________________
| |
| <___________________ |
| >>__SUBTRACT_______identifier_____|__FROM_____identifier______> |
| |__literal_____| |__literal_____| |
| <____________________________ |
| >___GIVING____identifier_________________|____________________> |
| |__ROUNDED__| |
| >_____________________________________________________________> |
| |____________SIZE__ERROR__statement-list__| |
| |__ON__| |
| >_____________________________________________________________> |
| |__NOT____________SIZE__ERROR__statement-list__| |
| |__ON__| |
| >____________________________________________________________>< |
| |__END-SUBTRACT__| |
|_________________________________________________________________|
__________________________________________________________
| |
| >>__SUBTRACT_____CORRESPONDING_____identifier__FROM____> |
| |__CORR___________| |
| >___identifier_________________________________________> |
| |__ROUNDED__| |
| >______________________________________________________> |
| |____________SIZE__ERROR__statement-list__| |
| |__ON__| |
| >______________________________________________________> |
| |__NOT____________SIZE__ERROR__statement-list__| |
| |__ON__| |
| >_____________________________________________________>< |
| |__END-SUBTRACT__| |
|__________________________________________________________|
__________________________________________________________________________________________________________________
| |
| >>__UNSTRING__identifier_______________________________________________________________________________________> |
| >_______________________________________________________________________________________________________INTO___> |
| |__DELIMITED__________________________identifier_________________________________________________| |
| |__BY__| |__ALL__| |__literal_____| | <__________________________________ | |
| |____OR________________identifier_____|__| |
| |__ALL__| |__literal_____| |
| <_______________________________________________________________________________________ |
| >_____identifier____________________________________________________________________________|__________________> |
| |__DELIMITER____________identifier__| |__COUNT____________identifier__| |
| |__IN__| |__IN__| |
| >______________________________________________________________________________________________________________> |
| |______________POINTER__identifier__| |__TALLYING____________identifier__| |
| |__WITH__| |__IN__| |
| >______________________________________________________________________________________________________________> |
| |____________OVERFLOW__statement-list__| |__NOT____________OVERFLOW__statement-list__| |
| |__ON__| |__ON__| |
| >_____________________________________________________________________________________________________________>< |
| |__END-UNSTRING__| |
|__________________________________________________________________________________________________________________|
_______________________________________________________________________________________________________________________________________
| |
| >>__WRITE__record-name______________________________________________________________________________________________________________> |
| |__FROM__identifier__| |
| >______________________________________________________________________________________write-statement-phrase______________________>< |
| | |_____BEFORE____________________________identifier___________________________| | |__END-WRITE__| |
| | |__AFTER___| |__ADVANCING__| | |__integer_____| |_____LINE______| | | |
| | | |__LINES__| | | |
| | |__mnemonic-name________________________| | |
| | |__PAGE_________________________________| | |
| |__________________________________________________________________________________________________________| |
| |__INVALID_____________statement-list__| |__NOT__INVALID_____________statement-list__| |
| |__KEY__| |__KEY__| |
|_______________________________________________________________________________________________________________________________________|
_______________________________________________________
| |
| >>__WRITE__record-name______________________________> |
| |__FROM__identifier__| |
| >___________________________________________________> |
| |__INVALID_____________statement-list__| |
| |__KEY__| |
| >___________________________________________________> |
| |__NOT__INVALID_____________statement-list__| |
| |__KEY__| |
| >__________________________________________________>< |
| |__END-WRITE__| |
|_______________________________________________________|
_____________________________________________________________________
| |
| >>__WRITE__record-name___________________________________________>< |
| |__FROM__identifier__| |__END-WRITE__| |
|_____________________________________________________________________|
___________________________________________________________________________________________________________________
| |
| >>_____________________________________________________________________________________________________________>< |
| |_______________END-OF-PAGE_____statement-list__| |__NOT_______________END-OF-PAGE_____statement-list__| |
| |__AT__| |__EOP__________| |__AT__| |__EOP__________| |
|___________________________________________________________________________________________________________________|
_____________________________________________________
| |
| >>_____basis-statement___________________________>< |
| |__cbl-process-statement__________________| |
| |__control-cbl-statement__________________| |
| |__copy-statement_________________________| |
| |__delete-compiler-directing-statement____| |
| |__eject-statement________________________| |
| |__enter-statement________________________| |
| |__insert-statement_______________________| |
| |__ready-or-reset-trace-statement_________| |
| |__replace-statement______________________| |
| |__replace-statement______________________| |
| |__service-label-statement________________| |
| |__service-reload-statement_______________| |
| |__skip1-2-3-statement____________________| |
| |__title-statement________________________| |
| |__use-statement__________________________| |
|_____________________________________________________|
________________________________________________________
| |
| >>_________________________BASIS_____basis-name_____>< |
| |__sequence-number__| |__literal_____| |
|________________________________________________________|
___________________________________________
| |
| >>_____CBL_____________________________>< |
| |__PROCESS__| |__options-list__| |
|___________________________________________|
______________________________________________________
| |
| <_________________ |
| >>_____*CONTROL__________SOURCE_______|___________>< |
| |__*CBL______| |__NOSOURCE__| |__.__| |
| |__LIST______| |
| |__NOLIST____| |
| |__MAP_______| |
| |__NOMAP_____| |
|______________________________________________________|
___________________________________________________________________
| |
| >>__COPY_____text-name__________________________________________> |
| |__literal____| |_____OF________library-name_____| |
| |__IN__| |__literal_______| |
| >_______________________________________________________________> |
| |__SUPPRESS__| |
| >_________________________________________________________.____>< |
| | <_________________________________ | |
| |__REPLACING____copy-operand__BY__copy-operand__|__| |
|___________________________________________________________________|
______________________________________________________________
| |
| >>_________________________DELETE__sequence-number-field__>< |
| |__sequence-number__| |
|______________________________________________________________|
________________________
| |
| >>__EJECT___________>< |
| |__.__| |
|________________________|
_____________________________________________________
| |
| >>__ENTER__language-name______________________.__>< |
| |__routine-name__| |
|_____________________________________________________|
______________________________________________________________
| |
| >>_________________________INSERT__sequence-number-field__>< |
| |__sequence-number__| |
|______________________________________________________________|
_______________________________
| |
| >>_____READY_____TRACE__.__>< |
| |__RESET__| |
|_______________________________|
_____________________________________________________________________
| |
| <_____________________________________________ |
| >>__REPLACE____quoted-pseudo-text__BY__quoted-pseudo-text__|__.__>< |
|_____________________________________________________________________|
_________________________
| |
| >>__REPLACE__OFF__.__>< |
|_________________________|
________________________
| |
| >>__SERVICE__LABEL__>< |
|________________________|
_____________________________________
| |
| >>__SERVICE__RELOAD__identifier__>< |
|_____________________________________|
______________________________
| |
| >>_____SKIP1______________>< |
| |__SKIP2__| |__.__| |
| |__SKIP3__| |
|______________________________|
_________________________________
| |
| >>__TITLE__literal___________>< |
| |__.__| |
|_________________________________|
______________________________________________________________________________
| |
| >>__USE________________AFTER_____________________EXCEPTION_____PROCEDURE___> |
| |__GLOBAL__| |__STANDARD__| |__ERROR______| |
| <____________ |
| >__________________file-name__|___________________________________________>< |
| |__ON__| |__INPUT___________| |
| |__OUTPUT__________| |
| |__I-O_____________| |
| |__EXTEND__________| |
| |
|______________________________________________________________________________|
____________________________________________________________________________
| |
| >>__USE________________AFTER_____________________________________________> |
| |__GLOBAL__| |__STANDARD__| |_____BEGINNING_____| |
| |__ENDING_____| |
| <____________ |
| >_____________________LABEL__PROCEDURE_________________file-name__|_____>< |
| |_____FILE_____| |__ON__| |__INPUT___________| |
| |__REEL__| |__OUTPUT__________| |
| |__UNIT__| |__I-O_____________| |
| |__EXTEND__________| |
| |
|____________________________________________________________________________|
________________________________________________________________________
| |
| <_________________ |
| >>__USE_____________DEGUGGING_________________procedure-name__|_____>< |
| |__FOR__| |__ON__| |__ALL__PROCEDURES______| |
| |
|________________________________________________________________________|
______________________________________
| |
| >>_____combinable-condition_______>< |
| |__combined-conditions_____| |
|______________________________________|
________________________________________________________
| |
| >>_____simple-condition_____________________________>< |
| |__negated-simple-conditions_________________| |
| |__abbreviated-combined-relation-conditions__| |
|________________________________________________________|
__________________________________________
| |
| >>_____class-condition________________>< |
| |__condition-name-condition____| |
| |__relation-condition__________| |
| |__sign-condition______________| |
| |__switch-status-condition_____| |
| |__(__condition__)_____________| |
|__________________________________________|
_________________________________________________________________
| |
| >>__identifier__________________________NUMERIC______________>< |
| |__IS__| |__NOT__| |__ALPHABETIC________| |
| |__ALPHABETIC-LOWER__| |
| |__ALPHABETIC-UPPER__| |
| |__class-name________| |
| |__DBCS______________| |
| |__KANJI_____________| |
|_________________________________________________________________|
__________________________________
| |
| >>__condition-name-reference__>< |
|__________________________________|
____________________________________________________
| |
| >>__arithmetic-expression__relational-operator___> |
| >___arithmetic-expression_______________________>< |
|____________________________________________________|
__________________________________________________________
| |
| >>_____________________________________________________> |
| |__IS__| |
| >____________________GREATER__________________________>< |
| | |__NOT__| | |__THAN__| | | |
| | |__>____________________| | |
| | |__LESS_________________| | |
| | | |__THAN__| | | |
| | |__<____________________| | |
| | |__EQUAL________________| | |
| | | |__TO__| | | |
| | |__=____________________| | |
| |__GREATER______________OR__EQUAL______________| |
| | |__THAN__| |__TO__| | |
| |__>=__________________________________________| |
| |__LESS______________OR__EQUAL_________________| |
| | |__THAN__| |__TO__| | |
| |__<__=________________________________________| |
|__________________________________________________________|
____________________________________________________________________
| |
| >>__arithmetic-expression__________________________POSITIVE_____>< |
| |__IS__| |__NOT__| |__NEGATIVE__| |
| |__ZERO______| |
|____________________________________________________________________|
__________________________________
| |
| >>__condition-name-reference__>< |
|__________________________________|
________________________
| |
| >>__NOT__condition__>< |
|________________________|
____________________________
| |
| >>__relation-condition___> |
| >___abbreviation-rest___>< |
|____________________________|
___________________________________________________________________
| |
| >>__arithmetic-expression__relational-operator__________________> |
| >___(_____________arithmetic-expression__abbreviation-rest__)__>< |
| |__NOT__| |
|___________________________________________________________________|
_______________________________________________________________________________________________________________
| |
| >>__arithmetic-expression__(_____________relational-operator__arithmetic-expression__abbreviation-rest__)__>< |
| |__NOT__| |
|_______________________________________________________________________________________________________________|
_________________________________________________________________________________
| |
| <_____________________________________________________________________ |
| >>_______AND___________________________________________abbreviation-leaf__|__>< |
| |__OR___| |__NOT__| |__relational-operator__| |
|_________________________________________________________________________________|
______________________________________________________________
| |
| >>_____arithmetic-expression______________________________>< |
| |__(__arithmetic-expression__abbreviation-rest__)__| |
|______________________________________________________________|
____________________________________________________________________
| |
| <__________________________________ |
| >>__combinable-condition_______AND_____combinable-condition__|__>< |
| |__OR___| |
|____________________________________________________________________|
______________________________________________________
| |
| >>__paragraph-name________________________________>< |
| |_____IN_____section-name__| |
| |__OF__| |
|______________________________________________________|
______________________
| |
| >>__section-name__>< |
|______________________|
__________________________________________________________________
| |
| >>__qualified-data-name________________________________________> |
| | <__________________ | |
| |____(__subscript__)__|__| |
| >_____________________________________________________________>< |
| |__(__leftmost-character-position__:________________)__| |
| |__length__| |
|__________________________________________________________________|
___________________________________________________
| |
| >>__LINAGE-COUNTER_____________________________>< |
| |_____IN_____file-name__| |
| |__OF__| |
|___________________________________________________|
______________________________________________________________________________
| |
| >>__data-name_____________________________________________________________>< |
| | <______________________ | |_____IN_____file-name__| |
| |_______IN_____data-name__|__| |__OF__| |
| |__OF__| |
|______________________________________________________________________________|
__________________________
| |
| >>__special-register__>< |
|__________________________|
_______________________________
| |
| >>__arithmetic-expression__>< |
|_______________________________|
_______________________________
| |
| >>__arithmetic-expression__>< |
|_______________________________|
_______________________________________________________________
| |
| >>__condition-name__________________________________________> |
| | <______________________ | |
| |_______IN_____data-name__|__| |
| |__OF__| |
| >__________________________________________________________>< |
| |_____IN_____file-name__| | <__________________ | |
| |__OF__| |____(__subscript__)__|__| |
|_______________________________________________________________|
____________________________________________________________
| |
| >>__condition-name______________________________________>< |
| | <__________________________ | |
| |_______IN_____mnemonic-name__|__| |
| |__OF__| |
|____________________________________________________________|
________________________________________________________________
| |
| <____________________________________________________ |
| >>_______integer_________________________________________|__>< |
| |__qualified-data-name__________________________| |
| | |_____+_____integer__| | |
| | |__-__| | |
| |__index-name___________________________________| |
| |_____+_____integer__| |
| |__-__| |
|________________________________________________________________|
__________________________________________________
| |
| >>__times-div_________________________________>< |
| | <_____________________ | |
| |_______+_____times-div__|__| |
| |__-__| |
|__________________________________________________|
__________________________________________
| |
| >>__power_____________________________>< |
| | <_________________ | |
| |_______*_____power__|__| |
| |__/__| |
|__________________________________________|
____________________________________________________
| |
| >>_________________basis________________________>< |
| |_____+_____| | <____________ | |
| |__-__| |____**__basis__|__| |
|____________________________________________________|
___________________________________________
| |
| >>_____identifier______________________>< |
| |__literal______________________| |
| |__(__arithmetic-expression__)__| |
|___________________________________________|
__________________________________
| |
| >>_____quoted-pseudo-text_____>< |
| |__identifier__________| |
| |__literal_____________| |
| |__cobol-word__________| |
|__________________________________|
_________________
| |
| >>_____F_____>< |
| |__V__| |
| |__U__| |
| |__S__| |
|_________________|
______________________________________
| |
| >>__alphabetic-user-defined-word__>< |
|______________________________________|
______________________________________
| |
| >>__alphabetic-user-defined-word__>< |
|______________________________________|
______________________________________
| |
| >>__alphabetic-user-defined-word__>< |
|______________________________________|
______________________________________
| |
| >>__alphabetic-user-defined-word__>< |
|______________________________________|
______________________________________
| |
| >>__alphabetic-user-defined-word__>< |
|______________________________________|
______________________________________
| |
| >>__alphabetic-user-defined-word__>< |
|______________________________________|
______________________________________
| |
| >>__alphabetic-user-defined-word__>< |
|______________________________________|
_____________________________
| |
| >>__qualified-data-name__>< |
|_____________________________|
______________________________________
| |
| >>__alphabetic-user-defined-word__>< |
|______________________________________|
______________________________________
| |
| >>__alphabetic-user-defined-word__>< |
|______________________________________|
___________________________
| |
| >>__user-defined-word__>< |
|___________________________|
___________________________
| |
| >>__user-defined-word__>< |
|___________________________|
___________________________
| |
| >>__user-defined-word__>< |
|___________________________|
___________________________
| |
| >>__user-defined-word__>< |
|___________________________|
___________________________
| |
| >>__user-defined-word__>< |
|___________________________|
_____________________
| |
| >>__system-name__>< |
|_____________________|
_____________________
| |
| >>__system-name__>< |
|_____________________|
_____________________
| |
| >>__system-name__>< |
|_____________________|
_____________________
| |
| >>__system-name__>< |
|_____________________|
______________________
| |
| >>__program-name__>< |
|______________________|
______________________________
| |
| >>_____ZERO_______________>< |
| |__ZEROS___________| |
| |__ZEROES__________| |
| |__SPACE___________| |
| |__SPACES__________| |
| |__HIGH-VALUE______| |
| |__HIGH-VALUES_____| |
| |__LOW-VALUE_______| |
| |__LOW-VALUES______| |
| |__QUOTE___________| |
| |__QUOTES__________| |
| |__ALL__literal____| |
| |__NULL____________| |
| |__NULLS___________| |
|______________________________|
___________________________________
| |
| >>_____nonnumeric______________>< |
| |__numeric______________| |
| |__dbcs_________________| |
| |__figurative-constant__| |
|___________________________________|
________________________________________
| |
| >>_____ADDRESS__OF__data-name_______>< |
| |__DEBUG-ITEM________________| |
| |__LENGTH__OF__identifier____| |
| |__RETURN-CODE_______________| |
| |__SHIFT-OUT_________________| |
| |__SHIFT-IN__________________| |
| |__SORT-CONTROL______________| |
| |__SORT-CORE-SIZE____________| |
| |__SORT-FILE-SIZE____________| |
| |__SORT-MESSAGE______________| |
| |__SORT-MODE-SIZE____________| |
| |__SORT-RETURN_______________| |
| |__TALLY_____________________| |
| |__WHEN-COMPILED_____________| |
|________________________________________|
Copyright (c) 1999, Ralf Lämmel & Chris Verhoef.
All rights reserved.
Permission is hereby granted by Ralf Lämmel and Chris
Verhoef (the "Copyright holders"), free of charge, to any person
obtaining a copy of this software in source code or binary form and
associated files (the "Distribution"), to deal in the Distribution
without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Distribution, and to permit persons to whom the
Distribution is furnished to do so, subject to the following
conditions:
- Redistributions containing source code from the Distribution
must retain the above copyright notice, this list of conditions and
the disclaimer included below (the "Disclaimer").
- Redistributions containing parts of the Distribution in binary
form must reproduce the above copyright notice, this list of
conditions and the Disclaimer in the documentation and/or other
materials provided with the redistribution.
- The names of the Copyright holders may not be used to endorse
or promote products derived from this software without specific
prior written permission.
DISCLAIMER
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS `AS IS' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.
End Of Grammar