Space announcement This documentation space provides the same content as before, but the organization of the content has changed. The content is now organized based on logical branches instead of legacy book titles. We hope that the new structure will help you quickly find the content that you need.

Structure keywords of COBOL


The following table describes each COBOL-structure keyword and the verbs that the keyword identifies. All verbs are shown in capital letters. Where keywords to a verb are listed, the keywords are shown in lowercase, and the verbs, capitalized, are enclosed in parentheses.

Keyword

Description and Reference

ALTer

Possible modification of the value of a data name or index:

Everything in the INPUT keyword, plus ADD, by (PERFORM), CALL, COMPUTE, DIVIDE, EXAMINE (OS/VS COBOL only), from (PERFORM, WRITE), INITIALIZE (VS COBOL II only), INSPECT, MOVE, MULTIPLY, SEARCH, SET, STRING, SUBTRACT, TRANSFORM (OS/VS COBOL only), UNSTRING, varying (PERFORM);

EXEC CICS keywords: ADDRESS, ASKTIME, ASSIGN, FORMATTIME, INQUIRE DATA SET, INQUIRE PROGRAM, INQUIRE TERMINAL, INQUIRE TRANSACTION, LINK, XCTL

BRAnch

Transfer of logic control:

Everything in the CONDition keyword, plus ALTER, CALL, CONTINUE, ENTRY, EXIT, GOBACK, GO TO, NEXT SENTENCE, PROCEDURE DIVISION, PERFORM, STOP, INPUT PROCEDURE, OUTPUT PROCEDURE;

EXEC CICS keywords: ABEND, HANDLE ABEND, HANDLE AID, HANDLE CONDITION, LINK, RETURN, XCTL;

EXEC SQL keywords: WHENEVER

CALL

CALL and CANCEL statements, excluding generated calls from EXEC CICS or EXEC DLI

CICS

EXEC CICS statements

CONDition

Conditional logic:

At end (READ, SEARCH, RETURN), at eop/at end-of-page (WRITE), depending on (GO TO), else (IF), EVALUATE (VS COBOL II only), IF, invalid key (DELETE, WRITE, START, READ, REWRITE), otherwise (IF) (OS/VS COBOL only), ON (OS/VS COBOL only), on exception (CALL), on overflow (STRING, UNSTRING, CALL), on size error (ADD, SUBTRACT, MULTIPLY, DIVIDE, COMPUTE), times (PERFORM), until (PERFORM), when (SEARCH)

DLI

EXEC DLI statements or calls to CBLTDLI

IO

Input and output to a program:

ACCEPT, CALL, CLOSE, DELETE, DISPLAY, EXHIBIT (OS/VS COBOL only), MERGE, OPEN, READ, RELEASE, RETURN, REWRITE, SORT, START, WRITE

NOTE: The CALL modules must be specified in JCL015 member of SLXTINST or they will not be highlighted by the FIND IO command.

EXEC CICS keywords: CONVERSE, DELETE, DELETEQ TD, DELETEQ TS, DBR, READ, READNEXT, READPREV, READQ TD, READQ TS, RECEIVE, RESETBR, RETRIEVE, REWRITE, SEND, STARTBR, NCPOINT, UNLOCK, WRITE, WRITEQ TD, WRITEQ TS;

CALL CBLTDLI function code keywords: CHKP, CHNG, CLSE, CMD, DEQ, DLET, FLD, GCMD, GET CHN, CHNP, GHU, GN, GNP, GU, IRST, LOAD, LOG, OPEN POS, PURG, REPL, ROLB, ROLL, SHCD, SNAP, STAT, SYMCHKP, SYNC, TERM, XRST;

EXEC DLI keywords: CHKP, DLET, GU, GN, GNP, ISRT, LOAD, LOG, REPL, ROLL, ROLB, SCHD, STAT, SYMCHKP, TERM, XRST;

EXEC SQL keywords: CLOSE, COMMIT, DECLARE CURSOR, DELETE, FETCH, INSERT, OPEN, ROLLBACK, SELECT, UPDATE

Input or INPut

Receive data into the program:

ACCEPT, READ, RETURN;

EXEC CICS keywords: CONVERSE, READ, READNEXT, READPREV, READQ TD, READQ TS, RECEIVE, RETRIEVE;

EXEC DLI keywords: GU, GN, GNP, STAT;

CALL CBLTDLI function code keywords: CMD, FLD, GCMD, GET, GHN, GHNP, GHU, GN, GNP, GU, POS, STAT;

EXEC SQL keywords: FETCH, SELECT, UPDATE

Output or OUTput

Transmit data out of the program:

DELETE, DISPLAY, EXHIBIT (OS/VS COBOL only), MERGE, RELEASE, REWRITE, SORT, WRITE;

EXEC CICS keywords: CONVERSE, DELETE, DELETEQ TD, DELETEQ TS, REWRITE, SEND, WRITE, WRITEQ TD, WRITEQ TS;

CALL CBLTDLI function code keywords: CMD, DLET, FLD, ISRT, REPL, SNAP;

EXEC DLI keywords: DLET, ISRT, REPL;

EXEC SQL keywords: DELETE, INSERT, UPDATE

PARAgraph

Paragraph or section labels

SQL

Db2 statements or EXEC SQL calls within the procedure division


 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*