DEFINITIONS OF SYMBOLS AND PLACEHOLDERS:
... (ellipsis) - indication
that the preceding item may be repeated a number of times, separated by
a delimeter (ex. comma, space)
[ ] (brackets) - indication
of an optional clause in the syntax
| (vertical bar) - two
or more words separated by a vertical bar indicates that one of the values
may be used
alphanumeric variable -
an
alphanumerica variable defined in WORKING-STORAGE
arithmetic expression -
an
expression representing one or more arithmetic operations (+ - / *) involving
numeric values
compare list -
condition - an
expression representing one or more comparisons between values optionally
joined by AND or OR
constant, alphanumeric - a
set of characters enclosed in quotation marks: "ABC"
constant, numeric - an
expression representing a number: 1296.54
do something - any
COBOL command(s)
do something else - any
COBOL command(s) different from the one given above
file-field-name - a
COBOL variable that is a field in a record of a file described in an FD
or SD
file-name - the
name of a file described in an FD
file-record - a
COBOL variable that is the record of a file described in an FD
index - a
variable defined in WORKING-STORAGE used as an index for a table or array
mode - one
of the four open modes for a file: OUTUT, EXTEND, I-O, INPUT
numeric value - a
numeric constant or a numeric variable
numeric variable - a
numeric variable defined in WORKING-STORAGE
paragraph - a
paragraph name in the COBOL program
sort-file - the
name of a file described in an SD
value - a
constant or a variable
variable - a
variable defined in WORKING-STORAGE
ACCEPTACCEPT variable...ADDADD numeric value ... TOCALL
numeric variable [ROUNDED] ...
[ ON SIZE ERROR
do something]ADD numeric value ... GIVING
numeric variable [ROUNDED] ...
[ ON SIZE ERROR
do something]ADD numeric value ... TO
numeric variable
GIVING numeric variable [ROUNDED] ...
[ ON SIZE ERROR
do something]CALL "program-name"CLOSECLOSE filenameCOMPUTECOMPUTE numeric variableCOPY
[ROUNDED] =
arithmetic expression
[ ON SIZE ERROR
do something else]COPY "filename.ext"DELETEDELETE file-name RECORDDISPLAY
[ INVALID KEY
do somethingDISPLAY value [WITH NO ADVANCING]DIVIDEDIVIDE numeric value BY numeric valueEXIT
GIVING variable [ROUNDED] ...
[ ON SIZE ERROR
do something ]DIVIDE numeric value BY numeric value
GIVING variable [ROUNDED] ...
REMAINDER numeric variable
[ ON SIZE ERROR
do something ]DIVIDE numeric value INTO numeric value
GIVING variable [ROUNDED] ...
[ ON SIZE ERROR
do something ]DIVIDE numeric value INTO numeric value
GIVING variable [ROUNDED] ...
REMAINDER numeric variable
[ ON SIZE ERROR
do something ]EXIT PROGRAMGO TOGO TO paragraphIF ELSE
*** do not use in this class!IF conditionINSPECT
do something...
ELSE
do something...INSPECT variableMOVE
CONVERTING compare list
TO replace listMOVE value TO variable ...MULTIPLYMULTIPLY numeric valueOPEN
BY numeric variable [ROUNDED] ...
[ ON SIZE ERROR
do something ]MULTIPLY numeric value
BY numeric variable
GIVING variable [ROUNDED] ...
[ ON SIZE ERROR
do something ]OPEN mode file-namePERFORMPERFORM paragraphREADPERFORM paragraph
value TIMESPERFORM paragraph
UNTIL conditionPERFORM paragraph
VARYING variable
FROM value
BY value
UNTIL conditionREAD file-name [NEXT] RECORDREWRITE
AT END
do somethingFor a SEQUENTIAL file, READ and READ NEXT RECORD are identical
READ file-name RECORD
INVALID KEY
do somethingREWRITE file-recordSEARCH
[ INVALID KEY
do something ]SEARCH table nameSET
[ AT END
do something ]
WHEN condition
do somethingSET index variable TO valueSORTSET index
UP|DOWN BY valueSORT sort-fileSTART
ON ASCENDING KEY sort-field
USING input-file
GIVING output-fileSORT sort-file
ON ASCENDING|DESCENDING KEY
file-field-nameSTART file nameSUBTRACT
KEY NOT < key name
[ INVALID KEY
do something ]START file name
KEY > key name
[ INVALID KEY
do something ]START file name
KEY EQUALS|NOT <|GREATER THAN
key name
[ INVALID KEY
do something ]SUBTRACT numeric value ...UNSTRING
FROM numeric variable [ROUNDED] ...
[ ON SIZE ERROR
do something ]SUBTRACT numeric value ... FROM numeric variable
GIVING numeric variable [ROUNDED] ...
[ ON SIZE ERROR
do something ]UNSTRING variableWRITE
DELIMITED BY [ALL] value
[ OR [ALL] value ]
INTO variable...WRITE file-record
[FROM variable]
[ INVALID KEY
do something ]WRITE file-record
AFTER|BEFORE
ADVANCING
PAGE|value LINES