Enterprise COBOL for z/OS Language Reference Version4Release2 SC23-8528-01 Enterprise COBOL for z/OS Language Reference Version4Release2 SC23-8528-01 Note! Before using this information and the product it supports, be sure to read the general information under “Notices” on page 625. Second Edition (August 2009) This edition applies to Version 4 Release 2 of IBM Enterprise COBOL for z/OS (program number 5655-S71) and to all subsequent releases and modifications until otherwise indicated in new editions. Make sure that you are using the correct edition for the level of the product. You can order publications online at www.ibm.com/shop/publications/order/, or order by phone or fax. IBM Software Manufacturing Solutions takes publication orders between 8:30 a.m. and 7:00 p.m. Eastern Standard Time (EST). The phone number is (800)879-2755. The fax number is (800)445-9269. You can also order publications through your IBM representative or the IBM branch office that serves your locality. © Copyright International Business Machines Corporation 1991, 2009. US Government Users Restricted Rights – Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. Contents Tables ...............xi TALLY...............24 WHEN-COMPILED ..........24 Preface ..............xiii XML-CODE .............24 XML-EVENT .............25 About this information ..........xiii XML-NAMESPACE...........31 How to read the syntax diagrams......xiii XML-NNAMESPACE ..........32 IBM extensions ............xvi XML-NAMESPACE-PREFIX ........33 Obsolete language elements .......xvi XML-NNAMESPACE-PREFIX .......34 DBCS notation ............xvii XML-NTEXT .............35 Acknowledgment ...........xvii XML-TEXT .............35 Accessing softcopy documentation and support Literals ................36 information..............xviii Alphanumeric literals ..........36 Summary of changes ..........xviii Numeric literals ............40 || Version 4 Release 2 (August 2009) .....xviii DBCS literals .............40 Version 4 Release 1 (December 2007) ....xviii National literals ............42 How to send your comments ........xix PICTURE character-strings .........44 Accessibility ..............xx Comments...............45 Interface information ..........xx Keyboard navigation ..........xx Accessibility of this information ......xx Chapter 4. Separators ........47 || IBM and accessibility ..........xx Rules for separators ...........47 Part 1. COBOL language structure . 1 Chapter 5. Sections and paragraphs . 51 Sentences, statements, and entries .......51 Entries ...............51 Chapter 1. Characters .........3 Clauses ...............52 Sentences ..............52 Chapter 2. Character sets and code Statements..............52 pages................5 Phrases ...............52 Character encoding units ..........5 Single-byte code pages ..........6 Chapter 6. Reference format .....53 EBCDIC DBCS code pages.........6 Sequence number area...........53 Unicode UTF-16 ............7 Indicator area..............53 AreaA................54 Chapter 3. Character-strings ......9 Division headers............54 COBOL words with single-byte characters ....9 Section headers ............54 User-defined words with DBCS characters ....10 Paragraph headers or paragraph names ....54 User-defined words............10 Level indicators (FD and SD) or level-numbers System-names .............12 (01and77).............55 Function-names .............12 DECLARATIVES and END DECLARATIVES . 55 Reserved words .............12 End program, end class, and end method Figurative constants ...........13 markers ..............55 Special registers .............15 AreaB................55 ADDRESS OF ............17 Entries, sentences, statements, clauses ....56 DEBUG-ITEM ............17 Continuation lines ...........56 JNIENVPTR .............18 AreaAorAreaB............58 LENGTH OF .............18 Level-numbers ............58 LINAGE-COUNTER ..........20 Comment lines ............58 RETURN-CODE ............20 Compiler-directing statements .......59 SHIFT-OUT and SHIFT-IN ........21 Debugging lines ............59 SORT-CONTROL ...........21 Pseudo-text .............59 SORT-CORE-SIZE ...........22 Blank lines .............59 SORT-FILE-SIZE ............22 SORT-MESSAGE ...........23 Chapter 7. Scope of names ......61 SORT-MODE-SIZE ...........23 Types of names .............61 SORT-RETURN ............23 External and internal resources ........63 © Copyright IBM Corp. 1991, 2009 iii Resolution of names ...........64 Part 4. Environment division . 113 Names within programs .........64 Names within a class definition ......65 Chapter 15. Configuration section . 115 Chapter 8. Referencing data names, SOURCE-COMPUTER paragraph.......116 OBJECT-COMPUTER paragraph .......117 copy libraries, and procedure division SPECIAL-NAMES paragraph ........118 names ...............67 ALPHABET clause ...........121 Uniqueness of reference ..........67 SYMBOLIC CHARACTERS clause ......123 Qualification .............67 CLASS clause .............124 Identical names ............68 CURRENCY SIGN clause .........124 References to COPY libraries .......68 DECIMAL-POINT IS COMMA clause .....126 References to procedure division names ....68 || XML-SCHEMA clause ..........126 References to data division names ......69 | Environment variable contents for an XML Condition-name ............72 || schema file .............126 Index-name .............73 REPOSITORY paragraph .........127 Index data item ............73 General rules ............129 Subscripting .............73 Identifying and referencing a class .....129 Reference modification .........76 Function-identifier ...........79 Chapter 16. Input-Output section . 131 Data attribute specification .........80 FILE-CONTROL paragraph.........132 SELECT clause .............136 Chapter 9. Transfer of control .....81 ASSIGN clause .............136 Assignment name for environment variable . 138 Chapter 10. Millennium Language Environment variable contents for a QSAM file 138 Extensions and date fields ......83 Environment variable contents for a Millennium Language Extensions syntax ....83 line-sequential file ...........140 Terms and concepts............84 Environment variable contents for a VSAM file 140 Date field ..............84 RESERVE clause ............141 Nondate ..............85 ORGANIZATION clause .........141 Century window ...........85 File organization ...........142 PADDING CHARACTER clause .......144 RECORD DELIMITER clause ........144 Part 2. COBOL source unit ACCESS MODE clause ..........145 structure .............87 File organization and access modes .....145 Access modes ............146 Chapter 11. COBOL program structure 89 Relationship between data organizations and access modes ............146 Nested programs ............91 RECORD KEY clause ...........147 Conventions for program-names ......92 ALTERNATE RECORD KEY clause ......148 RELATIVE KEY clause ..........149 Chapter 12. COBOL class definition PASSWORD clause ...........149 structure ..............95 FILE STATUS clause ...........150 I-O-CONTROL paragraph .........151 Chapter 13. COBOL method definition RERUN clause .............153 structure ..............99 SAME AREA clause ...........154 SAME RECORD AREA clause ........155 SAME SORT AREA clause .........156 Part 3. Identification division . 101 SAME SORT-MERGE AREA clause ......156 MULTIPLE FILE TAPE clause ........156 Chapter 14. Identification division . 103 APPLY WRITE-ONLY clause ........157 PROGRAM-ID paragraph .........106 CLASS-ID paragraph ...........109 Part 5. Data division .......159 General rules ............109 Inheritance .............109 Chapter 17. Data division overview 161 FACTORY paragraph ...........110 OBJECT paragraph ...........110 File section ..............162 METHOD-ID paragraph ..........110 Working-storage section ..........163 Method signature ...........110 Local-storage section ...........164 Method overloading, overriding, and hiding . 110 Linkage section.............165 Optional paragraphs ...........111 Data units ..............165 iv Enterprise COBOL for z/OS V4.2 Language Reference File data ..............165 Character-string representation ......215 Program data ............166 Data categories and PICTURE rules .....216 Method data ............166 PICTURE clause editing .........223 Factory data .............166 Simple insertion editing .........224 Instance data ............166 Special insertion editing .........224 Data relationships ............166 Fixed insertion editing .........224 Levels of data ............167 Floating insertion editing ........225 Levels of data in a record description entry . 167 Zero suppression and replacement editing. 227 Special level-numbers .........169 REDEFINES clause ...........228 Indentation .............169 REDEFINES clause considerations .....230 Classes and categories of group items ....169 REDEFINES clause examples .......230 Classes and categories of data .......170 Undefined results ...........231 Category descriptions .........172 RENAMES clause ............231 Alignment rules ...........174 SIGN clause ..............234 Character-string and item size .......175 SYNCHRONIZED clause .........236 Signed data .............176 Slack bytes .............238 Operational signs ...........176 Slack bytes within records ........238 Editing signs ............176 Slack bytes between records .......240 USAGE clause .............241 Chapter 18. Data division--file Computational items ..........243 description entries .........177 DISPLAY phrase ...........245 DISPLAY-1 phrase ...........246
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages700 Page
-
File Size-