1. Trang chủ
  2. » Công Nghệ Thông Tin

COBOL language reference

649 745 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 649
Dung lượng 2,33 MB

Nội dung

IBM COBOL for MVS & VM IBM COBOL Set for AIX IBM VisualAge COBOL IBM Language Reference SC26-4769-04 IBM COBOL for MVS & VM IBM COBOL Set for AIX IBM VisualAge COBOL IBM Language Reference SC26-4769-04 Note! Before using this information and the product it supports, be sure to read the general infor- mation under “Notices” on page x. Fifth Edition (November 1998, softcopy only) This edition applies to: IBM COBOL for MVS & VM Version 1 Release 2 Modification 2 (Program Number 5688-197) IBM COBOL Set for AIX Release 1 (Program Number 5765-548) IBM VisualAge COBOL Version 2.2 (Program Number 5639-B92) and to all subsequent releases and modifications until otherwise indicated in new editions. This edition also applies to: IBM COBOL for OS/390 & VM Version 2 Release 1 Modification 1 (Program Number 5648-A25) When using this edition for IBM COBOL for OS/390 & VM, treat references to MVS as if they were references to OS/390. Order publications through your IBM representative or the IBM branch office serving your locality. Publications are not stocked at the address given below. Editions marked “softcopy only” cannot be ordered as printed publications. For information about obtaining these edi- tions, see “Softcopy Publications for IBM COBOL” on page 576. A form for reader's comments appears at the back of this publication. If the form has been removed, address your comments to: IBM Corporation, HHX/H3 P.O. Box 49023 San Jose, CA 95161-9023 U.S.A. When you send information to IBM, you grant IBM a non-exclusive right to use or distribute the information in any way it believes appropriate without incurring any obligation to you.  Copyright International Business Machines Corporation 1991, 1998. All rights reserved. Note to U.S. Government Users — Documentation related to restricted rights — Use, duplication or disclosure is subject to restrictions set forth in GSA ADP Schedule Contract with IBM Corp. Contents Notices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . x Programming Interface Information x Trademarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi About This Book xii IBM Extensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xii Obsolete Language Elements xii How to Read the Syntax Diagrams xiii DBCS Notation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv Acknowledgment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvi Summary of Changes xvii | Fifth Edition (November 1998, Softcopy Only) xvii Fourth Edition (April 1998) xvii Third Edition (July 1996, Softcopy Only) xviii Second Edition (October 1995) xviii Extensions for Object-Oriented COBOL (MVS, AIX, and OS/2 Only) xviii Extensions for Interoperability (MVS, VM, AIX, and OS/2) xix Support for COBOL on AIX and OS/2 xix Part 1. COBOL Language Structure 1 Characters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Character-Strings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Figurative Constants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Special Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 Literals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 Separators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 Sections and Paragraphs 30 Statements and Clauses 30 Reference Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 Sequence Number Area 32 Indicator Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 Area A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 Area B . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 Area A or Area B 37 Scope of Names 39 Types of Names 39 External and Internal Resources 42 Resolution of Names 43  Copyright IBM Corp. 1991, 1998 iii Millennium Language Extensions and Date Fields Millennium Language Extensions Syntax Terms and Concepts COBOL Class Definition Structure COBOL Method Definition Structure CLASS-ID Paragraph METHOD-ID Paragraph REPOSITORY Paragraph Referencing Data Names, Copy Libraries, and Procedure Division Names . 44 Uniqueness of Reference 44 Transfer of Control 56 58 58 59 Part 2. COBOL Source Unit Structure 63 COBOL Program Structure 64 Nested Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 69 71 Part 3. Identification Division . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 Identification Division . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 PROGRAM-ID Paragraph . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 Optional Paragraphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 Part 4. Environment Division . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 Configuration Section . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 SOURCE-COMPUTER Paragraph . . . . . . . . . . . . . . . . . . . . . . . . . 87 OBJECT-COMPUTER Paragraph . . . . . . . . . . . . . . . . . . . . . . . . . 88 SPECIAL-NAMES Paragraph . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 ALPHABET Clause . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92 SYMBOLIC CHARACTERS Clause 95 CLASS Clause . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 CURRENCY SIGN Clause 96 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 Input-Output Section . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 FILE-CONTROL Paragraph . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102 SELECT Clause . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106 ASSIGN Clause . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106 RESERVE Clause . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110 ORGANIZATION Clause . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111 PADDING CHARACTER Clause 114 RECORD DELIMITER Clause 114 iv COBOL Language Reference PASSWORD Clause LOCK MODE Clause (OS/2 VSAM Files Only) APPLY WRITE-ONLY Clause Local-Storage Section RECORDING MODE Clause DATE FORMAT Clause ACCESS MODE Clause 115 RECORD KEY Clause 117 ALTERNATE RECORD KEY Clause 118 RELATIVE KEY Clause 119 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120 120 FILE STATUS Clause 122 I-O-CONTROL Paragraph . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124 RERUN Clause . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125 SAME AREA Clause 127 SAME RECORD AREA Clause 127 SAME SORT AREA Clause 128 SAME SORT-MERGE AREA Clause 129 MULTIPLE FILE TAPE Clause 129 129 Part 5. Data Division . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131 Data Division Overview 132 File Section . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133 Working-Storage Section . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135 Linkage Section . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135 Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136 Data Relationships . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137 Data Division—File Description Entries 144 File Section . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147 EXTERNAL Clause . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148 GLOBAL Clause . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149 BLOCK CONTAINS Clause 149 RECORD Clause . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151 LABEL RECORDS Clause 154 VALUE OF Clause 155 DATA RECORDS Clause 155 LINAGE Clause . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155 157 CODE-SET Clause . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159 Data Division—Data Description Entry 161 Format 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161 Format 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162 Format 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162 Level-Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162 BLANK WHEN ZERO Clause 164 164 EXTERNAL Clause . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170 GLOBAL Clause . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170 Contents v Requirements for a Method Procedure Division ENTRY Statement EXIT METHOD Statement GOBACK Statement INVOKE Statement JUSTIFIED Clause . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171 OCCURS Clause . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172 PICTURE Clause . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178 REDEFINES Clause . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195 RENAMES Clause . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198 SIGN Clause . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200 SYNCHRONIZED Clause . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202 USAGE Clause . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209 VALUE Clause . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217 Part 6. Procedure Division . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223 Procedure Division Structure 225 226 The Procedure Division Header 227 Declaratives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230 Procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231 Arithmetic Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233 Conditional Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239 Statement Categories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261 Statement Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264 Procedure Division Statements 277 ACCEPT Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277 ADD Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282 ALTER Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285 CALL Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287 CANCEL Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294 CLOSE Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296 COMPUTE Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300 CONTINUE Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302 DELETE Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303 DISPLAY Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305 DIVIDE Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312 EVALUATE Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313 EXIT Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 317 318 EXIT PROGRAM Statement 319 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 320 GO TO Statement 321 IF Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323 INITIALIZE Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325 INSPECT Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 328 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 337 MERGE Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345 MOVE Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352 MULTIPLY Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357 vi COBOL Language Reference DATE-TO-YYYYMMDD DATEVAL DAY-TO-YYYYDDD OPEN Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 359 PERFORM Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365 READ Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 376 RELEASE Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385 RETURN Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 387 REWRITE Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 389 SEARCH Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 393 SET Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 400 SORT Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 407 START Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 415 STOP Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 418 STRING Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 420 SUBTRACT Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 425 UNSTRING Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 428 WRITE Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 436 Part 7. Intrinsic Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 445 Intrinsic Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 447 Specifying a Function 447 Function Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 454 ACOS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 458 ANNUITY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 459 ASIN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 460 ATAN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 461 CHAR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 462 COS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 463 CURRENT-DATE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 464 DATE-OF-INTEGER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 466 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 467 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 468 DAY-OF-INTEGER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 470 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 471 FACTORIAL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 472 INTEGER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 473 INTEGER-OF-DATE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 474 INTEGER-OF-DAY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 475 INTEGER-PART . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 476 LENGTH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 477 LOG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 478 LOG10 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 479 LOWER-CASE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 480 MAX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 481 MEAN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 482 MEDIAN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 483 MIDRANGE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 484 MIN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 485 MOD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 486 Contents vii UNDATE YEAR-TO-YYYY YEARWINDOW BASIS Statement CBL (PROCESS) Statement *CONTROL (*CBL) Statement DELETE Statement EJECT Statement INSERT Statement READY or RESET TRACE Statement SERVICE LABEL Statement SERVICE RELOAD Statement SKIP1/2/3 Statements TITLE Statement Compiler Directives CALLINTERFACE NUMVAL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 487 NUMVAL-C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 488 ORD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 490 ORD-MAX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 491 ORD-MIN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 492 PRESENT-VALUE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 493 RANDOM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 494 RANGE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 495 REM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 496 REVERSE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 497 SIN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 498 SQRT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 499 STANDARD-DEVIATION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 500 SUM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 501 TAN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 502 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 503 UPPER-CASE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 504 VARIANCE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 505 WHEN-COMPILED . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 506 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 508 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 509 Part 8. Compiler-Directing Statements . . . . . . . . . . . . . . . . . . . . . . . . . 511 Compiler-Directing Statement . . . . . . . . . . . . . . . . . . . . . . . . . . 512 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 512 513 514 COPY Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 516 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 523 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 524 ENTER Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 524 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 525 526 REPLACE Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 527 530 531 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 531 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 532 USE Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 533 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 539 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 539 Appendixes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 543 Appendix A. Compiler Limits . . . . . . . . . . . . . . . . . . . . . . . . . . 544 viii COBOL Language Reference Appendix B. EBCDIC and ASCII Collating Sequences 548 EBCDIC Collating Sequence 548 US English ASCII Code Page (ISO 646) 551 Appendix C. Source Language Debugging 555 Coding Debugging Lines 555 Coding Debugging Sections 555 DEBUG-ITEM Special Register 556 Activate Compile-Time Switch 556 Activate Object-Time Switch 556 Appendix D. Reserved Words . . . . . . . . . . . . . . . . . . . . . . . . . . 558 Appendix E. ASCII Considerations for MVS and VM 565 Environment Division . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 565 Data Division . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 567 Procedure Division . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 567 Appendix F. Locale Considerations (Workstation Only) 568 Appendix G. Summary of Language Difference: Host COBOL and Workstation COBOL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 569 Appendix H. Industry Specifications . . . . . . . . . . . . . . . . . . . . . . 571 Standard Terminology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 573 Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 574 Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 577 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 600 Contents ix Notices Notices References in this publication to IBM products, programs, or services do not imply that IBM intends to make these available in all countries in which IBM operates. Any refer- ence to an IBM product, program, or service is not intended to state or imply that only that IBM product, program, or service may be used. Subject to IBM's valid intellectual property or other legally protectable rights, any functionally equivalent product, program, or service may be used instead of the IBM product, program, or service. The evalu- ation and verification of operation in conjunction with other products, except those expressly designated by IBM, are the responsibility of the user. IBM may have patents or pending patent applications covering subject matter in this document. The furnishing of this document does not give you any license to these patents. You can send license inquiries, in writing, to: IBM Director of Licensing IBM Corporation North Castle Drive Armonk, NY 10504-1785 U.S.A. Licensees of this program who wish to have information about it for the purpose of enabling (1) the exchange of information between independently created programs and other programs (including this one) and (2) the mutual use of the information that has been exchanged, should contact: IBM Corporation, HHX/H3 P.O. Box 49023 San Jose, CA 95161-9023 U.S.A. Such information may be available, subject to appropriate terms and conditions, including in some cases, payment of a fee. Programming Interface Information This Language Reference documents intended Programming Interfaces that allow the customer to write programs to obtain the services of COBOL for MVS & VM, COBOL Set for AIX, and VisualAge COBOL. x  Copyright IBM Corp. 1991, 1998 [...]... in part, in the COBOL specifications Such authorization extends to the reproduction and use of COBOL specifications in programming manuals or similar publications xvi COBOL Language Reference Summary of Changes Major changes to the COBOL for MVS & VM, COBOL Set for AIX, and VisualAge COBOL languages are listed below, according to the edition in which they first appeared Changes to the language since... METHOD DATA DIVISION METHOD PROCEDURE DIVISION USAGE OBJECT REFERENCE clause EXIT statement extension INVOKE statement SET statement extension xviii COBOL Language Reference Extensions for Interoperability (MVS, VM, AIX, and OS/2) The following extensions to the COBOL language enable improved interoperability between COBOL and C, SOM®, and Language Environment®: CALL RETURNING for invocation of functions... were made in this edition Second Edition (October 1995) The following changes were made to the IBM COBOL for MVS & VM (formerly named IBM SAA AD/Cycle® COBOL/ 370™) language: Extensions for Object-Oriented COBOL (MVS, AIX, and OS/2 Only) The following extensions to the COBOL language enable object-oriented COBOL programming: CLASS IDENTIFICATION DIVISION CLASS ENVIRONMENT DIVISION CLASS DATA DIVISION CLASS... Informs you of information specific to COBOL for MVS & VM Informs you of information specific to COBOL Set for AIX and VisualAge COBOL (under OS/2® and Windows) Informs you of information specific to COBOL Set for AIX Informs you of information specific to VisualAge COBOL, under OS/2 only Note: This book documents extensions for object-oriented COBOL Object-oriented COBOL is not supported on VM Use this... Revision of ISO 1989:1985 Programming Language COBOL: – DATE-TO-YYYYMMDD – DAY-TO-YYYYDDD – YEAR-TO-YYYY Extension of the ACCEPT statement to cover the recommendation in the Working Draft for Proposed Revision of ISO 1989:1985 Programming Language COBOL: – ACCEPT FROM DATE YYYYMMDD – ACCEPT FROM DAY YYYYDDD Third Edition (July 1996, Softcopy Only) No changes to the IBM COBOL language were made in this edition... IBM COBOL Programming Guide for your platform IBM Extensions IBM extensions generally add to language element rules or restrictions In the hardcopy, published book, IBM extensions appear in gray ink For example: IBM extensions in text are shown this way IBM extensions are not indicated in the appendixes, glossary, or index Obsolete Language Elements Obsolete language elements are COBOL 85 Standard language. .. 1998) The millennium language extensions, enabling compiler-assisted date processing for dates containing 2-digit and 4-digit years Requires IBM VisualAge COBOL Millennium Language Extensions for MVS & VM (program number 5654-MLE) to be installed with your compiler For information on the millennium language extensions, see “Millennium Language Extensions and Date Fields” on page 58 New language elements... VALUE and BY REFERENCE declarations for parameters on the PROCEDURE DIVISION and ENTRY USING statements PROCEDURE DIVISION RETURNING phrase for specifying a return value from a program, method, or C function Long and mixed-case program names Support for COBOL on AIX and OS/2 For details on language differences, see Appendix G, “Summary of Language Difference: Host COBOL and Workstation COBOL on page... 1 Characters Characters The most basic and indivisible unit of the COBOL language is the character The IBM COBOL character set includes the letters of the alphabet, digits, and special characters The complete set of characters that form the IBM COBOL character set is shown in Table 1 on page 3 The basic IBM COBOL language is restricted to the character set shown in Table 1 on page 3, but the... user-defined words can be referenced by statements and entries in that program in which the user-defined word is declared: Paragraph-name Section-name Part 1 COBOL Language Structure 5 Character-Strings The following types of user-defined words can be referenced by any COBOL program, provided that the compiling system supports the associated library or other system, and the entities referenced are known . COBOL for MVS & VM IBM COBOL Set for AIX IBM VisualAge COBOL IBM Language Reference SC26-4769-04 IBM COBOL for MVS & VM IBM COBOL Set for AIX IBM VisualAge COBOL IBM Language Reference . for COBOL on AIX and OS/2 For details on language differences, see Appendix G, “Summary of Language Differ- ence: Host COBOL and Workstation COBOL on page 569. Summary of Changes xix xx COBOL Language. 1995) The following changes were made to the IBM COBOL for MVS & VM (formerly named IBM SAA AD/Cycle COBOL/ 370) language: xviii COBOL Language Reference Extensions for Interoperability (MVS,

Ngày đăng: 23/10/2014, 11:59

TỪ KHÓA LIÊN QUAN