标识部的格式:
代码范例:
IDENTIFICATION DIVISION.
PROGRAM-ID. IDSAMPLE.
AUTHOR. PROGRAMMER NAME.
INSTALLATION. COBOL DEVELOPMENT CENTER.
DATE-WRITTEN. 08/27/88.
DATE-COMPILED. 09/01/88 12:57:53.
SECURITY. NON-CONFIDENTIAL.
环境部的格式:
代码范例
ENVIRONMENT DIVISION.
CONFIGURATION SECTION.
SOURCE-COMPUTER. IBM-AS400.
OBJECT-COMPUTER. IBM-AS400.
SPECIAL-NAMES. Cð1 IS TOP-OF-PAGE.
SOURCE-COMPUTER 定义的是需要编译原代码的机器.
SPECIAL-NAMES的范例:
SPECIAL-NAMES. SYSTEM-CONSOLE IS SYSTM
REQUESTOR IS WORK-STATION
C01 IS NEXT-PAGE
LOCAL-DATA IS LOCAL-DATA-AREA
ATTRIBUTE-DATA IS ATTRB-DATA
SYSTEM-SHUTDOWN IS SHUTDOWN-SWITCH
ON STATUS IS SHUTDOWN-PENDING
UPSI-0 IS UPSI-SWITCH-0
ON STATUS IS U0-ON
OFF STATUS IS U0-OFF
UPSI-1 IS UPSI-SWITCH-1
ON STATUS IS U1-ON
OFF STATUS IS U1-OFF
IBM-ASCII IS STANDARD-1
CURRENCY-SIGN IS "Y".