标签:
先学习基础概念
1、COBOL字符:包含:
2、用户定义字符User-defined words:合法的定义:
3、系统名 System-names
4、关键词 Reserved words
ACCEPT ACCESS ACQUIRE ADD ADDRESS ADVANCING AFTER ALL ALPHABET ALPHABETIC ALPHABETIC-LOWER ALPHABETIC-UPPER ALPHANUMERIC ALPHANUMERIC-EDITED ALSO ALTER ALTERNATE AND ANY ARE AREA AREAS ARITHMETIC ASCENDING ASSIGN AT AUTHOR AUTO AUTO-SKIP BACKGROUND-COLOR BACKGROUND-COLOUR B-AND BEEP BEFORE BELL B-EXOR BINARY BIT BITS BLANK B-LESS BLINK BLOCK B-NOT BOOLEAN B-OR BOTTOM BY CALL CANCEL CD CF CH CHARACTER CHARACTERS CLASS CLOCK-UNITS CLOSE COBOL CODE CODE-SET COL COLLATING COLUMN COMMA COMMIT COMMITMENT COMMON COMMUNICATION COMP COMP-3 COMP-4 COMPUTATIONAL COMPUTATIONAL-3 COMPUTATIONAL-4 COMPUTE CONFIGURATION CONNECT CONTAINED CONTAINS CONTENT CONTINUE CONTROL CONTROL-AREA CONTROLS CONVERSION CONVERTING COPY CORR CORRESPONDING COUNT CRT CRT-UNDER CURRENCY CURRENT CURSOR DATA DATE DATE-COMPILED DATE-WRITTEN DAY DAY-OF-WEEK DB DB-ACCESS-CONTROL-KEY DB-DATA-NAME DB-EXCEPTION DB-FORMAT-NAME DB-RECORD-NAME DB-SET-NAME DB-STATUS DBCS DE DEBUG-CONTENTS DEBUG-ITEM DEBUG-LINE DEBUG-NAME DEBUG-SUB-1 DEBUG-SUB-2 DEBUG-SUB-3 DEBUGGING DECIMAL-POINT DECLARATIVES DEFAULT DELETE DELIMITED DELIMITER DEPENDING DESCENDING DESTINATION DETAIL DISABLE DISCONNECT DISPLAY DISPLAY-1 DISPLAY-n DIVIDE DIVISION DOWN DROP DUPLICATE DUPLICATES DYNAMIC EGI EJECT ELSE EMI EMPTY-CHECK ENABLE END END-ACCEPT END-ADD END-CALL END-COMPUTE END-DELETE END-DIVIDE END-EVALUATE END-IF END-MULTIPLY END-OF-PAGE END-PERFORM END-READ END-RECEIVE END-RETURN END-REWRITE END-SEARCH END-START END-STRING END-SUBTRACT END-UNSTRING END-WRITE ENTER ENVIRONMENT EOP EQUAL EQUALS ERASE ERROR ESI EVALUATE EVERY EXCEEDS EXCEPTION EXCLUSIVE EXIT EXOR EXTEND EXTERNAL EXTERNALLY-DESCRIBED-KEY FALSE FD FETCH FILE FILE-CONTROL FILES FILLER FINAL FIND FINISH FIRST FOOTING FOR FOREGROUND-COLOR FOREGROUND-COLOUR FORMAT FREE FROM FULL FUNCTION GENERATE GET GIVING GLOBAL GO GOBACK GREATER GROUP HEADING HIGHLIGHT HIGH-VALUE HIGH-VALUES I-O I-O-CONTROL ID IDENTIFICATION IF IN INDEX INDEXED INDEX-N INDIC INDICATE INDICATOR INDICATORS INITIAL INITIALIZE INITIATE INPUT INPUT-OUTPUT INSPECT INSTALLATION INTO INVALID IS JUST JUSTIFIED KEEP KEY LABEL LAST LD LEADING LEFT LEFT-JUSTIFY LENGTH LENGTH-CHECK LESS LIKE LIMIT LIMITS LINAGE LINAGE-COUNTER LINE LINE-COUNTER LINES LINKAGE LOCALLY LOCK LOW-VALUE LOW-VALUES MEMBER MEMORY MERGE MESSAGE MODE MODIFIED MODIFY MODULES MOVE MULTIPLE MULTIPLY NATIVE NEGATIVE NEXT NO NO-ECHO NONE NOT NULL NULLS NUMBER NUMERIC NUMERIC-EDITED OBJECT-COMPUTER OCCURS OF OFF OMITTED ON ONLY OPEN OPTIONAL OR ORDER ORGANIZATION OTHER OUTPUT OVERFLOW OWNER PACKED-DECIMAL PADDING PAGE PAGE-COUNTER PERFORM PF PH PIC PICTURE PLUS POINTER POSITION POSITIVE PRESENT PRINTING PRIOR PROCEDURE PROCEDURES PROCEED PROCESS PROGRAM PROGRAM-ID PROMPT PROTECTED PURGE QUEUE QUOTE QUOTES RANDOM RD READ READY REALM RECEIVE RECONNECT RECORD RECORD-NAME RECORDS REDEFINES REEL REFERENCE REFERENCE-MONITOR REFERENCES RELATION RELATIVE RELEASE REMAINDER REMOVAL RENAMES REPEATED REPLACE REPLACING REPORT REPORTING REPORTS REQUIRED RERUN RESERVE RESET RETAINING RETRIEVAL RETURN RETURN-CODE REVERSED REVERSE-VIDEO REWIND REWRITE RD RF RH RIGHT RIGHT-JUSTIFY ROLLBACK ROLLING ROUNDED RUN SAME SCREEN SD SEARCH SECTION SECURE SECURITY SEGMENT SEGMENT-LIMIT SELECT SEND SENTENCE SEPARATE SEQUENCE SEQUENTIAL SET SHARED SIGN SIZE SKIP1 SKIP2 SKIP3 SORT SORT-MERGE SORT-RETURN SOURCE SOURCE-COMPUTER SPACE SPACE-FILL SPACES SPECIAL-NAMES STANDARD STANDARD-1 STANDARD-2 START STARTING STATUS STOP STORE STRING SUB-QUEUE-1 SUB-QUEUE-2 SUB-QUEUE-3 SUB-SCHEMA SUBFILE SUBTRACT SUM SUPPRESS SYMBOLIC SYNC SYNCHRONIZED TABLE TALLYING TAPE TENANT TERMINAL TERMINATE TEST TEXT THAN THEN THROUGH THRU TIME TIMES TITLE TO TOP TRAILING TRAILING-SIGN TRANSACTION TRUE TYPE UNDERLINE UNEQUAL UNIT UNSTRING UNTIL UP UPDATE UPON USAGE USAGE-MODE USE USING VALID VALIDATE VALUE VALUES VARYING WAIT WHEN WHEN-COMPILED WITH WITHIN WORDS WORKING-STORAGE WRITE ZERO ZEROES ZERO-FILL ZEROS < < = + * ** - / > > = =
近500个关键字.
5、节和段 Sections and Paragraphs
层次:
? Identification Division
Paragraphs
Entries
Clauses
? Environment Division
Sections
Paragraphs
Entries
Clauses
Phrases
? Data Division
Sections
Entries
Clauses
Phrases
? Procedure Division
Sections
Paragraphs
Sentences
Statements
Phrases
备注:
4个部:
部(Division)一部可包括若干节
节(Section)一节可包含若干段
段(Paragraph)一段可包含若干句子
句子(Sentence)一个句子可包含若干语句
语句(Statement)制定计算机完成一定的操作
子句(Clause)制定完成某一方面的功能
6、Cobol 代码格式
格式演示:
一步步AS400-Cobol 上手自学入门教程01 - 基础概念(原创)
标签:
原文地址:http://www.cnblogs.com/starcrm/p/5763982.html