unisys cobol
DESCRIPTION
dfdfTRANSCRIPT
-
unisys imagine it. done.
OS 2200
ASCII COBOL
Programming Reference Manual
Level 7R3K
June 2010 7830 7709002
-
NO WARRANTIES OF ANY NATURE ARE EXTENDED BY THIS DOCUMENT. Any product or related information
described herein is only furnished pursuant and subject to the terms and conditions of a duly executed agreement to
purchase or lease equipment or to license software. The only warranties made by Unisys, if any, with respect to the
products described in this document are set forth in such agreement. Unisys cannot accept any financial or other
responsibility that may be the result of your use of the information in this document or software material, including
direct, special, or consequential damages.
You should be very careful to ensure that the use of this information and/or software material complies with the laws,
rules, and regulations of the jurisdictions with respect to which it is used.
The information contained herein is subject to change without notice. Revisions may be issued to advise of such
changes and/or additions.
Notice to U.S. Government End Users: This is commercial computer software or hardware documentation developed at
private expense. Use, reproduction, or disclosure by the Government is subject to the terms of Unisys standard
commercial license for the products, and where applicable, the restricted/limited rights provisions of the contract data
rights clauses.
Unisys is a registered trademark of Unisys Corporation in the United States and other countries.
All other brands and products referenced in this document are acknowledged to be the trademarks or registered
trademarks of their respective holders.
-
Acknowledgment
Any organization interested in reproducing the COBOL standard and specifications in
whole or in part, using ideas from this document as the basis for an instruction manual or
for any other purpose, is free to do so. However, all such organizations are requested to
reproduce the following acknowledgement paragraphs in their entirety as part of the
preface to any such publication (any organization using a short passage from this
document, such as in a book review, is requested to mention "COBOL" in
acknowledgement of the source, but need not quote the acknowledgement):
COBOL is an industry language and is not the property of any company or group of
companies, or of any organization or group of organizations.
No warranty, expressed or implied, is made by any contributor or by the CODASYL
Programming Language Committee as to the accuracy and functioning of the
programming system and language. Moreover, no responsibility is assumed by any
contributor, or by the committee, in connection therewith.
The authors and copyright holders of the copyrighted material used herein:
FLOW-MATIC Programming for the UNIVAC I and II, Data Automation Systems
copyrighted 1958, 1959, by Unisys Corporation; IBM Commercial Translator
Form No. F 28-8013, copyrighted 1959 by IBM; FACT DSI 27A5260-2760,
copyrighted 1960 by Minneapolis-Honeywell.
have specifically authorized the use of this material in whole or in part, in the COBOL
specifications. Such authorization extends to the reproduction and use of the COBOL
specifications in programming manuals or similar publications.
UNIVAC is a registered trademark of Unisys Corporation.
IBM is a registered trademark of International Business Machines Corporation.
-
7830 7709002 v
Contents
Section 1. Introduction
1.1. General ..................................................................................... 11
1.2. Concepts .................................................................................. 13
1.2.1. Features of the Language ............................................... 13
1.2.2. Record Ordering .............................................................. 13
1.2.3. Report Writer ................................................................... 13
1.2.4. Table Handling ................................................................. 14
1.2.4.1. Table Definition ....................................................... 14
1.2.4.2. References to Table Items ..................................... 15
1.2.4.3. Table Searching ...................................................... 16
1.2.5. File Organization and Access Methods ........................... 16
1.2.5.1. Sequential Organization .......................................... 16
1.2.5.2. Relative Organization .............................................. 17
1.2.5.3. Indexed Organization .............................................. 17
1.2.6. Rerun ............................................................................... 17
1.2.7. Program Modularity ......................................................... 18
1.2.7.1. Interprogram Communications ............................... 18
1.2.7.1.1. Transfer of Control ......................................... 18
1.2.7.1.2. Interprogram Data Storage ............................ 19
1.2.7.2. Segmentation ......................................................... 19
1.2.8. Communication Facility ................................................. 110
1.2.8.1. Message Control System ..................................... 110
1.2.8.2. The COBOL Object Program ................................ 110
1.2.8.3. Relationship of COBOL Program to MCS
and Communication Devices ........................... 111
1.2.8.3.1. Invoking the COBOL Object Program.......... 112
1.2.8.4. The Concept of Messages and Message
Segments ......................................................... 113
1.2.8.5. The Concept of Queues ....................................... 114
1.2.8.5.1. Independent Enqueuing and
Dequeuing ............................................... 114
1.2.8.5.2. Enabling and Disabling Logical
Connectives ............................................. 114
1.2.8.5.3. Enqueuing and Dequeuing Methods ........... 115
1.2.8.5.4. Queue Hierarchy .......................................... 115
1.2.9. Debugging ..................................................................... 117
1.2.10. Library ............................................................................ 117
1.3. Overall Language Considerations .......................................... 118
1.3.1. General .......................................................................... 118
1.3.2. Notation Used in Formats and Rules ............................ 118
1.3.2.1. Definition of a General Format ............................. 118
1.3.2.1.1. Syntax Rules ................................................ 118
1.3.2.1.2. General Rules ............................................... 118
-
Contents
vi 7830 7709002
1.3.2.1.3. Elements....................................................... 118
1.3.2.1.4. Words ........................................................... 119
1.3.2.1.5. LevelNumbers ............................................ 119
1.3.2.1.6. Brackets and Braces ..................................... 119
1.3.2.1.7. The Ellipsis .................................................... 119
1.3.2.1.8. Format Punctuation ...................................... 120
1.3.2.1.9. Use of Certain Special Characters in
Formats .................................................... 120
1.3.3. Language Concepts ....................................................... 120
1.3.3.1. Character Set ......................................................... 120
1.3.3.2. Language Structure ............................................... 121
1.3.3.2.1. Separators..................................................... 121
1.3.3.2.2. CharacterStrings ......................................... 122
1.3.3.3. Concept of Computer Independent Data
Description ........................................................ 129
1.3.3.3.1. Logical Record and File Concept .................. 129
1.3.3.3.2. Concept of Levels ......................................... 130
1.3.3.3.3. Concept of Classes of Data .......................... 131
1.3.3.3.4. Selection of Character Representation
and Radix .................................................. 131
1.3.3.3.5. Algebraic Signs ............................................. 132
1.3.3.3.6. Standard Alignment Rules ............................ 132
1.3.3.3.7. Item Alignment for Increased Object
Code Efficiency ........................................ 132
1.3.3.3.8. Uniqueness of Reference ............................. 133
1.3.3.4. Explicit and Implicit Specifications ........................ 137
1.3.3.4.1. Explicit and Implicit Procedure
Division References ................................. 137
1.3.3.4.2. Explicit and Implicit Transfers of
Control ...................................................... 137
1.3.3.4.3. Explicit and Implicit Attributes ...................... 138
1.3.4. Control Division .............................................................. 139
1.3.4.1. General Description ............................................... 139
1.3.4.2. Organization .......................................................... 139
1.3.4.3. Control Division Structure ..................................... 139
1.3.4.3.1. General Format ............................................. 139
1.3.5. Identification Division ..................................................... 139
1.3.5.1. General Description ............................................... 139
1.3.5.2. Organization .......................................................... 139
1.3.5.3. Structure ................................................................ 140
1.3.5.3.1. General Format ............................................. 140
1.3.6. Environment Division ..................................................... 140
1.3.6.1. General Description ............................................... 140
1.3.6.2. Organization .......................................................... 140
1.3.6.3. Environment Division Structure ............................ 141
1.3.6.3.1. General Format ............................................. 141
1.3.6.3.2. Syntax Rules ................................................. 141
1.3.7. Data Division .................................................................. 141
1.3.7.1. Overall Approach ................................................... 141
1.3.7.2. Physical and Logical Aspects of Data
Description ........................................................ 142
1.3.7.2.1. Data Division Organization ............................ 142
-
Contents
7830 7709002 vii
1.3.7.2.2. Data Division Structure ................................ 142
1.3.8. Procedure Division ........................................................ 144
1.3.8.1. General Description .............................................. 144
1.3.8.1.1. Declaratives ................................................. 144
1.3.8.1.2. Procedures ................................................... 144
1.3.8.1.3. Execution ..................................................... 144
1.3.8.1.4. Procedure Division Structure ....................... 145
1.3.8.2. Statements and Sentences .................................. 145
1.3.8.2.1. Conditional Statements and
Conditional Sentences ............................. 145
1.3.8.2.2. Compiler-Directing Statements and
Compiler Directing Sentences ................. 146
1.3.8.2.3. Imperative Statements and
Imperative Sentences .............................. 146
1.3.8.2.4. Categories of Statements ............................ 147
1.3.9. Reference Format ......................................................... 149
1.3.9.1. General Description .............................................. 149
1.3.9.2. Reference Format Representation ....................... 149
1.3.9.2.1. Sequence Numbers ..................................... 150
1.3.9.2.2. Continuation of Lines ................................... 150
1.3.9.2.3. Blank Lines ................................................... 150
1.3.9.3. Division, Section, Paragraph Formats ................... 150
1.3.9.3.1. Division Header ............................................ 150
1.3.9.3.2. Section Header ............................................ 150
1.3.9.3.3. Paragraph Header, Paragraph-Name,
and Paragraph .......................................... 150
1.3.9.4. Data Division Entries ............................................ 151
1.3.9.5. Declaratives .......................................................... 152
1.3.9.6. Comment Lines .................................................... 152
Section 2. Nucleus
2.1. General ..................................................................................... 21
2.1.1. Function ........................................................................... 21
2.1.2. Level Characteristics ....................................................... 21
2.1.3. Level Restrictions on Overall Language .......................... 21
2.1.3.1. Format Notation ...................................................... 21
2.1.3.2. Name Characteristics ............................................. 21
2.1.3.3. Figurative Constants ............................................... 22
2.1.3.4. Reference Format ................................................... 22
2.2. Control Division ........................................................................ 23
2.2.1. General Description ......................................................... 23
2.2.2. Organization .................................................................... 23
2.2.2.1. Structure ................................................................. 23
2.2.2.2. General Format ....................................................... 23
2.2.2.3. Syntax Rule ............................................................. 23
2.2.3. The Alphabet Section ...................................................... 23
2.2.3.1. The SOURCEALPHABET Clause .......................... 23
2.2.3.1.1. Function ......................................................... 23
2.2.3.1.2. General Format .............................................. 24
2.2.3.1.3. Syntax Rules .................................................. 24
-
Contents
viii 7830 7709002
2.2.3.1.4. General Rules ................................................. 24
2.2.3.2. Example ................................................................... 24
2.3. Identification Division ............................................................... 25
2.3.1. General Description ......................................................... 25
2.3.2. Organization ..................................................................... 25
2.3.2.1. Structure .................................................................. 25
2.3.2.2. General Format ........................................................ 25
2.3.2.3. Syntax Rules ............................................................ 25
2.3.3. The PROGRAMID Paragraph ......................................... 26
2.3.3.1. Function ................................................................... 26
2.3.3.2. General Format ........................................................ 26
2.3.3.3. Syntax Rules ............................................................ 26
2.3.3.4. General Rules .......................................................... 26
2.3.4. The DATECOMPILED Paragraph ................................... 26
2.3.4.1. Function ................................................................... 26
2.3.4.2. General Format ........................................................ 26
2.3.4.3. Syntax Rules ............................................................ 26
2.3.4.4. General Rules .......................................................... 26
2.4. Environment Division ................................................................ 27
2.4.1. Configuration Section ....................................................... 27
2.4.1.1. The SOURCECOMPUTER Paragraph .................... 27
2.4.1.1.1. Function .......................................................... 27
2.4.1.1.2. General Format ............................................... 27
2.4.1.1.3. Syntax Rules ................................................... 27
2.4.1.1.4. General Rules ................................................. 27
2.4.1.2. The OBJECTCOMPUTER Paragraph ..................... 27
2.4.1.2.1. Function .......................................................... 27
2.4.1.2.2. General Format ............................................... 27
2.4.1.2.3. Syntax Rules ................................................... 27
2.4.1.2.4. General Rules ................................................. 28
2.4.1.3. The SPECIALNAMES Paragraph ........................... 29
2.4.1.3.1. Function .......................................................... 29
2.4.1.3.2. General Format ............................................... 29
2.4.1.3.3. Syntax Rules ................................................. 210
2.4.1.3.4. General Rules ............................................... 210
2.5. Data Division ........................................................................... 213
2.5.1. WorkingStorage Section .............................................. 213
2.5.1.1. Noncontiguous WorkingStorage ......................... 213
2.5.1.2. WorkingStorage Records .................................... 213
2.5.1.3. Initial Values .......................................................... 213
2.5.2. The Data DescriptionComplete Entry Skeleton.......... 214
2.5.2.1. Function ................................................................. 214
2.5.2.2. General Format ...................................................... 214
2.5.2.3. Syntax Rules .......................................................... 215
2.5.2.4. General Rules ........................................................ 215
2.5.3. The BLANK WHEN ZERO Clause .................................. 215
2.5.3.1. Function ................................................................. 215
2.5.3.2. General Format ...................................................... 215
2.5.3.3. Syntax Rules .......................................................... 215
2.5.3.4. General Rules ........................................................ 216
2.5.4. The DataName or FILLER Clause ................................ 216
2.5.4.1. Function ................................................................. 216
-
Contents
7830 7709002 ix
2.5.4.2. General Format ..................................................... 216
2.5.4.3. Syntax Rules ......................................................... 216
2.5.4.4. General Rules ....................................................... 216
2.5.5. The JUSTIFIED Clause .................................................. 217
2.5.5.1. Function ................................................................ 217
2.5.5.2. General Format ..................................................... 217
2.5.5.3. Syntax Rules ......................................................... 217
2.5.5.4. General Rules ....................................................... 217
2.5.6. LevelNumber ............................................................... 218
2.5.6.1. Function ................................................................ 218
2.5.6.2. General Format ..................................................... 218
2.5.6.3. Syntax Rules ......................................................... 218
2.5.6.4. General Rules ....................................................... 218
2.5.7. The PICTURE Clause ..................................................... 219
2.5.7.1. Function ................................................................ 219
2.5.7.2. General Format ..................................................... 219
2.5.7.3. Syntax Rules ......................................................... 219
2.5.7.4. General Rules ....................................................... 219
2.5.7.5. Editing Rules ......................................................... 225
2.5.7.6. Precedence Rules ................................................. 230
2.5.8. The REDEFINES Clause ................................................ 234
2.5.8.1. Function ................................................................ 234
2.5.8.2. General Format ..................................................... 234
2.5.8.3. Syntax Rules ......................................................... 234
2.5.8.4. General Rules ....................................................... 234
2.5.9. The RENAMES Clause .................................................. 235
2.5.9.1. Function ................................................................ 235
2.5.9.2. General Format ..................................................... 235
2.5.9.3. Syntax Rules ......................................................... 235
2.5.9.4. General Rules ....................................................... 237
2.5.10. The SIGN Clause ........................................................... 237
2.5.10.1. Function ................................................................ 237
2.5.10.2. General Format ..................................................... 237
2.5.10.3. Syntax Rules ......................................................... 237
2.5.10.4. General Rules ....................................................... 238
2.5.11. The SYNCHRONIZED Clause ........................................ 238
2.5.11.1. Function ................................................................ 238
2.5.11.2. General Format ..................................................... 239
2.5.11.3. Syntax Rules ......................................................... 239
2.5.11.4. General Rules ....................................................... 239
2.5.12. The USAGE Clause........................................................ 240
2.5.12.1. Function ................................................................ 240
2.5.12.2. General Format ..................................................... 240
2.5.12.3. Syntax Rules ......................................................... 240
2.5.12.4. General Rules ....................................................... 241
2.5.13. The VALUE Clause ........................................................ 243
2.5.13.1. Function ................................................................ 243
2.5.13.2. General Format ..................................................... 243
2.5.13.3. Syntax Rules ......................................................... 243
2.5.13.4. General Rules ....................................................... 243
2.5.13.5. ConditionName Rules ......................................... 244
-
Contents
x 7830 7709002
2.5.13.6. Data Description Entries Other Than
ConditionNames .............................................. 244
2.6. Procedure Division .................................................................. 246
2.6.1. Arithmetic Expressions .................................................. 246
2.6.1.1. Definition of an Arithmetic Expression ................. 246
2.6.1.2. Arithmetic Operators ............................................. 246
2.6.1.3. Formation And Evaluation Rules ........................... 247
2.6.2. Conditional Expressions ................................................. 250
2.6.2.1. Simple Conditions ................................................. 250
2.6.2.1.1. Relation Condition ........................................ 250
2.6.2.1.2. Class Condition ............................................. 255
2.6.2.1.3. Condition-Name Condition
(Conditional Variable) ................................ 256
2.6.2.1.4. SwitchStatus Condition .............................. 257
2.6.2.1.5. Sign Condition .............................................. 258
2.6.2.2. Complex Conditions .............................................. 259
2.6.2.2.1. Negated Simple Conditions .......................... 259
2.6.2.2.2. Combined and Negated Combined
Conditions ................................................ 260
2.6.2.3. Abbreviated Combined Relation Conditions ......... 261
2.6.2.4. Condition Evaluation Rules .................................... 263
2.6.3. Common Phrases and General Rules for
Statement Formats .................................................... 263
2.6.3.1. The ROUNDED Phrase ......................................... 263
2.6.3.2. The SIZE ERROR Phrase ....................................... 264
2.6.3.3. The CORRESPONDING Phrase ............................ 265
2.6.3.4. The Arithmetic Statements ................................... 267
2.6.3.5. Overlapping Operands .......................................... 267
2.6.3.6. Multiple Results in Arithmetic Statements ........... 268
2.6.3.7. Arithmetic Intermediate Results ........................... 268
2.6.3.8. Incompatible Data ................................................. 279
2.6.4. The ACCEPT Statement ................................................. 280
2.6.4.1. Function ................................................................. 280
2.6.4.2. General Format ...................................................... 280
2.6.4.3. Syntax Rules .......................................................... 280
2.6.4.4. General Rules ........................................................ 280
2.6.5. The ADD Statement ....................................................... 283
2.6.5.1. Function ................................................................. 283
2.6.5.2. General Format ...................................................... 283
2.6.5.3. Syntax Rules .......................................................... 283
2.6.5.4. General Rules ........................................................ 284
2.6.6. The ALTER Statement ................................................... 285
2.6.6.1. Function ................................................................. 285
2.6.6.2. General Format ...................................................... 285
2.6.6.3. Syntax Rules .......................................................... 285
2.6.6.4. General Rules ........................................................ 285
2.6.7. The COMPUTE Statement............................................. 286
2.6.7.1. Function ................................................................. 286
2.6.7.2. General Format ...................................................... 286
2.6.7.3. Syntax Rules .......................................................... 286
2.6.7.4. General Rules ........................................................ 286
2.6.8. The DISPLAY Statement ................................................ 287
-
Contents
7830 7709002 xi
2.6.8.1. Function ................................................................ 287
2.6.8.2. General Format ..................................................... 287
2.6.8.3. Syntax Rules ......................................................... 287
2.6.8.4. General Rules ....................................................... 287
2.6.9. The DIVIDE Statement .................................................. 289
2.6.9.1. Function ................................................................ 289
2.6.9.2. General Format ..................................................... 289
2.6.9.3. Syntax Rules ......................................................... 290
2.6.9.4. General Rules ....................................................... 290
2.6.10. The EXIT Statement ...................................................... 291
2.6.10.1. Function ................................................................ 291
2.6.10.2. General Format ..................................................... 291
2.6.10.3. Syntax Rules ......................................................... 291
2.6.10.4. General Rules ....................................................... 292
2.6.11. The GO TO Statement .................................................. 292
2.6.11.1. Function ................................................................ 292
2.6.11.2. General Format ..................................................... 292
2.6.11.3. Syntax Rules ......................................................... 292
2.6.11.4. General Rules ....................................................... 293
2.6.12. The IF Statement........................................................... 293
2.6.12.1. Function ................................................................ 293
2.6.12.2. General Format ..................................................... 293
2.6.12.3. Syntax Rules ......................................................... 293
2.6.12.4. General Rules ....................................................... 293
2.6.13. The INSPECT Statement ............................................... 295
2.6.13.1. Function ................................................................ 295
2.6.13.2. General Format ..................................................... 295
2.6.13.3. Syntax Rules ......................................................... 296
2.6.13.4. General Rules ....................................................... 297
2.6.13.5. Examples ............................................................ 2100
2.6.14. The MOVE Statement ................................................. 2101
2.6.14.1. Function .............................................................. 2101
2.6.14.2. General Format ................................................... 2101
2.6.14.3. Syntax Rules ....................................................... 2101
2.6.14.4. General Rules ..................................................... 2102
2.6.15. The MULTIPLY Statement .......................................... 2105
2.6.15.1. Function .............................................................. 2105
2.6.15.2. General Format ................................................... 2105
2.6.15.3. Syntax Rules ....................................................... 2105
2.6.15.4. General Rules ..................................................... 2105
2.6.16. The PERFORM Statement .......................................... 2106
2.6.16.1. Function .............................................................. 2106
2.6.16.2. General Format ................................................... 2106
2.6.16.3. Syntax Rules ....................................................... 2107
2.6.16.4. General Rules ..................................................... 2107
2.6.17. The SET Statement ..................................................... 2113
2.6.17.1. Function .............................................................. 2113
2.6.17.2. General Format ................................................... 2113
2.6.17.3. Syntax Rules ....................................................... 2113
2.6.17.4. General Rules ..................................................... 2113
2.6.18. The STOP Statement .................................................. 2113
2.6.18.1. Function .............................................................. 2113
-
Contents
xii 7830 7709002
2.6.18.2. General Format .................................................... 2113
2.6.18.3. Syntax Rules ........................................................ 2113
2.6.18.4. General Rules ...................................................... 2114
2.6.19. The STRING Statement ............................................... 2114
2.6.19.1. Function ............................................................... 2114
2.6.19.2. General Format .................................................... 2114
2.6.19.3. Syntax Rules ........................................................ 2114
2.6.19.4. General Rules ...................................................... 2115
2.6.20. The SUBTRACT Statement .......................................... 2117
2.6.20.1. Function ............................................................... 2117
2.6.20.2. General Format .................................................... 2117
2.6.20.3. Syntax Rules ........................................................ 2118
2.6.20.4. General Rules ...................................................... 2118
2.6.21. The UNSTRING Statement .......................................... 2119
2.6.21.1. Function ............................................................... 2119
2.6.21.2. General Format .................................................... 2119
2.6.21.3. Syntax Rules ........................................................ 2119
2.6.21.4. General Rules ...................................................... 2120
Section 3. Table Handling
3.1. General ..................................................................................... 31
3.1.1. Function ........................................................................... 31
3.1.2. Level Characteristics ........................................................ 31
3.2. Data Division ............................................................................. 32
3.2.1. The OCCURS Clause ....................................................... 32
3.2.1.1. Function ................................................................... 32
3.2.1.2. General Format ........................................................ 32
3.2.1.3. Syntax Rules ............................................................ 32
3.2.1.4. General Rules .......................................................... 33
3.2.2. The USAGE Clause .......................................................... 36
3.2.2.1. Function ................................................................... 36
3.2.2.2. General Format ........................................................ 36
3.2.2.3. Syntax Rules ............................................................ 36
3.2.2.4. General Rules .......................................................... 36
3.3. Procedure Division .................................................................... 37
3.3.1. Relation Condition ............................................................ 37
3.3.1.1. Comparisons Involving Index-Names and/or
Index Data Items ................................................. 37
3.3.2. Overlapping Operands ..................................................... 37
3.3.3. The SEARCH Statement .................................................. 37
3.3.3.1. Function ................................................................... 37
3.3.3.2. General Format ........................................................ 37
3.3.3.3. Syntax Rules ............................................................ 38
3.3.3.4. General Rules .......................................................... 39
3.3.4. The SET Statement ........................................................ 311
3.3.4.1. Function ................................................................. 311
3.3.4.2. General Format ...................................................... 311
3.3.4.3. Syntax Rules .......................................................... 312
3.3.4.4. General Rules ........................................................ 312
-
Contents
7830 7709002 xiii
Section 4. Sequential I-O
4.1. General ..................................................................................... 41
4.1.1. Function ........................................................................... 41
4.1.2. Level Characteristics ....................................................... 41
4.1.3. Language Concepts ........................................................ 41
4.1.3.1. Organization ............................................................ 41
4.1.3.2. Access Mode .......................................................... 41
4.1.3.3. Current Record Pointer ........................................... 42
4.1.3.4. IO Status ............................................................... 42
4.1.3.4.1. Status Key 1 ................................................... 42
4.1.3.4.2. Status Key 2 ................................................... 43
4.1.3.4.3. Valid Combinations of Status Keys 1
and 2 .......................................................... 43
4.1.3.5. The AT END Condition ............................................ 43
4.1.3.6. LINAGECOUNTER ................................................ 43
4.2. Environment Division ............................................................... 44
4.2.1. INPUTOUTPUT Section ................................................. 44
4.2.1.1. The FILECONTROL Paragraph ............................. 44
4.2.1.1.1. Function ......................................................... 44
4.2.1.1.2. General Format .............................................. 44
4.2.1.2. The File Control Entry ............................................. 44
4.2.1.2.1. Function ......................................................... 44
4.2.1.2.2. General Format .............................................. 44
4.2.1.2.3. Syntax Rules .................................................. 44
4.2.1.2.4. General Rules ................................................. 45
4.2.1.3. The IOCONTROL Paragraph ............................... 46
4.2.1.3.1. Function ......................................................... 46
4.2.1.3.2. General Format .............................................. 46
4.2.1.3.3. Syntax Rules .................................................. 46
4.2.1.3.4. General Rules ................................................. 47
4.3. Data Division ............................................................................ 48
4.3.1. File Section ...................................................................... 48
4.3.2. Record Description Structure .......................................... 48
4.3.3. The File DescriptionComplete Entry Skeleton ............. 48
4.3.3.1. Function .................................................................. 48
4.3.3.2. General Format ....................................................... 49
4.3.3.3. Syntax Rules ........................................................... 49
4.3.4. The BLOCK CONTAINS Clause ....................................... 49
4.3.4.1. Function .................................................................. 49
4.3.4.2. General Format ..................................................... 410
4.3.4.3. General Rules ....................................................... 410
4.3.5. The CODESET Clause ................................................. 410
4.3.5.1. Function ................................................................ 410
4.3.5.2. General Format ..................................................... 410
4.3.5.3. Syntax Rules ......................................................... 410
4.3.5.4. General Rules ....................................................... 411
4.3.6. The DATA RECORDS Clause ........................................ 411
4.3.6.1. Function ................................................................ 411
4.3.6.2. General Format ..................................................... 411
4.3.6.3. Syntax Rules ......................................................... 411
4.3.6.4. General Rules ....................................................... 411
-
Contents
xiv 7830 7709002
4.3.7. The DENSITY Clause ..................................................... 411
4.3.7.1. Function ................................................................. 411
4.3.7.2. General Format ...................................................... 411
4.3.7.3. Syntax Rules .......................................................... 411
4.3.7.4. General Rules ........................................................ 412
4.3.8. The LABEL RECORDS Clause ....................................... 412
4.3.8.1. Function ................................................................. 412
4.3.8.2. General Format ...................................................... 412
4.3.8.3. Syntax Rules .......................................................... 412
4.3.8.4. General Rules ........................................................ 412
4.3.9. The LINAGE Clause ....................................................... 412
4.3.9.1. Function ................................................................. 412
4.3.9.2. General Format ...................................................... 412
4.3.9.3. Syntax Rules .......................................................... 413
4.3.9.4. General Rules ........................................................ 413
4.3.10. The RECORD CONTAINS Clause .................................. 415
4.3.10.1. Function ................................................................. 415
4.3.10.2. General Format ...................................................... 415
4.3.10.3. General Rules ........................................................ 415
4.3.11. The VALUE OF Clause ................................................... 415
4.3.11.1. Function ................................................................. 415
4.3.11.2. General Format ...................................................... 415
4.3.11.3. Syntax Rules .......................................................... 416
4.3.11.4. General Rules ........................................................ 416
4.4. Procedure Division .................................................................. 417
4.4.1. The CLOSE Statement ................................................... 417
4.4.1.1. Function ................................................................. 417
4.4.1.2. General Format ...................................................... 417
4.4.1.3. Syntax Rules .......................................................... 417
4.4.1.4. General Rules ........................................................ 417
4.4.2. The OPEN Statement .................................................... 421
4.4.2.1. Function ................................................................. 421
4.4.2.2. General Format ...................................................... 421
4.4.2.3. Syntax Rules .......................................................... 421
4.4.2.4. General Rules ........................................................ 421
4.4.3. The READ Statement ..................................................... 425
4.4.3.1. Function ................................................................. 425
4.4.3.2. General Format ...................................................... 425
4.4.3.3. Syntax Rules .......................................................... 425
4.4.3.4. General Rules ........................................................ 425
4.4.4. The REWRITE Statement .............................................. 427
4.4.4.1. Function ................................................................. 427
4.4.4.2. General Format ...................................................... 427
4.4.4.3. Syntax Rules .......................................................... 427
4.4.4.4. General Rules ........................................................ 427
4.4.5. The USE Statement ....................................................... 428
4.4.5.1. Function ................................................................. 428
4.4.5.2. General Format ...................................................... 428
4.4.5.3. Syntax Rules .......................................................... 428
4.4.5.4. General Rules ........................................................ 428
4.4.6. The WRITE Statement ................................................... 429
4.4.6.1. Function ................................................................. 429
-
Contents
7830 7709002 xv
4.4.6.2. General Format ..................................................... 429
4.4.6.3. Syntax Rules ......................................................... 429
4.4.6.4. General Rules ....................................................... 430
4.5. Example ................................................................................. 433
4.5.1. Source Program ............................................................. 433
4.5.2. Generated Report .......................................................... 438
4.6. Sequential File Assignment ................................................... 439
4.6.1. Non-Symbiont Files ....................................................... 439
4.6.1.1. Assignment Examples .......................................... 439
4.6.1.2. COBOL Program Links ......................................... 439
4.6.1.3. Device Independency for ANSI Tape Files ........... 439
4.6.1.4. Device Independency for Sequential DISC
Files .................................................................. 440
4.6.2. Symbiont Files ............................................................... 440
4.6.2.1. Assignment Rules ................................................ 440
4.6.2.2. COBOL Program Links ......................................... 440
4.6.3. Alternate Symbiont Files ............................................... 440
4.6.3.1. Assignment Rules ................................................ 440
4.6.3.2. Assignment Examples .......................................... 440
4.6.3.3. COBOL Program Links ......................................... 441
Section 5. Relative I-O
5.1. General ..................................................................................... 51
5.1.1. Function ........................................................................... 51
5.1.2. Level Characteristics ....................................................... 51
5.1.3. Language Concepts ........................................................ 51
5.1.3.1. Organization ............................................................ 51
5.1.3.2. Access Modes ........................................................ 52
5.1.3.3. Current Record Pointer ........................................... 52
5.1.3.4. IO Status ............................................................... 52
5.1.3.4.1. Status Key 1 ................................................... 52
5.1.3.4.2. Status Key 2 ................................................... 53
5.1.3.4.3. Valid Combinations of Status Keys 1
and 2 .......................................................... 53
5.1.3.5. The INVALID KEY Condition ................................... 54
5.1.3.6. The AT END Condition ............................................ 54
5.2. Environment Division ............................................................... 55
5.2.1. INPUTOUTPUT Section ................................................. 55
5.2.1.1. The FILECONTROL Paragraph ............................. 55
5.2.1.1.1. Function ......................................................... 55
5.2.1.1.2. General Format .............................................. 55
5.2.1.2. The File Control Entry ............................................. 55
5.2.1.2.1. Function ......................................................... 55
5.2.1.2.2. General Format .............................................. 55
5.2.1.2.3. Syntax Rules .................................................. 55
5.2.1.2.4. General Rules ................................................. 56
5.2.1.3. The IOCONTROL Paragraph ............................... 57
5.2.1.3.1. Function ......................................................... 57
5.2.1.3.2. General Format .............................................. 57
5.2.1.3.3. Syntax Rules .................................................. 57
-
Contents
xvi 7830 7709002
5.2.1.3.4. General Rules ................................................. 58
5.3. Data Division ............................................................................. 59
5.3.1. File Section ...................................................................... 59
5.3.2. Record Description Structure........................................... 59
5.3.3. The File DescriptionComplete Entry Skeleton ............. 59
5.3.3.1. Function ................................................................... 59
5.3.3.2. General Format ........................................................ 59
5.3.3.3. Syntax Rules .......................................................... 510
5.3.4. The BLOCK CONTAINS Clause ..................................... 510
5.3.4.1. Function ................................................................. 510
5.3.4.2. General Format ...................................................... 510
5.3.4.3. Syntax Rules .......................................................... 510
5.3.5. The DATA RECORDS Clause ......................................... 510
5.3.5.1. Function ................................................................. 510
5.3.5.2. General Format ...................................................... 510
5.3.5.3. Syntax Rules .......................................................... 510
5.3.5.4. General Rules ........................................................ 510
5.3.6. The LABEL RECORDS Clause ....................................... 511
5.3.6.1. Function ................................................................. 511
5.3.6.2. General Format ...................................................... 511
5.3.6.3. Syntax Rules .......................................................... 511
5.3.6.4. General Rules ........................................................ 511
5.3.7. The RECORD CONTAINS Clause .................................. 511
5.3.7.1. Function ................................................................. 511
5.3.7.2. General Format ...................................................... 511
5.3.7.3. General Rules ........................................................ 511
5.3.8. The VALUE OF Clause ................................................... 512
5.3.8.1. Function ................................................................. 512
5.3.8.2. General Format ...................................................... 512
5.3.8.3. Syntax Rules .......................................................... 512
5.3.8.4. General Rules ........................................................ 512
5.4. Procedure Division .................................................................. 513
5.4.1. The CLOSE Statement ................................................... 513
5.4.1.1. Function ................................................................. 513
5.4.1.2. General Format ...................................................... 513
5.4.1.3. Syntax Rules .......................................................... 513
5.4.1.4. General Rules ........................................................ 513
5.4.2. The DELETE Statement ................................................. 514
5.4.2.1. Function ................................................................. 514
5.4.2.2. General Format ...................................................... 514
5.4.2.3. Syntax Rules .......................................................... 514
5.4.2.4. General Rules ........................................................ 514
5.4.3. The OPEN Statement .................................................... 515
5.4.3.1. Function ................................................................. 515
5.4.3.2. General Format ...................................................... 515
5.4.3.3. Syntax Rules .......................................................... 515
5.4.3.4. General Rules ........................................................ 515
5.4.4. The READ Statement ..................................................... 517
5.4.4.1. Function ................................................................. 517
5.4.4.2. General Format ...................................................... 517
5.4.4.3. Syntax Rules .......................................................... 517
5.4.4.4. General Rules ........................................................ 518
-
Contents
7830 7709002 xvii
5.4.5. The REWRITE Statement .............................................. 519
5.4.5.1. Function ................................................................ 519
5.4.5.2. General Format ..................................................... 519
5.4.5.3. Syntax Rules ......................................................... 520
5.4.5.4. General Rules ....................................................... 520
5.4.6. The START Statement .................................................. 521
5.4.6.1. Function ................................................................ 521
5.4.6.2. General Format ..................................................... 521
5.4.6.3. Syntax Rules ......................................................... 521
5.4.6.4. General Rules ....................................................... 521
5.4.7. The USE Statement....................................................... 522
5.4.7.1. Function ................................................................ 522
5.4.7.2. General Format ..................................................... 522
5.4.7.3. Syntax Rules ......................................................... 522
5.4.7.4. General Rules ....................................................... 522
5.4.8. The WRITE Statement .................................................. 523
5.4.8.1. Function ................................................................ 523
5.4.8.2. General Format ..................................................... 523
5.4.8.3. Syntax Rules ......................................................... 523
5.4.8.4. General Rules ....................................................... 523
5.5. Relative IO File Assignment ................................................. 525
5.5.1. Assignment Examples .................................................. 525
5.5.2. COBOL Program Links .................................................. 525
Section 6. Indexed I-O
6.1. General ..................................................................................... 61
6.1.1. Function ........................................................................... 61
6.1.2. Level Characteristics ....................................................... 61
6.1.3. Language Concepts ........................................................ 61
6.1.3.1. Organization ............................................................ 61
6.1.3.2. Access Modes ........................................................ 62
6.1.3.3. Current Record Pointer ........................................... 62
6.1.3.4. IO Status ............................................................... 62
6.1.3.4.1. Status Key 1 ................................................... 62
6.1.3.4.2. Status Key 2 ................................................... 63
6.1.3.4.3. Valid Combinations of Status Keys 1
and 2 .......................................................... 64
6.1.3.5. The INVALID KEY Condition ................................... 64
6.1.3.6. The AT END Condition ............................................ 64
6.1.4. Information Statistics ...................................................... 65
6.1.4.1. Function .................................................................. 65
6.1.4.2. Calling Format ......................................................... 65
6.1.4.3. Syntax Rules ........................................................... 65
6.1.4.4. General Rules ......................................................... 65
6.1.4.5. DataItem Format ................................................... 66
6.2. Environment Division ............................................................... 68
6.2.1. INPUTOUTPUT Section ................................................. 68
6.2.1.1. The FILECONTROL Paragraph ............................. 68
6.2.1.1.1. Function ......................................................... 68
6.2.1.1.2. General Format .............................................. 68
-
Contents
xviii 7830 7709002
6.2.1.2. The File Control Entry .............................................. 68
6.2.1.2.1. Function .......................................................... 68
6.2.1.2.2. General Format ............................................... 68
6.2.1.2.3. Syntax Rules ................................................... 68
6.2.1.2.4. General Rules ................................................. 69
6.2.1.3. The IOCONTROL Paragraph .............................. 610
6.2.1.3.1. Function ........................................................ 610
6.2.1.3.2. General Format ............................................. 610
6.2.1.3.3. Syntax Rules ................................................. 610
6.2.1.3.4. General Rules ............................................... 611
6.3. Data Division ........................................................................... 612
6.3.1. File Section .................................................................... 612
6.3.2. Record Description Structure......................................... 612
6.3.3. The File DescriptionComplete Entry Skeleton ........... 612
6.3.3.1. Function ................................................................. 612
6.3.3.2. General Format ...................................................... 612
6.3.3.3. Syntax Rules .......................................................... 613
6.3.4. The BLOCK CONTAINS Clause ..................................... 613
6.3.4.1. Function ................................................................. 613
6.3.4.2. General Format ...................................................... 613
6.3.4.3. General Rules ........................................................ 613
6.3.5. The DATA RECORDS Clause ......................................... 613
6.3.5.1. Function ................................................................. 613
6.3.5.2. General Format ...................................................... 613
6.3.5.3. Syntax Rules .......................................................... 614
6.3.5.4. General Rules ........................................................ 614
6.3.6. The LABEL RECORDS Clause ....................................... 614
6.3.6.1. Function ................................................................. 614
6.3.6.2. General Format ...................................................... 614
6.3.6.3. Syntax Rules .......................................................... 614
6.3.6.4. General Rules ........................................................ 614
6.3.7. The RECORD CONTAINS Clause .................................. 614
6.3.7.1. Function ................................................................. 614
6.3.7.2. General Format ...................................................... 614
6.3.7.3. General Rules ........................................................ 615
6.3.8. The VALUE OF Clause ................................................... 615
6.3.8.1. Function ................................................................. 615
6.3.8.2. General Format ...................................................... 615
6.3.8.3. Syntax Rules .......................................................... 615
6.3.8.4. General Rules ........................................................ 616
6.4. Procedure Division .................................................................. 617
6.4.1. The CLOSE Statement ................................................... 617
6.4.1.1. Function ................................................................. 617
6.4.1.2. General Format ...................................................... 617
6.4.1.3. Syntax Rules .......................................................... 617
6.4.1.4. General Rules ........................................................ 617
6.4.2. The DELETE Statement ................................................. 618
6.4.2.1. Function ................................................................. 618
6.4.2.2. General Format ...................................................... 618
6.4.2.3. Syntax Rules .......................................................... 618
6.4.2.4. General Rules ........................................................ 619
6.4.3. The OPEN Statement .................................................... 619
-
Contents
7830 7709002 xix
6.4.3.1. Function ................................................................ 619
6.4.3.2. General Format ..................................................... 619
6.4.3.3. Syntax Rules ......................................................... 619
6.4.3.4. General Rules ....................................................... 619
6.4.4. The READ Statement .................................................... 621
6.4.4.1. Function ................................................................ 621
6.4.4.2. General Format ..................................................... 621
6.4.4.3. Syntax Rules ......................................................... 621
6.4.4.4. General Rules ....................................................... 622
6.4.5. The REWRITE Statement .............................................. 624
6.4.5.1. Function ................................................................ 624
6.4.5.2. General Format ..................................................... 624
6.4.5.3. Syntax Rules ......................................................... 624
6.4.5.4. General Rules ....................................................... 624
6.4.6. The START Statement .................................................. 625
6.4.6.1. Function ................................................................ 625
6.4.6.2. General Format ..................................................... 625
6.4.6.3. Syntax Rules ......................................................... 626
6.4.6.4. General Rules ....................................................... 626
6.4.7. The USE Statement....................................................... 627
6.4.7.1. Function ................................................................ 627
6.4.7.2. General Format ..................................................... 627
6.4.7.3. Syntax Rules ......................................................... 627
6.4.7.4. General Rules ....................................................... 628
6.4.8. The WRITE Statement .................................................. 628
6.4.8.1. Function ................................................................ 628
6.4.8.2. General Format ..................................................... 628
6.4.8.3. Syntax Rules ......................................................... 628
6.4.8.4. General Rules ....................................................... 628
6.5. Indexed IO File Assignment ................................................. 631
6.5.1. Assignment Examples .................................................. 631
6.5.2. COBOL Program Links .................................................. 631
Section 7. Sort-Merge
7.1. General ..................................................................................... 71
7.1.1. Function ........................................................................... 71
7.1.2. Level Characteristics ....................................................... 71
7.1.3. Relationship with Sequential IO Module ....................... 71
7.2. Environment Division ............................................................... 72
7.2.1. INPUTOUTPUT Section ................................................. 72
7.2.1.1. The FILECONTROL Paragraph ............................. 72
7.2.1.1.1. Function ......................................................... 72
7.2.1.1.2. General Format .............................................. 72
7.2.1.2. The File Control Entry ............................................. 72
7.2.1.2.1. Function ......................................................... 72
7.2.1.2.2. General Format .............................................. 72
7.2.1.2.3. Syntax Rules .................................................. 72
7.2.1.2.4. General Rules ................................................. 72
7.2.1.3. The IOCONTROL Paragraph ............................... 73
7.2.1.3.1. Function ......................................................... 73
-
Contents
xx 7830 7709002
7.2.1.3.2. General Format ............................................... 73
7.2.1.3.3. Syntax Rules ................................................... 73
7.2.1.3.4. General Rules ................................................. 74
7.3. Data Division ............................................................................. 75
7.3.1. File Section ...................................................................... 75
7.3.2. The Sort-Merge File DescriptionComplete
Entry Skeleton ............................................................. 75
7.3.2.1. Function ................................................................... 75
7.3.2.2. General Format ........................................................ 75
7.3.2.3. Syntax Rules ............................................................ 75
7.3.3. The DATA RECORDS Clause ........................................... 75
7.3.3.1. Function ................................................................... 75
7.3.3.2. General Format ........................................................ 75
7.3.3.3. Syntax Rules ............................................................ 76
7.3.3.4. General Rules .......................................................... 76
7.3.4. The RECORD CONTAINS Clause .................................... 76
7.3.4.1. Function ................................................................... 76
7.3.4.2. General Format ........................................................ 76
7.3.4.3. General Rules .......................................................... 76
7.4. Procedure Division .................................................................... 77
7.4.1. The MERGE Statement ................................................... 77
7.4.1.1. Function ................................................................... 77
7.4.1.2. General Format ........................................................ 77
7.4.1.3. Syntax Rules ............................................................ 77
7.4.1.4. General Rules .......................................................... 78
7.4.2. The RELEASE Statement ............................................... 711
7.4.2.1. Function ................................................................. 711
7.4.2.2. General Format ...................................................... 711
7.4.2.3. Syntax Rules .......................................................... 711
7.4.2.4. General Rules ........................................................ 711
7.4.3. The RETURN Statement ................................................ 712
7.4.3.1. Function ................................................................. 712
7.4.3.2. General Format ...................................................... 712
7.4.3.3. Syntax Rules .......................................................... 712
7.4.3.4. General Rules ........................................................ 712
7.4.4. The SORT Statement ..................................................... 713
7.4.4.1. Function ................................................................. 713
7.4.4.2. General Format ...................................................... 713
7.4.4.3. Syntax Rules .......................................................... 713
7.4.4.4. General Rules ........................................................ 714
7.5. Examples ................................................................................ 718
Section 8. Report Writer
8.1. General ..................................................................................... 81
8.1.1. Function ........................................................................... 81
8.1.2. Language Concepts ......................................................... 81
8.1.2.1. LINECOUNTER ...................................................... 81
8.1.2.2. PAGECOUNTER .................................................... 81
8.1.2.3. Subscripting ............................................................. 82
8.1.3. Relationship with Sequential IO Module ........................ 82
-
Contents
7830 7709002 xxi
8.2. Data Division ............................................................................ 83
8.2.1. File Section ...................................................................... 83
8.2.2. Report Section ................................................................. 83
8.2.2.1. Report Description Entry ........................................ 83
8.2.2.2. Report Group Description Entry ............................. 83
8.2.3. The File DescriptionComplete Entry Skeleton ............. 83
8.2.3.1. Function .................................................................. 83
8.2.3.2. General Format ....................................................... 84
8.2.3.3. Syntax Rules ........................................................... 84
8.2.4. The Report DescriptionComplete Entry
Skeleton ...................................................................... 84
8.2.4.1. Function .................................................................. 84
8.2.4.2. General Format ....................................................... 85
8.2.4.3. Syntax Rules ........................................................... 85
8.2.4.4. PAGECOUNTER Rules ......................................... 85
8.2.4.5. LINECOUNTER Rules ........................................... 86
8.2.5. The Report Group DescriptionComplete
Skeleton ...................................................................... 87
8.2.5.1. Function .................................................................. 87
8.2.5.2. General Format ....................................................... 87
8.2.5.3. Syntax Rules ........................................................... 89
8.2.5.4. General Rules ....................................................... 810
8.2.6. The BLOCK CONTAINS Clause ..................................... 810
8.2.6.1. Function ................................................................ 810
8.2.6.2. General Format ..................................................... 810
8.2.6.3. General Rules ....................................................... 810
8.2.7. The CODE Clause.......................................................... 811
8.2.7.1. Function ................................................................ 811
8.2.7.2. General Format ..................................................... 811
8.2.7.3. Syntax Rules ......................................................... 811
8.2.7.4. General Rules ....................................................... 811
8.2.8. The CODE-SET Clause .................................................. 811
8.2.8.1. Function ................................................................ 811
8.2.8.2. General Format ..................................................... 811
8.2.8.3. Syntax Rules ......................................................... 812
8.2.8.4. General Rules ....................................................... 812
8.2.9. The COLUMN NUMBER Clause ................................... 812
8.2.9.1. Function ................................................................ 812
8.2.9.2. General Format ..................................................... 812
8.2.9.3. Syntax Rules ......................................................... 812
8.2.9.4. General Rules ....................................................... 812
8.2.10. The CONTROL Clause .................................................. 813
8.2.10.1. Function ................................................................ 813
8.2.10.2. General Format ..................................................... 813
8.2.10.3. Syntax Rules ......................................................... 813
8.2.10.4. General Rules ....................................................... 813
8.2.11. The DataName Clause ................................................. 814
8.2.11.1. Function ................................................................ 814
8.2.11.2. General Format ..................................................... 814
8.2.11.3. Syntax Rule ........................................................... 814
8.2.11.4. General Rules ....................................................... 814
8.2.12. The DENSITY Clause ..................................................... 814
-
Contents
xxii 7830 7709002
8.2.12.1. Function ................................................................. 814
8.2.12.2. General Format ...................................................... 814
8.2.12.3. Syntax Rule ........................................................... 814
8.2.12.4. General Rule .......................................................... 814
8.2.13. The GROUP INDICATE Clause ...................................... 815
8.2.13.1. Function ................................................................. 815
8.2.13.2. General Format ...................................................... 815
8.2.13.3. Syntax Rule ........................................................... 815
8.2.13.4. General Rules ........................................................ 815
8.2.14. The LABEL RECORDS Clause ....................................... 815
8.2.14.1. Function ................................................................. 815
8.2.14.1.1. General Format ............................................. 815
8.2.14.2. Syntax Rule ........................................................... 815
8.2.14.3. General Rules ........................................................ 815
8.2.15. The LINE NUMBER Clause ............................................ 816
8.2.15.1. Function ................................................................. 816
8.2.15.2. General Format ...................................................... 816
8.2.15.3. Syntax Rules .......................................................... 816
8.2.15.4. General Rules ........................................................ 816
8.2.16. The NEXT GROUP Clause.............................................. 818
8.2.16.1. Function ................................................................. 818
8.2.16.2. General Format ...................................................... 818
8.2.16.3. Syntax Rules .......................................................... 818
8.2.16.4. General Rules ........................................................ 819
8.2.17. The PAGE Clause ........................................................... 819
8.2.17.1. Function ................................................................. 819
8.2.17.2. General Format ...................................................... 819
8.2.17.3. Syntax Rules .......................................................... 819
8.2.17.4. General Rules ........................................................ 820
8.2.17.5. PAGE Regions Table ............................................. 822
8.2.18. The RECORD CONTAINS Clause .................................. 823
8.2.18.1. Function ................................................................. 823
8.2.18.2. General Format ...................................................... 823
8.2.18.3. General Rules ........................................................ 823
8.2.19. The REPORT Clause ...................................................... 823
8.2.19.1. Function ................................................................. 823
8.2.19.2. General Format ...................................................... 823
8.2.19.3. Syntax Rules .......................................................... 823
8.2.19.4. General Rules ........................................................ 824
8.2.20. The SOURCE Clause ...................................................... 824
8.2.20.1. Function ................................................................. 824
8.2.20.2. General Format ...................................................... 824
8.2.20.3. Syntax Rules .......................................................... 824
8.2.20.4. General Rule .......................................................... 824
8.2.21. The SUM Clause ............................................................ 824
8.2.21.1. Function ................................................................. 824
8.2.21.2. General Format ...................................................... 824
8.2.21.3. Syntax Rules .......................................................... 825
8.2.21.4. General Rules ........................................................ 825
8.2.22. The TYPE Clause ............................................................ 827
8.2.22.1. Function ................................................................. 827
8.2.22.2. General Format ...................................................... 827
-
Contents
7830 7709002 xxiii
8.2.22.3. Syntax Rules ......................................................... 827
8.2.22.4. General Rules ....................................................... 828
8.2.23. The VALUE OF Clause .................................................. 831
8.2.23.1. Function ................................................................ 831
8.2.23.2. General Format ..................................................... 831
8.2.23.3. Syntax Rules ......................................................... 831
8.2.23.4. General Rules ....................................................... 832
8.3. Procedure Division ................................................................. 833
8.3.1. The GENERATE Statement ........................................... 833
8.3.1.1. Function ................................................................ 833
8.3.1.2. General Format ..................................................... 833
8.3.1.3. Syntax Rules ......................................................... 833
8.3.1.4. General Rules ....................................................... 833
8.3.2. The INITIATE Statement ............................................... 835
8.3.2.1. Function ................................................................ 835
8.3.2.2. General Format ..................................................... 835
8.3.2.3. Syntax Rules ......................................................... 835
8.3.2.4. General Rules ....................................................... 835
8.3.3. The SUPPRESS Statement ........................................... 836
8.3.3.1. Function ................................................................ 836
8.3.3.2. General Format ..................................................... 836
8.3.3.3. Syntax Rules ......................................................... 836
8.3.3.4. General Rules ....................................................... 836
8.3.4. The TERMINATE Statement ......................................... 836
8.3.4.1. Function ................................................................ 836
8.3.4.2. General Format ..................................................... 836
8.3.4.3. Syntax Rules ......................................................... 836
8.3.4.4. General Rules ....................................................... 837
8.3.5. The USE Statement....................................................... 837
8.3.5.1. Function ................................................................ 837
8.3.5.2. General Format ..................................................... 837
8.3.5.3. Syntax Rules ......................................................... 837
8.3.5.4. General Rules ....................................................... 838
8.4. Report Format on File other than Printer File ........................ 839
8.5. Examples................................................................................ 840
8.5.1. Program 1 ...................................................................... 840
8.5.1.1. Input Data ............................................................. 840
8.5.1.2. Source Program .................................................... 841
8.5.1.3. Output Report ....................................................... 843
8.5.1.4. Relation Between Output Report and
Source Program................................................ 845
8.5.2. Program 2 ...................................................................... 847
8.5.2.1. Input Data ............................................................. 847
8.5.2.1.1. Source Program ........................................... 848
8.5.2.1.2. Output Report .............................................. 850
8.5.2.2. Relation Between Output Report and
Source Program................................................ 854
Section 9. Segmentation
9.1. General ..................................................................................... 91
-
Contents
xxiv 7830 7709002
9.1.1. Function ........................................................................... 91
9.1.2. Level Characteristics ........................................................ 91
9.2. General Description .................................................................. 92
9.2.1. Scope ............................................................................... 92
9.2.2. Organization ..................................................................... 92
9.2.2.1. Program Segments ................................................. 92
9.2.2.2. Fixed Portion ........................................................... 92
9.2.2.3. Independent Segments ........................................... 93
9.2.3. Segmentation Classification............................................. 93
9.2.4. Segmentation Control ...................................................... 94
9.3. Structure of Program Segments ......................