Professional Documents
Culture Documents
Accept Statement
Format 1
mnemonic-name-1
ACCEPT identifier-1 [FROM { }]
environment-name
Format 2
DATE
DAY
ACCEPT identifier-1 FROM { }
DAY-OF-WEEK
TIME
Format 1
identifier-1
ADD { } ... TO {identifier-2 [ROUNDED]} ...
literal-1
[ON SIZE ERROR imperative-statement-1]
[NOT ON SIZE ERROR imperative-statement-2]
[END-ADD]
Format 2
identifier-1 identifier-2
ADD { } ... TO { } GIVING {identifier-3 [ROUNDED]}...
literal-1 literal-2
[ON SIZE ERROR imperative-statement-1]
[NOT ON SIZE ERROR imperative-statement-2]
[END-ADD]
Format 3
CORRESPONDING
ADD { } identifier-1 TO identifier-2 [ROUNDED]
CORR
[ON SIZE ERROR imperative-statement-1]
[NOT ON SIZE ERROR imperative-statement-2]
[END-ADD]
The CALL Statement
Format 1
identifier-1
CALL { }
literal-1
identifier-2
BY REFERENCE { ADDRESS OF identifier-3 } ...
file-name-1
{ } ...
[LENGTH OF] identifier-2
[ USING { }]
BY CONTENT { ADDRESS OF identifier-3 } ...
literal-2
identifier-2
{ } ...
literal-2
[ON OVERFLOW imperative-statement-1]
[END-CALL]
Format 2
Identifier-1
CALL { }
literal-1
identifier-2
BY REFERENCE { ADDRESS OF identifier-3 } ...
file-name-1
{ } ...
[LENGTH OF] identifier-2
[ USING { }]
BY CONTENT { ADDRESS OF identifier-3 } ...
literal-2
identifier-2
{ } ...
literal-2
[ON EXCEPTION imperative-statement-1]
[NOT ON EXCEPTION imperative-statement-2]
[END-CALL]
Format
Format
=
COMPUTE {identifier-2 [ROUNDED]} ... { } arithmetic-expression
EQUAL
[ON SIZE ERROR imperative-statement-1]
[NOT ON SIZE ERROR imperative-statement-2]
[END-COMPUTE]
Format
Format 1
identifier-1
DIVIDE { } ... INTO {identifier-2 [ROUNDED]} ...
literal-1
[ON SIZE ERROR imperative-statement-1]
[NOT ON SIZE ERROR imperative-statement-2]
[END-DIVIDE]
Format 2
identifier-1 identifier-2
DIVIDE { } INTO { } GIVING {identifier-3 [ROUNDED]}...
literal-1 literal-2
[ON SIZE ERROR imperative-statement-1]
[NOT ON SIZE ERROR imperative-statement-2]
[END-DIVIDE]
Format 3
identifier-1 identifier-2
DIVIDE { } BY { } GIVING {identifier-3 [ROUNDED]}...
literal-1 literal-2
[ON SIZE ERROR imperative-statement-1]
[NOT ON SIZE ERROR imperative-statement-2]
[END-DIVIDE]
Format 4
Format 5
identifier-1 identifier-2
DIVIDE { } BY { } GIVING identifier-3 [ROUNDED] REMAINDER identifier-4
literal-1 literal-2
[ON SIZE ERROR imperative-statement-1]
[NOT ON SIZE ERROR imperative-statement-2]
[END-DIVIDE]
Format
identifier-1 identifier-2
literal-1 literal-2
arith-expr-1 arith-expr-2
EVALUATE { }[ ALSO { }] ...
condition-1 condition-2
TRUE TRUE
FALSE FALSE
ANY
condition-3
TRUE
{{WHEN { FALSE }
identifier-3 identifier-4
THROUGH
[NOT] {{ literal-3 }[ { } { literal-4 }]}
THRU
arith-expr-3 arith-expr-4
ANY
condition-4
TRUE
[ALSO { FALSE } ] ...}...
identifier-5 identifier-6
THROUGH
[NOT] {{ literal-5 }[ { } { literal-6 }]}
THRU
arith-expr-5 arith-expr-6
imperative-statement-1}...
[WHEN OTHER imperative-statement-2]
[END-EVALUATE]
The IF Statement
Format
IFcondition-1 THEN
statement-1
{ }
NEXT SENTENCE
[ELSE
statement-1
{ }]
NEXT SENTENCE
[END-IF
The INITIALIZE Statement
Format
INITIALIZE {identifier-1}...
ALPHABETIC
ALPHANUMERIC
identifier-2
[REPLACING { { NUMERIC } DATA BY { } }...]
literal-1
ALPHANUMERIC-EDITED
NUMERIC-EDITED
Format 1
Format 2
Format 3
identifier- identifier-
CHARACTE BEFORE INITIA
{ 17 }[{ } { 18 }] ...
RS BY AFTER L
literal-12 literal-13
{ identifier identifier identifier } ...
ALL BEFOR
-19 B -20 INITIA -21
{ LEADING } { } { } [{ E } { }] ... } ...
literal- Y literal- L literal-
FIRST AFTER
14 15 16
Format 4
Format
ASCENDING
MERGE file-name-1{ON { } KEY {data-name-1}...}...
DESCENDING
Format 1
identifier-1
MOVE { } TO {identifier-2} ...
literal-1
Format 2
CORRESPONDING
MOVE { } identifier-1 TO {identifier-2} ...
CORR
Format 1
identifier-1
MULTIPLY { } ... BY {identifier-2 [ROUNDED]} ...
literal-1
[ON SIZE ERROR imperative-statement-1]
[NOT ON SIZE ERROR imperative-statement-2]
[END-MULTIPLY]
Format 2
identifier-1 identifier-2
MULTIPLY { } ... BY { } GIVING {identifier-3 [ROUNDED]}...
literal-1 literal-2
[ON SIZE ERROR imperative-statement-1]
[NOT ON SIZE ERROR imperative-statement-2]
[END-MULTIPLY]
The OPEN Statement
Format
Format 1
THROUGH
PERFORM [procedure-name-1 [{ } procedure-name-2 ] ]
THRU
[imperative-statement-1 END-PERFORM]
Format 2
THROUGH
PERFORM [procedure-name-1 [{ } procedure-name-2 ] ]
THRU
identifier-1
{ } TIMES [imperative-statement-1 END-PERFORM]
integer-1
Format 3
THROUGH
PERFORM [procedure-name-1 [{ } procedure-name-2 ] ]
THRU
BEFORE
[ WITH TEST { }] UNTIL condition-1
AFTER
[imperative-statement-1 END-PERFORM]
Format 4
THROUGH
PERFORM [procedure-name-1 [{ } procedure-name-2 ] ]
THRU
BEFORE
[ WITH TEST { }]
AFTER
identifier-3
identifier-2 identifier-4
VARYING { } FROM { index-name-2 } BY { }
index-name-1 literal-2
literal-1
UNTIL condition-2
identifier-5
identifier-4 identifier-5
[AFTER { } FROM { index-name-4 } BY { }
index-name-3 literal-2
literal-3
UNTIL condition-3] ...
[imperative-statement-1 END-PERFORM]
The READ Statement
Format 1
Format 2
Format
identifier-1
RELEASE record-name-1 [ FROM { }]
literal-1
Format
Format 2
identifier-1
REWRITE record-name-1 [ FROM { }]
literal-1
[INVALID KEY imperative-statement-1]
[NOT INVALID KEY imperative-statement-2]
[END-REWRITE]
The SEARCH Statement
Format 1
identifier-2
SEARCH identifier-1 [ VARYING { }]
index-name-1
[AT END imperative-statement-1]
imperative-statement-2
{ WHEN condition-1 { }} ...
NEXT SENTENCE
[END-SEARCH]
Format 2
Format 1
index-name-2
index-name-1
SET { } ... TO { identifier-2 }
identifier-1
integer-1
Format 2
UP identifier-3
SET {index-name-3} ... { } BY { }
DOWN integer-2
Format 3
ON
SET { {mnemonic-name-1} ... TO { }} ...
OFF
Format 4
SET {condition-name-1} ... TO TRUE...
Format
ASCENDING
SORT file-name-1 {ON { } KEY {data-name-1}...}...
DESCENDING
Format
Format
identifier-1 identifier-2
STRING {{ } ... DELIMITED BY { }} ...
literal-1 literal-2
INTO identifier-3
[WITH POINTER identifier-4]
[ON OVERFLOW imperative-statement-1]
[NOT ON OVERFLOW imperative-statement-2]
[END-STRING]
The SUBTRACT Statement
Format 1
identifier-1
SUBTRACT { } ... FROM {identifier-2 [ROUNDED]} ...
literal-1
[ON SIZE ERROR imperative-statement-1]
[NOT ON SIZE ERROR imperative-statement-2]
[END-SUBTRACT]
Format 2
identifier-1 identifier-2
SUBTRACT { } ... FROM { } GIVING identifier-3 [ROUNDED]
literal-1 literal-2
[ON SIZE ERROR imperative-statement-1]
[NOT ON SIZE ERROR imperative-statement-2]
[END-SUBTRACT]
Format 3
CORRESPONDING
SUBTRACT { } identifier-1 FROM identifier-2 [ROUNDED]
CORR
[ON SIZE ERROR imperative-statement-1]
[NOT ON SIZE ERROR imperative-statement-2]
[END-SUBTRACT]
Format
identifier-2 identifier-3
UNSTRING identifier-1 [ DELIMITED BY [ALL] { } [ OR [ALL] { }] ... ]
literal-1 literal-2
INTO {identifier-4 [DELIMITER IN identifier-5] [COUNT IN identifier-6]}...
[WITH POINTER identifier-7]
[TALLYING IN identifier-8]
[ON OVERFLOW imperative-statement-1]
[NOT ON OVERFLOW imperative-statement-2]
[END-UNSTRING]
The WRITE Statement
Format 1
identifier-1
WRITE record-name-1 [ FROM { }]
literal-1
identifier-2 LINE
{ }[ ]
BEFORE integer-1 LINES
[{ } ADVANCING { }]
AFTER mnemonic-name-1
{ }
PAGE
END-OF-PAGE
[AT { } imperative-statement-1]
EOP
END-OF-PAGE
[NOT AT { } imperative-statement-1]
EOP
[END-WRITE]
Format 2
identifier-1
WRITE record-name-1 [ FROM { }]
literal-1
[INVALID KEY imperative-statement-1]
[NOT INVALID KEY imperative-statement-2]
[END-WRITE]