RM COBOL Syntax Summary PDF
RM COBOL Syntax Summary PDF
®
RM/COBOL
Syntax Summary
First Edition
This document provides complete syntax for all RM/COBOL commands, divisions, entries, statements, and other
general formats. Use this pamphlet in conjunction with the RM/COBOL Language Reference Manual and the
RM/COBOL User's Guide.
The RM/COBOL Syntax Summary has been prepared for all implementations of RM/COBOL. Consult the
RM/COBOL User's Guide for all appropriate operating system rules and conventions (such as command line
invocation).
No part of this publication may be reproduced, stored in a retrieval system or transmitted, in any form or by any
means, electronic, mechanical, photocopied, recorded, or otherwise, without prior written permission of Liant
Software Corporation.
The information in this document is subject to change without prior notice. Liant Software Corporation assumes no
responsibility for any errors that may appear in this document. Liant reserves the right to make improvements and/or
changes in the products and programs described in this guide at any time without notice. Companies, names, and data
used in examples herein are fictitious unless otherwise noted.
The software described in this document is furnished to the user under a license for a specific number of uses and
may be copied (with inclusion of the copyright notice) only in accordance with the terms of such license.
Copyright 1985-2005 by Liant Software Corporation. All rights reserved. Printed in U.S.A.
Website http://www.liant.com/
Contents
Compile Command............................................................................................................. 1
Runtime Command............................................................................................................. 3
Debug Commands .............................................................................................................. 4
Source Program General Format ........................................................................................ 6
Identification Division General Format.............................................................................. 6
Environment Division General Format .............................................................................. 7
File Control Entry General Formats .......................................................................... 10
Data Division General Format.......................................................................................... 12
file-description-entry................................................................................................. 13
sort-merge-file-description-entry .............................................................................. 13
record-description-entry ............................................................................................ 14
77-level-description-entry ......................................................................................... 14
data-description-entry................................................................................................ 14
communication-description-entry.............................................................................. 16
screen-description-entry ............................................................................................ 17
Procedure Division General Formats ............................................................................... 21
General Formats for COBOL Statements......................................................................... 22
ACCEPT Statement................................................................................................... 22
ADD Statement ......................................................................................................... 24
ALTER Statement ..................................................................................................... 25
CALL Statement ....................................................................................................... 25
CALL PROGRAM Statement................................................................................... 26
CANCEL Statement.................................................................................................. 26
CLOSE Statement ..................................................................................................... 26
COMPUTE Statement............................................................................................... 27
CONTINUE Statement.............................................................................................. 27
DELETE Statement................................................................................................... 27
DELETE FILE Statement ......................................................................................... 27
DISABLE Statement ................................................................................................. 27
DISPLAY Statement ................................................................................................. 28
DIVIDE Statement .................................................................................................... 29
ENABLE Statement .................................................................................................. 30
ENTER Statement ..................................................................................................... 30
EVALUATE Statement............................................................................................. 31
EXIT Statement......................................................................................................... 32
GOBACK Statement ................................................................................................. 32
GO TO Statement...................................................................................................... 32
IF Statement .............................................................................................................. 33
INITIALIZE Statement ............................................................................................. 33
INSPECT Statement.................................................................................................. 33
MERGE Statement.................................................................................................... 34
MOVE Statement ...................................................................................................... 35
MULTIPLY Statement.............................................................................................. 35
OPEN Statement ....................................................................................................... 36
PERFORM Statement ............................................................................................... 36
PURGE Statement..................................................................................................... 37
READ Statement ....................................................................................................... 37
RECEIVE Statement ................................................................................................. 38
RELEASE Statement ................................................................................................ 38
RETURN Statement.................................................................................................. 38
REWRITE Statement ................................................................................................ 39
SEARCH Statement .................................................................................................. 39
SEND Statement ....................................................................................................... 40
SET Statement........................................................................................................... 40
SORT Statement........................................................................................................ 41
START Statement ..................................................................................................... 42
STOP Statement ........................................................................................................ 42
STRING Statement ................................................................................................... 43
SUBTRACT Statement ............................................................................................. 43
UNLOCK Statement ................................................................................................. 44
UNSTRING Statement.............................................................................................. 44
USE Statement .......................................................................................................... 44
WRITE Statement ..................................................................................................... 45
General Format for END PROGRAM Header ................................................................. 46
General Formats for COPY and REPLACE Statements .................................................. 46
General Formats for Conditions ....................................................................................... 47
Relation Condition .................................................................................................... 47
LIKE Condition (Special Case of a Relation Condition) .......................................... 47
Class Condition ......................................................................................................... 47
Sign Condition........................................................................................................... 48
Condition-Name Condition ....................................................................................... 48
Switch-Status Condition............................................................................................ 48
Negated Condition..................................................................................................... 48
Combined Condition ................................................................................................. 48
Abbreviated Combined Relation Condition .............................................................. 48
General Formats for Qualification.................................................................................... 49
Miscellaneous Formats..................................................................................................... 50
Sentence .................................................................................................................... 50
Statement Sequence................................................................................................... 50
Subscripting............................................................................................................... 50
Reference Modification............................................................................................. 50
Identifier.................................................................................................................... 50
Special Registers ....................................................................................................... 51
Figurative-Constants ................................................................................................. 52
Concatenation Expression ......................................................................................... 52
Constant-Expression.................................................................................................. 52
General Format for Nested Source Programs ................................................................... 53
General Format for nested-source-program..................................................................... 53
General Format for a Sequence of Source Programs........................................................ 54
PICTURE Clause ............................................................................................................. 55
PICTURE Character-Strings ..................................................................................... 55
PICTURE Symbols ................................................................................................... 56
Reserved Words ............................................................................................................... 60
Context-Sensitive Words.................................................................................................. 65
Nonreserved System-Names............................................................................................. 67
Code-Names .............................................................................................................. 67
(Color-Integer) Color-Names .................................................................................... 67
Computer-Names ...................................................................................................... 67
Delimiter-Names ....................................................................................................... 67
Device-Names ........................................................................................................... 67
Feature-Names .......................................................................................................... 68
Label-Names ............................................................................................................. 68
Language-Names....................................................................................................... 68
Low-Volume-I-O-Names .......................................................................................... 68
Rerun-Names............................................................................................................. 68
Switch-Names ........................................................................................................... 68
List of Tables
Table 1: PICTURE Symbol Precedence.......................................................................... 59
Table 2: Context-Sensitive Words................................................................................... 65
Compile Command
The format of the Compile Command is as follows:
Option Description
L[=path] Direct the compiler to produce a listing file and optionally specify
the directory in which to place the listing file.
Option Description
O=path Specify the directory pathname where the object file will be placed.
S Direct the compiler to assume a separate sign when the SIGN clause
is not specified for a DISPLAY usage, signed numeric data item
(that is, for a data item whose character-string within a PICTURE
clause begins with S).
U[={B|D|P}] Direct the compiler to assume an alternative usage for data items
described as COMP or COMPUTATIONAL.
The U Option specified alone or as U=B directs the compiler to
assume BINARY usage for data items described as COMP or
COMPUTATIONAL.
The U=D Option directs the compiler to assume DISPLAY usage
for items described as COMP or COMPUTATIONAL.
The U=P Option directs the compiler to assume PACKED-
DECIMAL usage for items described as COMP or
COMPUTATIONAL.
W=n Specify the amount of memory (in kilobytes) that the compiler
should use for its internal table storage. n can be a decimal number
from 32 to 16384.
Y=n Direct the compiler to output the symbol table and debug line table
to the object program file. n can be 0 to 3.
Z=version Indicate the version of the RM/COBOL runtime you want to use.
version can be 7 through 11.
Runtime Command
The format of the Runtime Command is as follows:
Option Description
A=[delim] [string] [delim] Pass an argument to the main program. The delimiter characters are
optional if string does not contain spaces.
B=n Specify a maximum buffer size for use with the ACCEPT and
DISPLAY statements.
F=<fill-char> Fill read-write memory with fill characters when loading programs.
S=n . . . n Set (or reset) the initial value of switches in the RM/COBOL
program.
Debug Commands
The Debug commands are as follows.
Command Description
A Set breakpoints and resume program execution from the current location.
A [ line [ + intraline ] [ , [ prog-name ] [ , [ count ] ] ] ]
C Clear any breakpoints that have been set with the A or B Command.
C [ line [ + intraline] [ , [ prog-name ] ] ]
L Specify a line on the monitor screen at which command input echoes and
Debug responses are to be displayed.
L [ line-display ]
Command Description
T Monitor the value of a specified data item, and suspend execution whenever a
change in that value occurs. That is, a data trap.
Identifier Format
T name-1 [ { IN | OF } name-2 ] … [ script ] [ refmod ]
[ , { type | { * | & } [ type ] } ] [ # alias ]
Address-Size Format
T [ base : ] address [ + occur-size * occur-num ] …, size ,
[ type ] [ # alias ]
Alias Format
T # alias
Note In the Address-Size formats for the D, M, T, and U commands, base is one of the
following:
• U arg-num, for a formal argument and arg-num is the formal argument number.
• B item-num, for a based linkage item and item-num is the based linkage item number.
• G for the GIVING formal argument.
• X ext-num, for an external data item and ext-num is the external item number.
identification-division
[ environment-division ]
[ data-division ]
[ procedure-division ]
[ nested-source-program ]!
[ end-program-header ]
IDENTIFICATION
ID DIVISION .
program-name-1 COMMON
PROGRAM - ID . IS PROGRAM .
literal-1 INITIAL
[ AUTHOR . [ comment-entry-1 ]! ]
[ INSTALLATION . [ comment-entry-2 ]! ]
[ DATE - WRITTEN . [ comment-entry-3 ]! ]
[ DATE - COMPILED . [ comment-entry-4 ]! ]
[ SECURITY . [ comment-entry-5 ]! ]
[ REMARKS . [ comment-entry-6 ]! ]
ENVIRONMENT DIVISION .
CONFIGURATION SECTION .
SOURCE - COMPUTER . computer-name-1
[ WITH DEBUGGING MODE ].
OBJECT - COMPUTER . computer-name-2
WORDS
MEMORY SIZE integer-1 CHARACTERS
MODULES
[ SEGMENT - LIMIT IS segment-number-1 ] .
SPECIAL - NAMES .
ON STATUS IS condition-name-1
IS mnemonic-name-1
OFF STATUS IS condition-name-2
switch-name-1
ON STATUS IS condition-name-1
OFF STATUS IS condition-name-2 !
feature-name-1 IS mnemonic-name-2
low-volume-I-O-name-1 IS mnemonic-name-3
ALPHABET alphabet-name-1 IS
STANDARD - 1
STANDARD - 2
NATIVE
code-name-1
literal-1 THROUGH literal-2 !
THRU
THROUGH
ALSO literal-3 THRU literal-4 ! !
SYMBOLIC CHARACTER { symbolic-character-1 }! IS
CHARACTERS ARE
{ integer-1 }! ! [ IN alphabet-name-2 ] !
CLASS class-name-1 IS literal-5 THROUGH literal-6 ! !
THRU
CURRENCY SIGN IS literal-7
DECIMAL - POINT IS COMMA
LEADING
NUMERIC SIGN IS TRAILING [ SEPARATE CHARACTER ]
CONSOLE IS CRT
CURSOR IS data-name-1
CRT STATUS IS data-name-2 .
INPUT - OUTPUT SECTION .
FILE - CONTROL .
{ file-control-entry-1 }!
I - O - CONTROL .
file-name-1
RERUN ON
rerun-name-1
REEL
[ END OF ]
UNIT OF file-name-2 !
integer-1 RECORDS
EVERY
integer-2 CLOCK - UNITS
condition-name-1
RECORD
SAME SORT
AREA FOR file-name-3 { file-name-4 }! !
SORT - MERGE
MULTIPLE FILE TAPE CONTAINS
!
.
{ file-name-5 [ POSITION IS integer-3 ] }!
data-name-1
literal-1
DISPLAY
INPUT
ASSIGN TO
OUTPUT data-name-1
INPUT - OUTPUT literal-1
RANDOM
TAPE
device-name-1
integer-1 AREA
RESERVE NO [ ALTERNATE ] AREAS
BINARY
SEQUENTIAL
LINE
[ ORGANIZATION IS ]
RELATIVE
INDEXED
data-name-2
PADDING CHARACTER IS literal-2
STANDARD - 1
RECORD DELIMITER IS delimiter-name-1
SEQUENTIAL
ACCESS MODE IS RANDOM [ RELATIVE KEY IS data-name-3 ]
DYNAMIC
LOCK MODE IS
MANUAL RECORD
WITH LOCK ON [ MULTIPLE ] RECORDS
AUTOMATIC
EXCLUSIVE
[ WITH DUPLICATES ]
data-name-6
ALTERNATE RECORD KEY IS split-key-name-2 = { data-name-7 }!
[ WITH DUPLICATES ] !
SELECT file-name-1
data-name-1
literal-1
ASSIGN TO
SORT
.
SORT - MERGE data-name-1
MERGE literal-1
device-name-1
DATA DIVISION .
FILE SECTION .
file-description-entry-1 { record-description-entry-1 }!
sort-merge-file-description-entry-1 { record-description-entry-2 }! !
WORKING - STORAGE SECTION .
77-level-description-entry-1
record-description-entry-3 !
LINKAGE SECTION .
77-level-description-entry-2
record-description-entry-4 !
COMMUNICATION SECTION .
[ communication-description-entry-1 { record-description-entry-5 }! ]!
SCREEN SECTION .
[ screen-description-entry-1 ]!
file-description-entry
FD file-name-1
[ IS EXTERNAL ]
[ IS GLOBAL ]
RECORDS
BLOCK CONTAINS [ integer-1 TO ] integer-2
CHARACTERS
RECORD IS STANDARD
LABEL
RECORDS ARE OMITTED
LABEL data-name-2
VALUE OF IS !
label-name-1 literal-1
RECORD IS
DATA { data-name-3 }!
RECORDS ARE
LINAGE IS data-name-4 LINES data-name-5
WITH FOOTING AT integer-8
integer-7
data-name-6 data-name-7
LINES AT TOP integer-9 LINES AT BOTTOM integer-10
sort-merge-file-description-entry
SD file-name-1
RECORD IS
DATA RECORDS ARE { data-name-3 }! .
record-description-entry
{ data-description-entry-1 }!
77-level-description-entry
data-description-entry-2
data-description-entry
data-name-1
level-number-1
FILLER
[ REDEFINES data-name-2 ]
[ IS EXTERNAL ]
[ IS GLOBAL ]
PICTURE
PIC IS character-string-1
BINARY [ ( integer-3 ) ]
COMPUTATIONAL
COMP
COMPUTATIONAL - 1
COMP - 1
COMPUTATIONAL - 3
COMP - 3
COMPUTATIONAL - 4 [ ( integer-3 ) ]
[ USAGE IS ] COMP - 4 [ ( integer-3 ) ]
COMPUTATIONAL - 5 [ ( integer-3 ) ]
COMP - 5 [ ( integer-3 ) ]
COMPUTATIO NAL - 6
COMP - 6
DISPLAY
INDEX
PACKED - DECIMAL
POINTER
LEADING
[ SIGN IS ] TRAILING [ SEPARATE CHARACTER ]
OCCURS integer-2 TIMES
[ integer-1 TO ] integer-2 TIMES DEPENDING ON data-name-3
ASCENDING
KEY IS { data-name-4 }! !
DESCENDING
[ INDEXED BY { index-name-1 }! ]
SYNCHRONIZED LEFT
SYNC RIGHT
JUSTIFIED
JUST RIGHT
[ BLANK WHEN ZERO ]
[ VALUE IS literal-1 ] .
66 data-name-1
THROUGH
RENAMES data-name-2 THRU data-name-3 .
88 condition-name-1
THROUGH
literal-1 literal-2
VALUE IS THRU
!
VALUES ARE
relational-operator literal-1
78 constant-name-1
literal-1
VALUE IS .
constant-expression-1
communication-description-entry
Format 1: Input CD
Format 2: Output CD
Format 3: Input-Output CD
screen-description-entry
screen-name-1
level-number-1
FILLER
BACKGROUND IS color-name-1
BACKGROUND - COLOR IS integer-1
FOREGROUND IS color-name-2
FOREGROUND - COLOR IS integer-2
[ [ USAGE IS ] DISPLAY ]
[ SIGN IS ] LEADING
TRAILING
[ SEPARATE CHARACTER ]
AUTO
AUTO - SKIP
[ SECURE ]
[ REQUIRED ]
[ FULL ] .
{ screen-description-entry-1 }!
screen-name-1
level-number-1
FILLER
BELL
BEEP
SCREEN
BLANK
LINE
REMAINDER
[ BLINK ]
EOS
ERASE
EOL
SCREEN
[ NO ] HIGHLIGHT
LOWLIGHT
REVERSE
REVERSED
REVERSE - VIDEO
[ UNDERLINE ]
BACKGROUND IS color-name-1
BACKGROUND - COLOR IS integer-1
FOREGROUND IS color-name-2
FOREGROUND - COLOR IS integer-2
PLUS
NUMBER IS + integer-3
LINE
identifier-1
PLUS
COLUMN NUMBER IS + integer-4
COL
identifier-2
[ [ VALUE IS ] literal-1 ] .
screen-name-1
level-number-1
FILLER
BELL
BEEP
SCREEN
BLANK
LINE
REMAINDER
[ BLINK ]
EOS
ERASE
EOL
SCREEN
[ NO ] HIGHLIGHT
LOWLIGHT
REVERSE
REVERSED
REVERSE - VIDEO
[ UNDERLINE ]
BACKGROUND IS color-name-1
BACKGROUND - COLOR IS integer-1
FOREGROUND IS color-name-2
FOREGROUND - COLOR IS integer-2
PLUS
NUMBER IS + integer-3
LINE
identifier-1
PLUS
COLUMN NUMBER IS + integer-4
COL
identifier-2
identifier-7
FROM
PICTURE literal-1
PIC IS character-string-1
TO identifier-8
USING identifier-9
[ [ USAGE IS ] DISPLAY ]
[ BLANK WHEN ZERO ]
JUSTIFIED
JUST RIGHT
[ SIGN IS ] LEADING
TRAILING
[ SEPARATE CHARACTER ]
AUTO
AUTO - SKIP
[ SECURE ]
[ REQUIRED ]
[ FULL ] .
USING { data-name-1 }!
PROCEDURE DIVISION .
GIVING
RETURNING data-name-2
DECLARATIVES .
[ paragraph-name-1 .
[ sentence-1 ]! ]! }!
END DECLARATIVES .
{ section-name-2 SECTION [ segment-number-2 ].
[ paragraph-name-2 .
[ sentence-2 ] ! ] ! }!
Format 2: Paragraphs
USING { data-name-1 }!
PROCEDURE DIVISION .
GIVING
RETURNING data-name-2
{ paragraph-name-3 .
[ sentence-3 ]! }!
ACCEPT Statement
mnemonic-name-3
ACCEPT identifier-1 FROM [ END - ACCEPT ]
low-volume-I-O-name-1
CENTURY - DATE
CENTURY - DAY
DATE [ YYYYMMDD ]
DATE - AND - TIME
DATE - COMPILED
ACCEPT identifier-2 FROM DAY [ YYYYDDD ] [ END - ACCEPT ]
DAY - AND - TIME
DAY - OF - WEEK
ESCAPE KEY
EXCEPTION STATUS
TIME
AUTO
AUTO - SKIP
BEEP
NO
BELL
BLINK
identifier-4
CONTROL
literal-3
CONVERT
identifier-5
CURSOR
literal-4
ECHO
EOL
ERASE
EOS
HIGH
HIGHLIGHT
LOW
LOWLIGHT
identifier-2
ACCEPT identifier-1 UNIT
literal-1
WITH
SECURE
!
OFF
identifier-6
LINE
literal-5
AT COLUMN
COL identifier-3
POSITION
literal-2
MODE IS BLOCK
CHARACTER IS identifier-10
PROMPT
CHARACTER IS literal-6
REVERSE
REVERSED
REVERSE - VIDEO
identifier-7
SIZE
literal-7
TAB
identifier-8
BEFORE TIME
literal-8
UPDATE
ON EXCEPTION [ identifier-9 ] imperative-statement-1
ESCAPE NEXT SENTENCE
EXCEPTION
NOT ON imperative-statement-2 [ END - ACCEPT ]
ESCAPE
identifier-1
LINE NUMBER integer-1
ACCEPT screen-name-1 AT
COLUMN identifier-2
COL NUMBER integer-2
EXCEPTION
ON ESCAPE imperative-statement-1
EXCEPTION
NOT ON ESCAPE imperative-statement-2
[ END - ACCEPT ]
ADD Statement
Format 1: Add…To
identifier-1
ADD ! TO { identifier-2 [ ROUNDED ] }!
literal-1
Format 2: Add…Giving
identifier-1 identifier-2
ADD ! TO literal-2 !
literal-1
CORRESPONDING
ADD identifier-1 TO identifier-2 [ ROUNDED ]
CORR
ALTER Statement
CALL Statement
identifier-2
[ BY REFERENCE ] OMITTED !
identifier-2
USING BY CONTENT literal-2 ! !
OMITTED
identifier-1
CALL identifier-2
literal-1
literal-2 !
OMITTED
GIVING
RETURNING identifier-3
[ ON OVERFLOW imperative-statement-1 ]
[ END - CALL ]
identifier-2
[ BY REFERENCE ] OMITTED !
identifier-2
USING BY CONTENT literal-2 ! !
OMITTED
identifier-1
CALL
literal-1
identifier-2
literal-2 !
OMITTED
GIVING
RETURNING identifier-3
[ ON EXCEPTION imperative-statement-1 ]
identifier-2
identifier-1 USING
CALL PROGRAM literal-2 !
literal-1 OMITTED
[ ON EXCEPTION imperative-statement-1 ]
[ END - CALL ]
CANCEL Statement
identifier-1
CANCEL !
literal-1
CLOSE Statement
COMPUTE Statement
CONTINUE Statement
CONTINUE
DELETE Statement
DISABLE Statement
INPUT [ TERMINAL ]
I - O TERMINAL identifier-1
DISABLE cd-name-1 WITH KEY literal-1
OUTPUT
TERMINAL
DISPLAY Statement
identifier-1 mnemonic-name-3
DISPLAY ! UPON low-volume-I-O-name-1
literal-1
[ WITH NO ADVANCING ]
BEEP
BELL
BLINK
identifier-4
CONTROL
literal-4
CONVERT
EOL
ERASE
EOS
HIGH
HIGHLIGHT
LOW
identifier-2
DISPLAY
identifier-1
UNIT
literal-2
WITH
LOWLIGHT
!
literal-1
identifier-5
LINE
literal-5
AT COLUMN
COL identifier-3
POSITION
literal-3
MODE IS BLOCK
REVERSE
REVERSED
REVERSE - VIDEO
identifier-6
SIZE
literal-6
identifier-1
LINE NUMBER integer-1
DISPLAY screen-name-1 AT !
COLUMN identifier-2
COL NUMBER integer-2
DIVIDE Statement
Format 1: Divide…Into
identifier-1
DIVIDE INTO { identifier-2 [ ROUNDED ] }!
literal-1
Format 2: Divide…Into…Giving
identifier-1 identifier-2
DIVIDE INTO literal-2
literal-1
Format 3: Divide…By…Giving
identifier-2 identifier-1
DIVIDE BY literal-1
literal-2
Format 4: Divide…Into…Giving…Remainder
identifier-1 identifier-2
DIVIDE INTO literal-2
literal-1
Format 5: Divide…By…Giving…Remainder
identifier-2 identifier-1
DIVIDE BY literal-1
literal-2
ENABLE Statement
INPUT [ TERMINAL ]
identifier-1
cd-name-1 WITH KEY
I - O TERMINAL
ENABLE
OUTPUT literal-1
TERMINAL
ENTER Statement
EVALUATE Statement
identifier-1 identifier-2
literal-1 literal-2
EVALUATE expression-1 ALSO expression-2 !
TRUE TRUE
FALSE FALSE
ANY
condition-1
TRUE
WHEN FALSE
identifier-3 identifier-4
[ NOT ] literal-3
THROUGH
THRU literal-4
arithmetic-expression-1 arithmetic-expression-2
ANY
condition-2
TRUE
ALSO ! !
FALSE
identifier-5 identifier-6
[ NOT ] literal-5
THROUGH
THRU literal-6
arithmetic-expression-3 arithmetic-expression-4
imperative-statement-1 !
EXIT Statement
EXIT
EXIT PROGRAM
PARAGRAPH
EXIT
SECTION
GOBACK Statement
GOBACK
GO TO Statement
Format 1: Go To (Alterable)
GO TO [ procedure-name-1 ]
Format 2: Go To (Non-Alterable)
GO TO procedure-name-1
Format 3: Go To…Depending On
IF Statement
statement-1
IF condition-1 THEN
NEXT SENTENCE
statement-2
ELSE NEXT SENTENCE
[ END - IF ]
INITIALIZE Statement
identifier-2
THEN REPLACING category-name DATA BY literal-1 !
[ THEN TO DEFAULT ]
ALPHABETIC
ALPHANUMERIC
ALPHANUMERIC - EDITED
DATA - POINTER
NUMERIC
NUMERIC - EDITED
INSPECT Statement
Format 1: Inspect…Tallying
BEFORE identifier-4
CHARACTERS
AFTER
INITIAL !
literal-2
identifier-2 FOR ! !
ALL identifier-3 BEFORE identifier-4
LEADING literal-1 AFTER INITIAL literal-2 !!
Format 2: Inspect…Replacing
Format 3: Inspect…Tallying…Replacing
BEFORE identifier-4
CHARACTERS INITIAL literal-2 !
AFTER
identifier-2 FOR ! !
identifier-3 identifier-4
ALL BEFORE
LEADING literal-1 AFTER INITIAL literal-2 ! !
REPLACING
Format 4: Inspect…Converting
MERGE Statement
ASCENDING
MERGE file-name-1 ON KEY { data-name-1 }! !
DESCENDING
MOVE Statement
Format 1: Move…To
identifier-1
MOVE TO { identifier-2 }!
literal-1
CORRESPONDING
MOVE identifier-1 TO { identifier-2 }!
CORR
MULTIPLY Statement
Format 1: Multiply…By
identifier-1
MULTIPLY BY { identifier-2 [ ROUNDED ] }!
literal-1
Format 2: Multiply…Giving
identifier-1 identifier-2
MULTIPLY BY literal-2
literal-1
OPEN Statement
OPEN [ EXCLUSIVE ]
REVERSED
INPUT file-name-1 [ WITH LOCK ] WITH NO REWIND !
OUTPUT { file-name-2 [ WITH LOCK ] [ WITH NO REWIND ] }!
!
I - O { file-name-3 [ WITH LOCK ] }!
EXTEND { file-name-4 [ WITH LOCK ] }!
PERFORM Statement
THROUGH
PERFORM procedure-name-1 procedure-name-2
THRU
Format 2: Perform…Times
THROUGH
PERFORM procedure-name-1 procedure-name-2
THRU
identifier-1
integer-1 TIMES
Format 3: Perform…Until
THROUGH
PERFORM procedure-name-1 procedure-name-2
THRU
BEFORE
WITH TEST AFTER UNTIL condition-1
Format 4: Perform…Varying
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 literal-2
index-name-1 literal-1
UNTIL condition-1
identifier-6
identifier-5 identifier-7
AFTER index-name-3 FROM index-name-4 BY literal-4
literal-3
UNTIL condition-2 !
PURGE Statement
PURGE cd-name-1
READ Statement
[ AT END imperative-statement-1 ]
WITH [ NO ] LOCK
READ file-name-1 RECORD
INTO identifier-1
data-name-1
KEY IS split-key-name-1
RECEIVE Statement
MESSAGE
RECEIVE cd-name-1 INTO identifier-1
SEGMENT
[ NO DATA imperative-statement-1 ]
RELEASE Statement
identifier-1
RELEASE record-name-1 FROM
literal-1
RETURN Statement
[ AT END imperative-statement-1 ]
REWRITE Statement
identifier-1
REWRITE record-name-1 FROM
literal-1
SEARCH Statement
identifier-2
SEARCH identifier-1 VARYING
index-name-1
[ AT END imperative-statement-1 ]
imperative-statement-2
WHEN condition-1 NEXT SENTENCE !
[ END - SEARCH ]
[ AT END imperative-statement-1 ]
identifier-3
data-name-1 IS EQUAL TO literal-1
WHEN =
IS arithmetic-expression-1
condition-name-1
identifier-4
data-name-2 IS EQUAL TO literal-2
AND !
IS = arithmetic-expression-2
condition-name-2
imperative-statement-2
NEXT SENTENCE
[ END - SEARCH ]
SEND Statement
identifier-1
SEND cd-name-1 FROM
literal-1
identifier-2
identifier-1 ESI
SEND cd-name-1 FROM WITH
literal-1
EMI
EGI
identifier-3 LINE
integer-1 LINES
BEFORE
AFTER ADVANCING
mnemonic-name-2
PAGE
[ REPLACING LINE ]
SET Statement
index-name-2
index-name-1
SET ! TO identifier-2 !
identifier-1
integer-1
UP identifier-3
SET { index-name-3 } ! BY integer-2 !
DOWN
ON
SET { mnemonic-name-1 } ! TO !
OFF
TRUE
SET { condition-name-1 } ! TO !
FALSE
IN
IN ADDRESS OF identifier-5
ADDRESS data-name-1
SET OF ! TO identifier-6 !
identifier-4 NULL
NULLS
identifier-7
IN
ADDRESS data-name-1 UP
SET OF ! DOWN BY integer-3 !
identifier-4 IN
LENGTH OF identifier-8
SORT Statement
ASCENDING
SORT file-name-1 ON KEY { data-name-1 }! !
DESCENDING
THROUGH
INPUT PROCEDURE IS procedure-name-1 THRU procedure-name-2
USING { file-name-2 }!
THROUGH
OUTPUT PROCEDURE IS procedure-name-3 procedure-name-4
THRU
GIVING { file-name-3 }!
START Statement
identifier-1
WITH SIZE
integer-1
[ END - START ]
STOP Statement
identifier-1
RUN
integer-1
STOP
identifier-2
literal-1
STRING Statement
identifier-2
identifier-1
STRING ! DELIMITED BY literal-2 !
literal-1 SIZE
INTO identifier-3
[ END - STRING ]
SUBTRACT Statement
Format 1: Subtract…From
identifier-1
SUBTRACT ! FROM { identifier-3 [ ROUNDED ] }!
literal-1
Format 2: Subtract…Giving
identifier-1 identifier-2
SUBTRACT ! FROM literal-2
literal-1
CORRESPONDING
SUBTRACT identifier-1 FROM identifier-2 [ ROUNDED ]
CORR
UNLOCK Statement
RECORD
UNLOCK file-name-1
RECORDS
UNSTRING Statement
UNSTRING identifier-1
identifier-2 identifier-3
DELIMITED BY [ ALL ] literal-1 OR [ ALL ] literal-2 !
USE Statement
EXCEPTION
USE [ GLOBAL ] AFTER STANDARD
ERROR
{ file-name-1 }!
INPUT
PROCEDURE ON OUTPUT
I-O
EXTEND
WRITE Statement
identifier-1
WRITE record-name-1 FROM
literal-1
identifier-2 LINE
integer-1 LINES
BEFORE identifier-3
AFTER ADVANCING TO LINE integer-2 [ ON NEXT PAGE ]
mnemonic-name-2
PAGE
END - OF - PAGE
AT EOP imperative-statement-1
END - OF - PAGE
NOT AT EOP imperative-statement-2
[ END - WRITE ]
identifier-1
WRITE record-name-1 FROM
literal-1
program-name-1
END PROGRAM .
literal-1
text-name-1 IN library-name-1
COPY [ SUPPRESS PRINTING ]
literal-1 OF literal-2
= = pseudo-text-1 = = = = pseudo-text-2 = =
identifier-1 identifier-2
REPLACING BY !
literal-3 literal-4
word-1 word-2
REPLACE OFF
Relation Condition
identifier-1 identifier-2
literal-1 literal-2
arithmetic-expression-1 relational-operator arithmetic-expression-2
index-name-1 index-name-2
RIGHT
TRIMMED
identifier-1 LEFT identifier-2
IS [ NOT ] LIKE
literal-1 CASE - INSENSITIVE literal-2
CASE - SENSITIVE
Class Condition
NUMERIC
ALPHABETIC
identifier-1 IS [ NOT ] ALPHABETIC - LOWER
ALPHABETIC - UPPER
class-name-1
Sign Condition
POSITIVE
arithmetic-expression-1 IS [ NOT ] NEGATIVE
ZERO
Condition-Name Condition
condition-name-1
Switch-Status Condition
condition-name-2
Negated Condition
NOT condition-1
Combined Condition
AND
condition-2 condition-3 !
OR
AND
relation-condition-1 [ NOT ] [ relational-operator ] object-1 !
OR
IN IN file-name-1
OF data-name-2 ! OF cd-name-1
data-name-1
condition-name-1
IN file-name-1
OF cd-name-1
IN
LINAGE - COUNTER file-name-2
OF
IN
screen-name-1 screen-name-2 !
OF
IN
split-key-name-1 file-name-3
OF
IN
paragraph-name-1 section-name-1
OF
IN
text-name-1 library-name-1
OF
Miscellaneous Formats
Sentence
statement-sequence-1 .
Statement Sequence
imperative-statement-2
{ imperative-statement-1 THEN }!
conditional-statement-1
Subscripting
integer-1
data-name-1
condition-name-1 data-name-2 + integer-2
( ! )
index-name-1 −
Reference Modification
Identifier
IN IN file-name-1
data-name-1 data-name-2 ! OF cd-name-1
OF
Special Registers
IN
ADDRESS identifier-1
OF
IN
COUNT data-name-1
OF
IN
COUNT - MAX data-name-1
OF
IN
COUNT - MIN data-name-1
OF
IN identifier-1
LENGTH
OF literal-1
IN
LINAGE - COUNTER file-name-1
OF
PROGRAM - ID
RETURN - CODE
WHEN - COMPILED
Figurative-Constants
[ ALL ] NULL
[ ALL ] NULLS
[ ALL ] QUOTE
[ ALL ] QUOTES
[ ALL ] SPACE
[ ALL ] SPACES
[ ALL ] ZERO
[ ALL ] ZEROES
[ ALL ] ZEROS
ALL literal-1
[ ALL ] symbolic-character-1
Concatenation Expression
Constant-Expression
integer-1 integer-2
NEXT NEXT
+
LENGTH −
data-name-4
LENGTH
data-name-5
OF literal-4 * OF
SIZE SIZE literal-5
[ NOT ]
/
** [ NOT
]
!
START OF data-name-6 START OF data-name-7
AND
OR
DATE - COMPILED EXCLUSIVE OR DATE - COMPILED
( constant-expression-2 ) ( constant-expression-3 )
IDENTIFICATION
ID DIVISION .
program-name-1
PROGRAM - ID . [ IS INITIAL PROGRAM ].
literal-1
[ nested-source-program-1 ]!
program-name-1
END PROGRAM
literal-1 .
IDENTIFICATION
ID DIVISION .
program-name-2 COMMON
PROGRAM - ID . IS INITIAL PROGRAM .
literal-2
[ nested-source-program-2 ]!
program-name-2
END PROGRAM
literal-2 .
IDENTIFICATION
ID DIVISION .
program-name-3
PROGRAM - ID . [ IS INITIAL PROGRAM ].
literal-3
IDENTIFICATION
ID DIVISION .
program-name-4
PROGRAM - ID . [ IS INITIAL PROGRAM ].
literal-4
program-name-4
END PROGRAM literal-4
.
PICTURE Clause
The PICTURE clause describes a data item with a character-string composed of symbols.
PICTURE Character-Strings
The five categories of data that can be described with a PICTURE clause 1 are defined as
follows:
1. Alphabetic. Its PICTURE character-string can contain only the symbol A. The contents
of an alphabetic data item when represented in standard data format must be one or more
alphabetic characters (“a” through “z”, “A” through “Z”, and space).
2. Alphanumeric. Its PICTURE character-string is restricted to certain combinations of the
symbols A, X and 9, and the item is treated as if the character-string contained all
symbols X. The PICTURE character-string must contain at least one symbol X or a
combination of the symbols A and 9. A PICTURE character-string that contains all
symbols A or all symbols 9 does not define an alphanumeric data item, since such
character-strings define an alphabetic or numeric data item, respectively. The contents of
an alphanumeric data item when represented in standard data format must be one or more
characters in the character set of the computer.
3. Alphanumeric edited. Its PICTURE character-string is restricted to certain
combinations of the following symbols: A, X, 9, B, 0, and slash (/). The PICTURE
character-string must contain at least one symbol A or X and at least one symbol B, 0, or
slash (/). The contents of an alphanumeric edited data item when represented in standard
data format must be two or more characters in the character set of the computer.
4. Numeric. Its PICTURE character-string can contain only the symbols 9, P, S, and V. Its
PICTURE character-string must contain at least one symbol 9 and not more than thirty
symbols 9. Each symbol 9 specifies a digit position. If unsigned, the contents of a
numeric data item when represented in standard data format must be one or more numeric
characters. If signed, a numeric data item may also contain a “+”, “–”, or other
representation of an operational sign. The actual in-memory contents of a numeric data
item are not standard data format when the usage is other than DISPLAY as specified by
a USAGE clause applicable to the data description entry or when the data item is signed
and the SEPARATE CHARACTER phrase is not specified in a SIGN clause applicable
to the data description entry.
5. Numeric edited. Its PICTURE character-string is restricted to certain combinations of
the following symbols: B, slash (/), P, V, Z, 0, 9, comma (,), period (.), asterisk (*),
minus (–), plus (+), CR, DB, and the currency symbol (the symbol $ or the symbol
specified in the CURRENCY SIGN clause of the SPECIAL-NAMES paragraph). The
allowable combinations are determined from the order of precedence of symbols (see
Table 1 on page 59) and the editing rules. The number of digit positions that can be
represented in the PICTURE character-string must range from one to thirty, inclusive.
The character-string must contain at least one symbol 0, B, slash, Z, asterisk, plus, minus,
comma, period, CR, DB, or the currency symbol. The contents of each of the character
positions in a numeric edited data item must be consistent with the corresponding
PICTURE symbol.
1
The additional data categories, index data and data pointer, also exist but do not use a PICTURE clause in their data description
entry. An index data item is described with the USAGE IS INDEX clause. A data pointer data item is described with the
USAGE IS POINTER clause.
PICTURE Symbols
The functions of the symbols used in a PICTURE character-string to describe an elementary
data item are as follows:
A Each symbol A in the character-string represents a character position that can contain
only an alphabetic character (“a” through “z”, “A” through “Z”, and space). Each
symbol A is counted in the size of the data item described by the PICTURE
character-string.
B Each symbol B in the character-string represents a character position into which the
character space will be inserted when the data item is the receiving item of an
elementary MOVE statement. Each symbol B is counted in the size of the data item
described by the PICTURE character-string.
S The symbol S is used in the character-string to indicate the presence, but neither the
representation nor, necessarily, the position of an operational sign. The symbol S
must be written as the leftmost character in the PICTURE character-string. The
symbol S is not counted in determining the size (in terms of standard data format
characters) of the data item described by the PICTURE character-string unless the
entry contains or is subject to a SIGN clause that specifies the SEPARATE
CHARACTER phrase. The symbol S in the PICTURE character-string and the
BLANK WHEN ZERO clause may not occur in the same data description entry.
0 Each symbol 0 in the character-string represents a character position into which the
character zero (“0”) will be inserted when the data item is the receiving item of an
elementary MOVE statement and removed when a numeric edited data item is the
sending item in an elementary MOVE statement with a numeric or numeric edited
receiving data item. Each symbol 0 is counted in the size of the data item described
by the PICTURE character-string. The symbol 0 does not represent a digit position
in a numeric edited data item.
/ Each symbol slash (/) in the character-string represents a character position into
which a character slash (“/”) will be inserted when the data item is the receiving item
of an elementary MOVE statement. Each symbol slash (/) is counted in the size of
the data item described by the PICTURE character-string.
, Each symbol comma (,) in the character-string represents a character position into
which a character comma (“,”) will be inserted when the data item is the receiving
item of an elementary MOVE statement. Each symbol comma (,) is counted in the
size of the data item described by the PICTURE character-string.
. When the symbol period (.) appears in the character-string, it is an editing symbol
that represents the decimal point for alignment purposes and, in addition, represents a
character position into which the character period (“.”) will be inserted. The symbol
period is counted in the size of the data item described by the PICTURE character-
string. The symbols P and V cannot occur with a symbol period (.) in the same
PICTURE character-string.
Note For a given program the functions of the period and comma are exchanged if the
DECIMAL-POINT IS COMMA clause is stated in the SPECIAL-NAMES paragraph. In
this exchange, the rules for the period apply to the comma and the rules for the comma
apply to the period wherever they appear in a PICTURE character-string.
+, –, CR, DB
These symbols are used as editing sign control symbols. When used, they represent
the character position into which the editing sign control symbol will be placed. The
symbols are mutually exclusive in any one PICTURE character-string and each
character used in the symbol is counted in determining the size of the data item
described by the PICTURE character-string. If the symbols plus or minus occur
more than once (a floating sign control symbol), then one less than the total number
of these symbols is counted in determining the maximum number (30) of digit
positions allowed in a numeric edited data item. If a floating symbol plus or minus is
used to the right of the decimal point in a character-string, then all digit positions in
that character-string must be described with the symbol plus or minus, respectively.
If a floating plus or minus symbol string represents all the digit-positions in the
character-string, then the described data item is blank when zero, even if the BLANK
WHEN ZERO clause is not specified.
B X X X X X X X X X X X X X X X X X
0 X X X X X X X X X X X X X X X X X
/ X X X X X X X X X X X X X X X X X
, X X X X X X X X X X X X X X X X
Insertion Symbols
Non-floating
. X X X X X X X X X X
+
−
+ X X X X X X X X X X X X X X
−
CR X X X X X X X X X X X X X X
DB
CS X
z X X X X X X X
*
z X X X X X X X X X X X
*
Insertion Symbols
Floating
+ X X X X X X
−
+ X X X X X X X X X
−
CS X X X X X X
CS X X X X X X X X X
9 X X X X X X X X X X X X X X X
A X X X X X
X
Other Symbols
V X X X X X X X X X X X X
P X X X X X X X X X X X X
P X X X X X
Reserved Words
The DERESERVE keyword of the COMPILER-OPTIONS configuration record, which is
described in Chapter 10: Configuration of the RM/COBOL User’s Guide, can be used to
make a reserved word a user-defined word whenever it occurs in the source program, but then
the language feature provided by the construct in which the word appears is not available for
programs compiled with that particular configuration setting.
A C
ACCEPT CALL
ACCESS CANCEL
ADD CD 2
ADDRESS 2 CENTURY-DATE 2
ADVANCING CENTURY-DAY 2
AFTER CF 2
ALL CH 2
ALPHABET 2 CHARACTER
ALPHABETIC CHARACTERS
ALPHABETIC-LOWER 2 CLASS 2
ALPHABETIC-UPPER 2 CLOCK-UNITS 2
ALPHANUMERIC 2 CLOSE
ALPHANUMERIC-EDITED 2 COBOL 2
ALSO 2 CODE 2
ALTER CODE-SET
ALTERNATE COL 2
AND COLLATING
ANY 2 COLUMN 2
ARE COMMA
AREA COMMON 2
AREAS COMMUNICATION 2
ASCENDING 2 COMP
ASSIGN COMP-1
AT COMP-3
AUTHOR COMP-4 2
COMP-5 2
B COMP-6
BEEP COMPUTATIONAL
BEFORE COMPUTATIONAL-1
BELL 2 COMPUTATIONAL-3
BINARY COMPUTATIONAL-4 2
BLANK COMPUTATIONAL-5 2
BLINK COMPUTATIONAL-6
BLOCK COMPUTE
BOTTOM 2 CONFIGURATION
BY CONTAINS
CONTENT 2
2
This word is not considered reserved if the RM/COBOL (74) 2.0 compatibility option is present in the Compile Command
(see the RM/COBOL User's Guide for details on this option). In such cases, this word is treated as a user-defined word
whenever it occurs in the source program.
CONTINUE 2 E
CONTROL 2 ECHO
CONTROLS 2 EGI 2
CONVERT ELSE
CONVERTING 2 EMI 2
COPY ENABLE 2
CORR END
CORRESPONDING END-ACCEPT 2
COUNT 2 END-ADD 2
COUNT-MAX 2 END-CALL 2
COUNT-MIN 2 END-COMPUTE 2
CURRENCY END-DELETE 2
CURSOR 2 END-DIVIDE 2
END-EVALUATE 2
D END-IF 2
DATA END-MULTIPLY 2
DATA-POINTER 2 END-OF-PAGE 2
DATE END-PERFORM 2
DATE-AND-TIME 2 END-READ 2
DATE-COMPILED 2 END-RECEIVE 2
DATE-WRITTEN END-RETURN 2
DAY END-REWRITE 2
DAY-AND-TIME 2 END-SEARCH 2
DAY-OF-WEEK 2 END-START 2
DE 2 END-STRING 2
DEBUG-CONTENTS 2 END-SUBTRACT 2
DEBUG-ITEM 2 END-UNSTRING 2
DEBUG-LINE 2 END-WRITE 2
DEBUG-NAME 2 ENTER 2
DEBUG-SUB-1 2 ENVIRONMENT
DEBUG-SUB-2 2 EOP 2
DEBUG-SUB-3 2 EQUAL
DEBUGGING 2 ERASE
DECIMAL-POINT ERROR
DECLARATIVES ESCAPE 2
DEFAULT 2 ESI 2
DELETE EVALUATE 2
DELIMITED 2 EVERY 2
DELIMITER 2 EXCEPTION
DEPENDING EXCLUSIVE 2
DESCENDING 2 EXIT
DESTINATION 2 EXTEND
DETAIL 2 EXTERNAL 2
DISABLE 2
DISPLAY F
DIVIDE FALSE 2
DIVISION FD
DOWN FILE
DUPLICATES FILE-CONTROL
DYNAMIC FILLER
2
This word is not considered reserved if the RM/COBOL (74) 2.0 compatibility option is present in the Compile Command
(see the RM/COBOL User's Guide for details on this option). In such cases, this word is treated as a user-defined word
whenever it occurs in the source program.
FINAL 2 K
FIRST KEY
FIXED 2
FOOTING 2 L
FOR LABEL
FROM LAST 2
FUNCTION 2 LEADING
LEFT
G LENGTH 2
GENERATE 2 LESS
GIVING LIKE 2
GLOBAL 2 LIMIT 2
GO LIMITS 2
GOBACK 2 LINAGE 2
GREATER LINAGE-COUNTER 2
GROUP 2 LINE
LINE-COUNTER 2
H LINES
HEADING 2 LINKAGE
HIGH LOCK
HIGH-VALUE LOW
HIGH-VALUES LOWLIGHT 2
HIGHLIGHT LOW-VALUE
LOW-VALUES
I
I-O M
I-O-CONTROL MEMORY
ID 2 MERGE 2
IDENTIFICATION MESSAGE 2
IF MODE
IN MODULES
INDEX MOVE
INDEXED MULTIPLY
INDICATE 2
INITIAL N
INITIALIZE 2 NATIVE
INITIATE 2 NEGATIVE 2
INPUT NEXT
INPUT-OUTPUT NO
INSPECT NOT
INSTALLATION NULL 2
INTO NULLS 2
INVALID NUMBER 2
IS NUMERIC
NUMERIC-EDITED 2
J
JUST
JUSTIFIED
2
This word is not considered reserved if the RM/COBOL (74) 2.0 compatibility option is present in the Compile Command
(see the RM/COBOL User's Guide for details on this option). In such cases, this word is treated as a user-defined word
whenever it occurs in the source program.
O RECORDING 2
OBJECT-COMPUTER RECORDS
OCCURS REDEFINES
OF REEL
OFF REFERENCE 2
OMITTED REFERENCES 2
ON RELATIVE
OPEN RELEASE 2
OPTIONAL 2 REMAINDER
OR REMARKS 2
ORDER 2 REMOVAL 2
ORGANIZATION RENAMES
OTHER 2 REPLACE 2
OUTPUT REPLACING
OVERFLOW REPORT 2
REPORTING 2
P REPORTS 2
PACKED-DECIMAL 2 RERUN 2
PADDING 2 RESERVE
PAGE RESET 2
PAGE-COUNTER 2 RETURN 2
PERFORM RETURN-CODE 2
PF 2 RETURNING 2
PH 2 REVERSE
PIC REVERSE-VIDEO 2
PICTURE REVERSED 2
PLUS 2 REWIND
POINTER 2 REWRITE
POSITION RF 2
POSITIVE 2 RH 2
PRINTING 2 RIGHT
PROCEDURE ROUNDED
PROCEDURES 2 RUN
PROCEED
PROGRAM S
PROGRAM-ID SAME
PROMPT SCREEN 2
PURGE 2 SD 2
SEARCH 2
Q SECTION
QUEUE 2 SECURE 2
QUOTE SECURITY
QUOTES SEGMENT 2
SEGMENT-LIMIT 2
R SELECT
RANDOM SEND 2
RD 2 SENTENCE
READ SEPARATE
RECEIVE 2 SEQUENCE
RECORD SEQUENTIAL
2
This word is not considered reserved if the RM/COBOL (74) 2.0 compatibility option is present in the Compile Command
(see the RM/COBOL User's Guide for details on this option). In such cases, this word is treated as a user-defined word
whenever it occurs in the source program.
SET THRU
SIGN TIME
SIZE TIMES
SORT 2 TO
SORT-MERGE 2 TOP 2
SOURCE 2 TRAILING
SOURCE-COMPUTER TRUE 2
SPACE TYPE 2
SPACES
SPECIAL-NAMES U
STANDARD UNIT
STANDARD-1 UNLOCK
STANDARD-2 2 UNSTRING 2
START UNTIL
STATUS UP
STOP UPDATE
STRING 2 UPON 2
SUB-QUEUE-1 2 USAGE
SUB-QUEUE-2 2 USE
SUB-QUEUE-3 2 USING
SUBTRACT
SUM 2 V
SUPPRESS 2 VALUE
SYMBOLIC 2 VALUES
SYNC VARIABLE 2
SYNCHRONIZED VARYING
T W
TAB WHEN
TABLE 2 WHEN-COMPILED 2
TALLYING WITH
TAPE 2 WORDS
TERMINAL 2 WORKING-STORAGE
TERMINATE 2 WRITE
TEST 2
TEXT 2 Z
THAN ZERO
THEN 2 ZEROES
THROUGH ZEROS
2
This word is not considered reserved if the RM/COBOL (74) 2.0 compatibility option is present in the Compile Command
(see the RM/COBOL User's Guide for details on this option). In such cases, this word is treated as a user-defined word
whenever it occurs in the source program.
Context-Sensitive Words
The words listed in Table 2 are context-sensitive words and are reserved in the specified
language construct or context. If a context-sensitive word is used where the context-sensitive
word is permitted in the general format, the word is treated as a keyword; otherwise, it is
treated as a user-defined word.
Nonreserved System-Names
Code-Names
EBCDIC
(Color-Integer) Color-Names
(0) BLACK
(1) BLUE
(2) GREEN
(3) CYAN
(4) RED
(5) MAGENTA
(6) BROWN
(7) WHITE
Computer-Names
user-defined-word-1
Delimiter-Names
BINARY-SEQUENTIAL
LINE-SEQUENTIAL
Device-Names
CARD-PUNCH
CARD-READER
CASSETTE
CONSOLE
DISC
DISK
KEYBOARD
LISTING
MAGNETIC-TAPE
PRINT
PRINTER
PRINTER-1
SORT-WORK
Feature-Names
C01
C02
C03
C04
C05
C06
C07
C08
C09
C10
C11
C12
Label-Names
FILE-ID
user-defined-word-2
Language-Names
user-defined-word-3
Low-Volume-I-O-Names
CONSOLE
SYSIN
SYSOUT
Rerun-Names
user-defined-word-4
Switch-Names
SWITCH-1 UPSI-0
SWITCH-2 UPSI-1
SWITCH-3 UPSI-2
SWITCH-4 UPSI-3
SWITCH-5 UPSI-4
SWITCH-6 UPSI-5
SWITCH-7 UPSI-6
SWITCH-8 UPSI-7