GC24 5073 2_DOS_System_Programmers_Guide_Sep71 2 DOS System Programmers Guide Sep71
GC24-5073-2_DOS_System_Programmers_Guide_Sep71 GC24-5073-2_DOS_System_Programmers_Guide_Sep71
User Manual: GC24-5073-2_DOS_System_Programmers_Guide_Sep71
Open the PDF directly: View PDF .
Page Count: 298
Download | |
Open PDF In Browser | View PDF |
File Number S360-50 Order No. GC24-5073-2 Systems Reference Library DO'S System Programmer's Guide This reference publication is intended primarily for the system programmer who is involved in making decisions relating to the components of the installation's supervisor, file organization and program design. To form a single publication, this manual brings together and expands upon information from many sources. Major topics discussed are: 1. Supervisor Planning Concepts 2. Data Management 3. Program Design 4. Debugging Aids For each major section, the Preface lists the most closely related publications. For a complete list of available publications, see the IBM System/360 and System/310 Bibliography, GA22-6822. DOS Third Edition (September 1971) This publication was formerly titled IBM System/360 Disk operating System: System Programmer's Guide. Although titles of some DOS publications (including this one) have been simplified, the change does not affect the contents of the publications. This edition replaces and obsoletes GC24-5073-1. Changes are continually made to the specifications herein; before using this publication in connection with the operation of IBM systems, consult the latest System/360 and System/370 SRL Newsletter, GN20-0360, for the editions that are applicable and current. summary of Amendments For a list of changes made in this edition, see page 3. Changes or additions to the text and illustrations are indicated by a vertical line to the left of the change. Requests for copies of IBM publications should be made to your IBM representative or to the IBM branch office serving your locality. I A form for readers' comments is provided at the back of this publication. If the form has been removed. comments may be addressed to IBM Laboratory, Publications Dept., P.O. Box 24, Uithoorn, Netherlands. @ Copyright International Business Machines Corporation 1969, 1970, 1971 Summary of Amendments for GC24-S073-2 NEW FUNCTIONS This edition documents support for these system control and service functions: • Directory Service Display (DSERV) • Linkage Editor (LNKEDT) • Independent Directory Read-In Area (IDRA) NEW DEVICES • On-Line Test Executive Programs (OLTEP) This edition also documents support for these new devices: • Job Accounting Interface • IBM 1255 Magnetic Character Reader • Data Set Security • IBM 2319 Disk Storage • ISAM Track Hold • IBM 3210 Console Printer-Keyboard • Private Core Image Library (PCIL) • IBM 3211 Printer • Label Cylinder Display (LSERV) • IBM 3215 Console Printer-Keyboard • Recovery Management Support (RMS) for System/370, which consists of Machine Check Analysis and Recording (MCAR) and Channel Check Handler (eCH) • Reliability Data Extractor (RDE) function for System/370 • RETAIN/370 for. system/370 • IBM 3420 Magnetic Tape Unit MISCELLANEOUS CHANGES Rewritten sections: The section on hard waits is expanded and rewritten. The section on COBOL ANS replaces the COBOL D section. A glossary is included. PROGRAM ENHANCEMENTS This edition also documents the enhancements to these programs: • Error Statistics by Tape ,Volume (ESTV) • Environmental Recording, Editing, and Printing (EREP) • DOS Stand-Alone Dump Generator (DUMPGEN) • Problem Determination Serviceability Aids (PDAID) • Forced End-of-Volume for Disk macro (FEOVD) ORGANIZATION OF PUBLICATION The manual has been reorganized and reformatted. Information in Appendixes A - L in the previous edition has been incorporated into the appropriate sections in this edition. The total publication has a General Contents, a Figure list, and an Index. Each section has a section Outline and a separate figure list. Figure numbers throughout the publication are in the form: Figure 1.3, where 1 is the section number and 3 is the figure number within that section. A tab in the upper right-hand corner of the beginning of each section identifies the section by number. 3 4 DOS System Programmer's Guide Preface This publication is divided into the following four major sections: Data Management DOS Data Management Concepts, GC24-3427. 1. supervisor Planning Concepts 2. Data Management 3. Program Design 4. Debugging Aids DOS Supervisor and I/O Macros, GC24-5037. DOS DASD Labels, GC24-5072. The supervisor Planning Concepts section describes system residence organization, some supervisor tables, optional supervisor facilities at a conceptual level, and presents guidelines for their implementation. The Data Management section explains the concepts of file organization and data manipulation at the physical and logical IOCS levels. The Program Design section contains suggestions for efficient programming. The topics discussed are link editing functions, overlay structure, self-relocating programs, checkpoint/restart facility, the 3211 Printer support, and macro writing. The Debugging Aids section contains aids for debugging problem programs written in assembler language, PL/I, FORTRAN, COBOL, and RPG. Tape Labels for BPS, BOS, TOS and DOS, GC24-5070. IBM System/360 Principles of Operation. GA22-6821. IBM System/370 Principles of Operation. GA22-7000. Program Design DOS System Control and Service, GC24-5036. DOS Supervisor and I/O Macros, GC24-5037. IBM System/360 Disk and Tape Operating systems, Assembler Language, GC24-3414. Debugging Aids Multitasking and link editing examples, and physical IOCS, STXIT support, self-relocating, and language translator sample programs are included. Closely related publications by section follow. Note: Although titles of some DOS publications have been simplified, the change does not affect the contents of the publications. Supervisor Planning Concepts DOS System Generation, GC24-5033. DOS System Control and service, GC24-5036. DOS Operating Guide, GC24-5022. DOS Messages, GC24-5074~ DOS OLTEP, GC24-5086. IBM System/360 Disk and Tape Operating systems, COBOL Programmer's Guide, GC24-5025. IBM Svstem/360 Disk and Tape Operating systems, PL/I Programmer's Guide, GC24-9005. IBM System/360 Disk Operating System, FORTRAN IV Programmer's Guide, GC28-6397. IBM System/360 Disk and Tape Operating systems, Report Program Generator Specifications. GC26-3570. IBM System/360 Disk and Tape Operating systems, Assembler Language, GC24-3414. DOS Messages, GC24-5074. For further information concerning terms referenced in this publication, see the IBM Data Processing Glossary, GC20-1699. Preface 5 6 DOS System Programmer's Guide Contents Introduction • • • • • • • • • • • • • • • 11 Section 1: Supervisor Planning Concepts • • • 13 System Residence Organization • • 15 SUPVR Macro • • • • • • 18 FOPT Macro • • • • 56 ALLOC Macro • • • • • • 84 84 IOTAB Macro DVCGEN Macro • • • 87 Section 2: Data Management • • • • • • • • 91 Concepts of Data Management • • • • • • 93 Physical Input/Output Control System (PIOCS) • • • • • • • • • • • • • • • • 99 Logical Input/Output Control system (LIOCS) • • • • • • • • • • • • • • • .111 Section 3: Program Design • Link Editing • • • • • • Self-Relocating Programs Linkage Editor Examples Checkpoint/Restart • • • IBM 3211 Printer Support Macro Writing • • • • • • • .139 • .141 • • .149 • • • • .154 • • • • • 166 .173 • • .175 Section 4: Debugging Aids • • • • .187 Gathering Documentation .189 Wait States • • • • • • • • .202 Debugging Assembler Programs .204 Debugging COBOL Programs·. • • • • 204 Debugging FORTRAN Programs • .234 Debugging RPG Programs • • • .243 Debugging PL/I Programs • • • • .255 Glossary • • • • • • • • • • • • • • • • 283 Index • • • • • • • • • • • • • • • • • • 289 Contents 7 / ;. OOS system Programmer's Guide Figures Figure 1.1. system Residence Organization • • • • • • • • • • • • • • Figure 1.2. MPS storage Map ••••• Figure 1.3. supervisor Calls (Part 1 of 2) • • • • • • • • • • • • Figure 1.4. Processing and I/O Requests Relationship • • • • • • Figure 1.5. First Example of Processing and I/O Requests with I/O Interrupts •••••••••• • • Figure 1.6. Second Example of Processing and I/O Requests with I/O Interrupts •••••••••• • Figure 1.7. system Communications Region (Part 1 of 5) • • • • • • • • • • Figure 1.8 Background Communications Region Extension (BGXTNSN) • • Figure 1.9. Tables for MICR DTF Addresses and Pointers • • • • • • • Figure 1.10. Example of Multitasking Priorities •••••••••••• Figure 1.11. Event Control Block (ECB) • • • • • • • • • • Figure 1.12. Resource Control Block (RCB) • • • • • • • • • Figure 1.13. Option Tables • Figure 1.14. I/O Table Interrelationship • • • • • Figure 1.15. Tape Error Block •• Figure 1.16. TEBV Table Showing status Block and Error Blocks Figure 1.17. Console Buffering Table and Work Areas ••••••••• • Figure 1.18. Example Using CCHAIN Support • • • • • • • • • • • • • • Figure 1.19. Processing of STXIT Condi ti ons •••••••••••••• Figure 1.20. STXIT Sample Program • • • Figure 1.21. Logical Unit Block (LUB) Table • • • • • • • • • • • • • • Figure 1.22. Job Information Block (JIB) Table • • • • • • • • • • • Figure 1.23. DASD File Protect Logic Flow • • • • • • • • • • • • • • • Figure 1.24. Disk Information Block (DIB) Table • • • • • • • • • • • Figure 1.25. Example of Dedicated peIL in a Multiple Partition Environment • • • • • • • • • • • • • • Figure 1.26. Example of PCIL in a Single Partition Environment ••••• Figure 1.27. Identification of SYSLNK Files • • • • • • • • • • • • • • Figure 1.28. Job Accounting Table • Figure 1.29. CHANQ, LUBID, REQID, LUBDSP, and TKREQID Tables • Figure 1.30. Physical Unit Block (PUB) Table • • • • • • • • • • • • Figure 1.31. Device Type Codes • Figure 2.1. Fixed Length Unblocked Record Format • • • • • • • • • • • • • 17 19 21 24 25 26 30 35 37 38 41 41 57 59 60 61 64 65 67 69 71 72 74 75 78 79 80 83 85 89 90' 94 Figure 2.2. Fixed Length Blocked Record Format • • • • • • • • 95 Figure 2.3. Variable Length Unblocked Record Format • • • • • • • • • • • • • 97 Figure 2.4. Variable Length Blocked Record Format • • • • • • • • • • • • • 98 Figure 2.5. I/O Operation Using PIOCS 101 Figure 2.6. Command Control Block (CCB) (Part 1 of 3) • • • • • • • 104 Figure 2.7. Format of the CCW .106 Figure 2.8. Flowchart for EXCP Coding Example • • • • • •• • • .109 Figure 2.9. Physical IOCS Sample Program • • • • • • • • • • • .110 Figure 2.10. Retrieving a Record Using Logical IOCS • • • • • • • • .112 Figure 2.11. Generated Name Structure for Logic Modules (Part 1 of 2) .116 Figure 2.12. DOS Relocatable Library Module Name Prefixes .118 Figure 2.13. DTF and Module Macro Relationships • • • • .118 Figure 2.14. Coding Example of DTF and Module Relationship • • • • • • • 119 Figure 2.15. Logical IOCS Imperative Macros and DTFs • • • • • • • • • • • • 120 Figure 2.16. Logical IOCS Imperative Macros and Devices • • • • • '. • 121 Figure 2.17. Direct Access Address Chaining • • • • • • • • • • • • • • • .127 Figure 2.18. DASD Address Formats • • • 128 Figure 2.19. Example of Track Index .130 Figure 2.20. Example of Track Index after Addition to File. • • • • • .131 Figure 2.21. File Organization on a Disk/Tape System • • • • • • • • • • • • 135 Figure 2.22. Indexed Sequential Versus sequential File Organization • • 137 Figure 3.1. Linkage Editor System Flow 142 Figure 3.2. Module Dependency • • • • • 148 Figure 3.3. Overlay Tree Structure • • 148 Figure 3.4. Relocating Address Constants in a Calling List .151 Figure 3.5. Self-Relocating Sample Program • .. • • • • • • • • .153 Figure 3.6. Using Checkpoint Facility on Disk • • • • • • • • • • • • • • 169 Figure 3.7. Procedure for Building Tape Repositioning Tables • • • • • • • 170 Figure 3.8. Procedure for Building DASD Operator Verification Table .172 Figure 3.9. Format of the Checkpoint Header/Trailer Records •••• .172 Figure 3.10. 3211 Error Status Indicator Bits in the CCB • • • • .175 Figure 3.11. Operand Field Formats • • 176 Figure 3.12. Keyword Macro Instruction • • • • • • • • • • .176 Figure 3.13. Positional Macro Instruction • • '. • • • • • • • • 1 77 Figure 3.14. Macro Instruction with Prototype • • • • • • • • • • • • • • • 177 Figures 9 Figure 3.15. Mixed Macro Instruction .177 Figure 3.16. Mixed-Mode Definition • • 177 Figure 3.17. Sublist Illustration • • 179 Figure 3.18. Format of Globals and Locals • • • • • • • • • • • .180 Figure 3.19. Format of SETA Instruction • • • • • • • • • • .180 Figure 3.20. Format of SETB Instruction • • • • • • • • • • .180 Figure 3.21. Format of SETC Instruction • • • • • • • • • • • • 181 Figure 3.22. Concatenation and Generated Coding • • • • • • • • • • .182 Figure 3.23. Conditional Branch Instruction • • • • • • • • • • • .182 Figure 3.24. Unconditional Branch Instruction • • • • • • • • • • • • • .183 Figure 3.25. Assembly No Operation Instruction • • • • • • • • • • .183 Figure 3.26. Macro Definition Exit Instruction • • • • • • • • • • • .184 Figure 3.27. MNOTE Instruction • • • • 184 • • .184 Figure 3.28. Sample MNOTE Figure 3.29. Sample MSG Macro • .185 Figure 3.30. sample MSG Coding .186 Figure 4.1. SDR Communications Region (Part 1 of 2) • • • • • • • • • • • • .190 Figure 4.2. Machine Check Recording and Recovery (MCRR) Linkage Table .192 Figure 4.3. RMS Linkage Area (RASLINK) 193 10 DOS ,system Programmer's Guide Figure 4.4. First Part of Program Information Block (PIB) Table • • 195 Figure 4.5. PIB Flag Expansions • • • • 196 Figure 4.6. Second Part of Program Information Block (PIB) Table • • • • • 197 Figure 4.7. Causes for Message 05041 (Cancel Code X' 21') . . . . . . . . . . 2 0 0 Figure 4.8. Low Core Error Bytes • • • 203 Figure 4.9. COBOL Sample Program (Part 1 of 27) ............207 Figure 4.10. FORTRAN Sample Program (Part 1 of 8) • • • • • • • • • • • • • 235 Figure 4.11. Using RPG Pointers to DTF 243 Figure 4.12. Halt Indicator (HO) Analysis Aid ••••••••• .244 Figure 4.13. RPG Sample Program (Part 1 of 10) • • • • • • • • • • • • • • • 245 Figure 4.14. PL/I Program Structure • • 255 Figure 4.15. PL/I Storage Areas • • • 256 Figure 4.16. Entry Point Table .257 Figure 4.17. Object Time Core Usage .258 Figure 4.18. Library Work Space • • • • 259 Figure 4.19. Communications Area Switches • • • • • • • • • • • • • • • 260 Figure 4.20. Dummy DSA and DSA Layout 260 Figure 4.21. Block Description .261 Figure 4.22. DSA Chaining • • • • • • • 262 Figure 4.23. PL/I Consecutive File DTF-A Appendage • • • • • • • • • • • • 263 Figure 4.24. PL/I Regional File DTF-A .263 Figure 4.25. PL/I sample Program (Part 1 of 18) • • • • • • • • • • • • .265 Introduction As a system progranuner~ you make decisions involving the components of your installation's supervisor, file organization, program design, and so forth. From time to time, you may be called upon to advise other programmers concerning DOS. In order to assist you in this task, this publication brings together and expands upon information from many sources. It is divided into four major sections: supervisor Planning Concepts, Data Management, Program Design, and Debugging Aids. The Supervisor Planning Concepts section is of interest to the person(s) responsible for tailoring the IBM-supplied Disk Operating system to meet the needs of the installation. This section describes in detail optional supervisor facilities available under DOS. Using the information presented in this section together with the information on main storage requirements and implementation procedures found in the DOS system Generation listed in the Preface, the system progranuner can decide whether or not to include a particular facility within the installation's supervisor. Guidelines for implementing these facilities at system generation time are also presented. The Data Management section is of interest to the person(s) responsible for choosing the type of file organization best suited for an application. This section discusses data management concepts, the advantages and disadvantages of each type of file organization (sequential, direct access and indexed sequential) and criteria for choosing the best file organization and retrieval method. In addition, data manipulation is described at both the physical and logical IOCS levels. Detailed information for coding at the physical IOCS level is included. This section also defines the macros for implementing logical IOCS and describes the interrelationships of the DTF and logic module generation macros. The Program Design section is of interest to the person(s) responsible for program design and imp1ementation. The Disk Operating System offers the programmer a great deal of flexibility in the generation of his system and in its operation. This section discusses effective use of the linkage editor and the checkpoint/restart facility. In addition, system programming techniques such as macro coding, overlay structure and self-relocating programs are discussed. The IBM 3211 Printer support is also discussed. The Debugging Aids section is of interest "to both the application and system programmer. This section describes system action on a cancel condition, gives register conventions for following program flow, describes the types of documentation to be gathered for debugging purposes and the action to be taken when a hard wait or program loop is encountered. Problem determination aids are briefly described. Aids for debugging problem programs written in assembler language, COBOL, FORTRAN, PL/I and RPG are given. r-----------------------------------------,I Note: In case of difference between thel conventions given in this manual I for control program functions andl those appearing in IBM-supplied I DOS component publications (such I as guides for language I translators, sorts, utilities, I specifications manuals, etc). I observe the specific restrictions I of the component. I _________________________________________ JI Introduction 11 • 12 DOS System Programmer's Guide r Section 1: Supervisor Planning Concepts Section Outline System Residence Organization • • • • IPL (Cylinder 0, Track 0, Records 1 and 2) • • • • • • • • • • • • • Volume Label (Cylinder 0, Track 0, Record 3) • System Directory (Cylinder 0, Track 1) • • • • • • • • • System Work Area (Cylinder 0, Tracks 2, 3 and 4) • • • • Transient Directory (Cylinder 0, Track 5) • • • • • • • • • • • • • Open Directory (Cylinder 0, Track • 15 • 15 • 15 15 • 15 • 15 6) • • • • • • • • • • • • Library Routine Directory (Cylinder 0, Track 7) Foreground Program Directory (Cylinder 0, Track 8) •••• Phase Directory (Cylinder 0, Track 9) • • • • • • • • • • Core Image Library Directory Core Image Library • • • • • • Relocatable Library Directory Relocatable Library • • • • • Source Statement Library Directory Source statement Library • • Label Information Cylinder • SUPVR Macro • • • • Multiprogramming Support (MPS) Partitioning • • • Control Method • • • • • Task Selection • • • • • System Considerations • • • • Concurrent Peripheral Operation (CPO) •••••••••• Operational Considerations • • • • programming Considerations • • • • American National Standard Code for Information Interchange (ASCII) Support • • • • • • • • • • • System Considerations • • • • System Generation Guidelines • • • Magnetic Ink Character Recognition Support (MICR) • • • • • • • system Considerations Asynchronous Processing (AP) system Considerations Multitasking Macro Usage • Subtask Initiation and Normal Termination • • • • • • • • • • • ATTACH Macro Considerations • • • DETACH Macro Considerations • Resource Protection • • ENQ Macro Considerations • • 15 15 16 • 16 16 • 16 • 16 • 18 • 18 • 18 18 • 18 18 • 20 20 • 20 • 27 27 • 27 • 28 28 • 28 • 29 36 • 36 38 • 38 39 • • • • • 39 39 40 41 42 DEQ Macro Considerations • • • Intertask Communication • POST Macro Considerations • • • • • Summary of Multitasking Considerations • • • • Multitasking Examples • • ATTACH Macro Example • • • • DETACH Macro Example • • ENQ/DEQ and RCB Macros Examples • • POST Macro Example • • WAITM Macro Example • • • • • • • • STXIT AB Macro Example • • • • • • • Track Hold and Reentrant Modules Example • • • • • • • • • • • FOPT Macro • • • • • • • • • • • • • • • Operator Communications Support (OC) • Operational Considerations • • Interval Timer Support (IT) •••• • Program Check support (PC) • • Tape Error Recording • • • • • • Seek separate Support (SKSEP) • Physical Transient OVerlap Support (PTO) •••••••••••••••• Console Buffering Support (CBF) • Independent Directory Read-In Area (IDRA) • • • • • • • • • • • • • • • • System Generation Considerations • • Command Chaining support (CCHAIN) •• Track Hold support (TRKHLD) ••••• supervisor Considerations • • • • • LIOCS Considerations • • • • • • • • Abnormal Termination Support (AB) STXIT Macro Considerations • • Multiple Wait support (WAITM) • Multiple Wait Considerations • DASD File Protect Support (DASDFP) • • Mode of Operation • • • • • • • • • System Files On Disk Support (SYSFIL) Considerations When Using System Files on Disk • • • • • • • • Private Core Image Libraries • • • system considerations • • • • • System Generation Guidelines • • • • Job Accounting Interface Support • Programming Considerations • • System Generation Guidelines • • • • ALLOC Macro • • • • • • • • System Considerations • • • • • IOTAB Macro • • • • • • • • • • • Job Information Block (JIB) ••••• Channel Queue (CHANQ) • • • • • Determining Size of the CHANQ • DVCGEN Macro • • • • • • • • • • • • • • Channel Rescheduling Considerations • Section 1: supervisor Planning Concepts 42 42 42 43 45 45 41 48 51 52 53 55 56 56 56 56 58 58 62 62 63 64 64 64 65 65 66 67 67 70 70 70 70 74 75 76 76 81 81 81 82 84 84 84 84 84 84 87 87 13 J Section Figures Figure 1.1. System Residence Organization • • • • • • • • • • • • • • Figure 1.2. MPS storage Map ••••• Figure 1.3. supervisor Calls (Part 1 of 2) • • • • • • • • • • • • Figure 1.4. Processing and I/O Requests Relationship • • • • • • • Figure 1.5. First Example of Processing and I/O Requests with I/O Interrupts •••••••••• Figure 1.6. Second Example of Processing and I/O Requests with I/O Interrupts •••••••••• • Figure 1.7. System Communications Region (Part 1 of 5) • • • • • • • • • • Figure 1.8 Background Communications Region Extension (BGXTNSN) •••••• Figure 1.9. Tables for MICR DTF Addresses and Pointers • • • • • • • • • Figure 1.10. Example of Multitasking Priorities •••••••••••••• Figure 1.11. Event Control Block (ECB) • • • • • • • • • Figure 1.12. Resource Control Block (RCB) • • • • • • • • • Figure 1.13. Option Tables • • • • • • Figure 1.14. I/O Table Interrelationship • • • • • • • • Figure 1.15. Tape Error Block •• Figure 1.16. TEBV Table Showing Status Block and Error Blocks • • • Figure 1.17. Console Buffering Table and Work Areas ••••••••• • Figure 1.18. Example Using CCHAIN Support • • • • • • • • • • • • • • Figure 1.19. Processing of STXIT Conditions •••••••••••••• Figure 1.20. STXIT Sample Program • • • Figure 1.21. Logical Unit Block (LUB) Table • • • • • • • • • • • • • • Figure 1.22. Job Information Block (JIB) Table • • • • • • • • • • • Figure 1.23. DASO File Protect Logic Flow • • • • • • • • • • • • • • • Figure 1.24. Disk Information Block (OIB) Table • • • • • • • • • • • Figure 1.25. Example of Dedicated PCIL in a Multiple Partition Environment • • • • • • • • • • • • Figure 1.26. Example of PCIL in a Single Partition Environment • Figure 1.27. Identification ofSYSLNK Files • • • • • • • • • • • • • • Figure 1.28. Job Accounting Table • • • Figure 1.29. CRANQ, LUBID, REQID, LUBDSP, and TKREQID Tables • • Figure 1.30. Physical Unit Block (PUB) Table • • • • • • • • • • • Figure 1.31. Device Type Codes •• 14 DOS System Programmer's Guide 17 19 21 24 25 26 30 35 37 38 41 41 57 59 60 61 64 65 67 69 71 72 74 75 78 79 80 83 85 89 90 To assist you in planning a supervisor tailored to meet the nee9s of your installation, this section presents the organization of a disk resident system as received from Program Information Department (PID), describes optional supervisor facilities at a conceptual level, and presents guidelines for their implementation. Those optional facilities requiring special consideration are described in the order in which they appear as parameters within the supervisor generation macros. For information on the other optional supervisor facilities, see the DOS system Generation listed in the Preface. System Residence Organization Figure 1.1 describes the organization of the DOS disk resident system. The disk resident system may be on an IBM 2311 Disk Storage Drive, an IBM 2314 Direct Access Storage Facility, or an IBM 2319 Disk Storage Facility. The organization of the disk pack is as follows: system Work Area (Cylinder 0, Tracks 2, 3 and 4) This 3-track area is reserved as a work area for the librarian programs and linkage editor. The format of the records in the librarian area depends on the program using the area at a specific time. Transient Directory (CYlinder 0, Track 5) This single track directory contains entries for the A- and B-transient routines that are located in the core image library. The entries in this directory are taken from the core image library directory. The core image library phases referenced in this directory have phase names prefixed by $$A (A-transients) or $$B (B-transients). This directory has a maximum capacity of 144 entries for the 2311, or 270 entries for the 2314/2319. Track format is identical to the core image library directory. IPL (Cylinder 0, Track 0, Records 1 and 2) Open Directory (Cylinder 0, Track 6) This area contains the IPL bootstrap program. Volume Label (Cylinder 0, Track 0, Record 11 The volume label contains the address of the Volume Table of Contents (VTOC) established when the pack was initialized. System Directory (Cylinder 0, Track 1) This directory consists of five records that make up the system master directory, Records 1 through 4 are 80 bytes in length. Record 1 contains information describing the core image library and directory. Records 2 and 3 contain the starting address of the relocatable library directory and the source statement library directory, respectively. Record 4 is not used. Record 5 is the IPL loader program ($$A$IPL2). This single track directory contains entries for the LIOCS open phases located in the core image library. The entries in this directory are taken from the core image library directory. The core image library phases referenced in this directory have phase names prefixed by the characters $$BO. This directory has a maximum capacity of 144 entries for the 2311, or 270 entries for the 2314/2319. Library Routine Directory (CYlinder 0, Track 7) This single track directory contains entries for frequently used core image library phases, such as job control, linkage editor, and so forth. The entries in this directory are taken from the core image library directory. The core image library phases that are placed in this directory have phase names prefixed by a $ (for example, $LNKEDT). This entry has a maximum capacity of 144 entries for the 2311, or 270 entries for the 2314/2319. section 1: supervisor Planning Concepts 15 Foreground Program Directory (Cylinder 0, Track 8) • Phase name • Loading address This single track directory contains entries for the foreground program phases located in the core image library. The entries in this directory are taken from the core image library directory. The core image library phases referenced in this directory have phase names prefixed by the characters FGP. This directory has a maximum capacity of 144 entries for the 2311, or 270 entries for the 2314/2319. • Number of blocks • Entry point • Starting disk address in the core image library • Length of last block Core Image Library Phase Directory (cylinder 0, Track 9) This single track directory contains entries for the phases of the current BG problem program. The entries in this directory are constructed by job control before each job step is executed in the background partition only. They are taken from the core image library directory. The phase naming conventions that permit the use of the phase directory are: 1. All program names must be unique in the first four characters. 2. The first four characters of the name of each phase of a program must be identical to the first four characters of the program name. All eight characters of the first phase name must be identical to the program name. Example: WXVZPROG WXVZPROG - phase 1 WXVZPH1 - phase 2 WXVZPH2 - phase 3 The maximum capacity of this directory is 144 entries for the 2311 or 270 entries for the 2314/2319. The core image library consists of five or more tracks, depending on the allocation specified by the user. For the 2311, each track contains two blocks with a maximum capacity of 1728 bytes. For the 2314/2319', each track contains four blocks with a maximum capacity of 1688 bytes~ The number of programs (phases) and the size of each program to be contained in the core image library dictates the number of cylinders that must be allocated. Each program starts with a new block and only the last block of a program can contain less than 1728 bytes of data for the 2311 or 1688 bytes of data for the 2314/2319. Note: A phase is an overlay of a mUltiphase program or a complete program if not multiphase. Relocatable Library Directory This directory consists of one or more tracks, depending on the allocation specified by the user. It contains two types of information: 1. System directory information for the relocatable directory and library. This information occupies the first five entries of the first record in the relocatable directory. 2. An entry that describes each module in Core Image Library Directory This directory consists of one or more tracks, depending on the allocation specified by the user. It contains one entry for each of the phases in the core image library. the relocatable library and contains: a. Module name b. Note: A phase is an overlay of a multiphase program or a complete program if not multiphase. Total number of text-record blocks required to contain this module c. Starting disk address of the first text-record of this module Each directory entry describes one phase in the core image library and contains: d. Change level identification. 16 DOS System Programmer's Guide STARTING DISK ADDRESS COMPONENT NO. BB CC HH R IPL Bootstrap Record 1 ($A$IPLl) 00 00 00 1 IPL Bootstrap Record 2 ($A$IPLA) 00 00 00 2 1 NUMBER OF TRACKS (A Ilocat ion) R=REQUIRED O=OPTIONAL R R 1 Volume Lobel 00 00 00 3 R User Volume Label 00 00 00 4 0 00 00 00 00 00 00 00 00 01 01 01 01 1 2 3 4 R R R R IPL Retrieval Program ($$A$IPL2) 00 00 01 5 3 System Work Area (Librarian Area) 00 00 02 1 3 R 4 Transient Directory ($$A and $SB Transients) 00 00 05 1 1 R 5 Open Directory (SSBO) 00 00 06 1 1 R 6 Library Routine Directory ($ Phasenames) 00 00 07 1 1 R 7 Foreground Program Directory (FGP) 00 00 08 1 1 R 8 Phose Directory (For Problem Program Phases) 00 00 09 1 1 R 9 Core Image Library Directory 00 1 * R 10 Core Image Library 00 End of CI Directory Y +1 X 1 * R 11 Relocatable Library Directory 00 End of CI Library Z+l 00 1 * 0 12 Relocatable Library 00 End of RL Directory Y+l X 1 * 0 13 Source Statement Libra ry Directory 00 End of RL Library 00 Z+l 1 * 0 14 Source Statement Library 00 End of SS Directory Y+1 X 1 * 0 15 Volume Area File Definition Storage Area End of SS Library 00 Z+l 1 16 User Area End of Volume Area 00 Z+2 1 System Directory 2 Record Record Record Record 1 2 3 4 01 for 2311 00for2311 00 for 2314/ 1a for 2314/ 2319 2319 l 1 R 2311:10 2314/2319:20 * R 0 *Allocation Dependent On User Requirements X=Ending CC of the Preceding Directory Y = Ending HH of the Preceding Directory Z = Ending CC of the Preceding Library Figure 1.1. System Residence Organization section 1: Supervisor Planning Concepts 17 Relocatable Library The relocatable library consists of five or more tracks, depending on the allocation specified by the user. The number of modules and the size of each module to be contained in this library dictates the number of tracks that must be allocated. Each allocated track contains 9 blocks (2311) or 16 blocks (2314/2319), and each block has a fixed length of 322 bytes. Each module starts with a new block but not necessarily a new track. '(This directory consists of one or more / tracks, depending on the allocation specified by the user. It contains two types of information: 2. SUPVR Macro System directory information for the source statement directory and library. This information occupies the first five entries of the first record in the source statement directory. An entry that describes each book (see Note 1) in the source statement library and contains: a. A sublibrary prefix: any alphameric character, $, i, or except A and C (see Note 2). Q, b. Book name. c. Starting disk address of the first block of this book. d. Total number of blocks required to contain this book in the source statement library. e. Change level identification. Note 1: A book is a sequence of source language statements, in compressed card image format, accessed by a single name. Note 2: A and C are reserved for assembler and COBOL, respectively. Source Statement Library The source statement library consists of five or more tracks, depending on the allocation specified by the user. The number of books and the size of each book to be contained in this library dictates 18 DOS System Programmer's Guide Label Information Cylinder The label information cylinder (10 tracks for 2311 or 20 tracks for 2314/2319) contains background and foreground user and standard label information. Source Statement Library Directory 1. the number of tracks that must be allocated. Each track contains 16 blocks (2311) or 27 blocks (2314/2319), and each block has a fixed length of 160 bytes. Each book starts with a new block but not necessarily a new track. Each book in the source statement library contains compressed card images of the source language input to the assembler or language translators. A compressed card image can overflow from one block to another. MULTIPROGRAMMING SUPPORT (MPS) Multiprogramming is the ability to run multiple programs concurrently, provision for which must be included in the DOS supervisor at system generation time. Each program resides in a different area of main storage called a partition. The three problem program partitions are designated background (BG), foreground 1 (Fl), and foreground 2 (F2). The background partition must be at least 10K because job control runs in the background partition and requires 10K bytes of main storage. However, 14K allows faster assemblies and linkage editing. The remaining main storage is divided between the two foreground partitions. To satisfy the requirements for the storage protect special feature, these partitions must begin and end on 2K boundaries. Because the MPS supervisor requires a minimum of 8K and the background partition requires a minimum of 10K, MPS will not function on systems with less than 24K of main storage (see Figure 1.2). MPS operates under the principle that in most commercial installations, the CPU is heavily I/O bound. Much of the CPU running time is spent waiting for a printer, a reader or a punch to complete a previous operation before the subsequent one can be started. With MPS, when a partition becomes I/O bound (that is, it cannot continue until the completion of some I/O operation), a task selection routine in the MPS supervisor attempts to give CPU control to the next partition that is ready to run. Supervisor Nucleus I/O Tables and Information Blocks ,.--------., 80 Bytes (112 with Floating Point) Background Program Area 10K Minimum 0- F2 Save Area 88 Bytes (120 with Floating Point) Foreground 2 Program Area Multiple of 2K F1 Save Area@- 88 Bytes (120 with Floating POint) Foreground 1 Program Area Multiple of 2K General Registers 9 through 8 64 Bytes Figure 1.2. General Registers 9 through 8 64 Bytes MPS Storage Map Section 1: Supervisor Planning Concepts 19 The partition to which control is given is determined by a priority system. Fl has highest priority followed by F2 and BG. A partition cannot be interrupted by one of lower priority. When an Fl program is ready to run, the task selection routine seizes control from a program of lower priority. One of the disadvantages in such an arrangement is the possibility of a high priority program never relinquishing control to other partitions. This can happen if the high priority program has few I/O requests. In general, the program with the largest number of I/O operations or wait time should reside in the highest priority partition. A compute (CPU) bound program should reside in a low priority partition (for example, BG). Because the channel scheduler attempts to keep devices and channels busy asynchronously, it is an advantage for all programs to use SUfficient I/O G~eas to keep the channel queue stacked with requests. A lower priority partition is more likely to require multiple I/O areas to achieve this than is a higher priority partition. Partitioning Multiprogramming has been defined as a technique whereby two or more programs may operate concurrently, sharing system resources between them. The DOS multiprogramming support requires that such programs be co-resident in main storage. To achieve this, storage is divided into 3 sections termed partitions (BG, Fl, and F2). Each partition is capable of holding a distinct problem program. When a partition contains a program that is in course of execution, the partition is said to be active. When a partition does not contain such a program, or is not physically present in the system, then it is said to be inactive. Each partition is of fixed physical size and is defined by fixed boundaries. For this reason, DOS multiprogramming is termed 20 DOS System Programmer's Guide fixed partition multiprogramming,. Partition boundaries may be altered in any manner when all partitions are inactive (minimum background size is 10K). When any partitions are active. boundaries can be altered only if the lower limit of each active partition is unchanged and the size of each active partition is not reduced. Each partition is allotted its own unique storage protection key; for this reason the size of any partition must be an integral multiple of 2K. Thus, a program contained in anyone partition can read but not alter the contents of core locations contained in any other partition. Control Method Multiprogramming increases system efficiency by making better use of the available system resources than is possible in a single partition batched job environment. Multiprogramming support is written in such a way that the central processing unit does not enter the wait state if useful processing can be performed in any partition. Multiprogramming allows the input and output functions of one program to overlap with the processing functions of other programs. Task Selection A program yields control by issuing a supervisor call instruction to pass control to the supervisor routines. The SVC instruction contains a code that indicates its purpose. The most numerically significant of these codes in a multiprogramming context are those associated with input and output operations; therefore, only these codes are described. A complete list of DOS supervisor calls is given in Figure 1.3. SVC Function Macro Supported Dec. Hex. EXCP 0 0 Execute channel programs. FETCH 1 2 3 1 2 3 Fetch any phase. Fetch a logical transient (B-transient). Fetch or return from a physical transient (A - transient). LOAD 4 4 Load any phase. MVCOM 5 5 Modify supervisor communications region. CANCEL 6 6 Cancel a problem program or task. WAIT 7 7 Wait for a CCB or TECB. 8 8 Transfer control to the problem program from a logical transient (B - transient.) 9 9 Return to a logical transient (B - transient) from the problem program after an SVC 8. 10* A Set timer interval. 11 12 B C 13 D Return from a logical transient (B - transient). Logical AND (Reset) to second job control byte (displacement 57 in communications region). Logical OR (Set) to second job control byte (displacement 57 in communications region) . 14 E Cancel job and go to job control for end of job step. 15 F Same as SVC 0 except ignored if CHANQ table is full. STXIT (PC) 16* 10 Provide supervisor with I inkage to userls PC routine for program check interrupts. EXIT (PC) 17* 11 Return from userls PC routine. STXIT (IT) 18* 12 Provide supervisor with Iinkage to userls IT routine for interval timer interrupts. EXIT (IT) 19* 13 Return from userls IT routine. STXIT {OC} 20* 14 Provide supervisor with Iinkage to userls OC routine for external or attention interrupts (operator communications). EXIT {OC} 21* 15 Return from userls OC routine. 22* 16 23* 17 The first SVC 22 seizes the system for the issuing program by disabling multiprogram operation. The second SVC 22 releases the system {enables multi program operat ion} • Load phase header. Phase load address is stored at userls address. 24* 18 Provide supervisor with linkage to user·ls TECB and set timer interval. 25* 19 26* 27* 1A 1B Issue HALT I/O on a teleprocessing device, or HALT I/O on any device if issued by OLTEP. Val idate address limits. Specia I H 10 on teleprocessing devices. LBRET SETIME EOJ SETIME (Primari Iy used by ERP.) * = optional Figure 1.3. Supervisor Calls (Part 1 of 2) section 1: supervisor Planning Concepts 21 SVC Macro Supported Hex. 28* 1C Return from user's stacker select routine (MICR type devices only). 29* 10 Provide return from multiple wait macros WAITF and WAITM (except MICR type devices) • QWAIT 30* 1E Wait for a QTAM element. QPOST 31* lF Post a QTAM element. 32 33 34 20 21 22 (Reserved) Reserved for internal macro COMRG • Reserved for internal macro G ETIME . HOLD 35* 23 Hold a track for use by the requesting task onl y. FREE 36* 24 Free a track held by the task issuing the FREE. STXIT (AB) 37* 25 Provide supervisor with I inkage to user's AB routine for abnormal termination of a task. ATTACH 38* 26 Initialize a subtask and establish its priority. DETACH 39* 27 Perform normal termination of a subtask. It includes calling the FREE routine to free any tracks held by the subtask. POST 40* 28 Inform the system of the termination of an event and ready any waiting tasks. DEQ ' 41* 29 Inform the system that a previously enqueued resource is now avai lable. ENQ 42* 2A Prevent tasks from simultaneous manipulation of a shared data area (resource). 43* 44* 45* 46* 47* 48 49 50 51* 2B 2C 20 2E 2F 30 31 32 33 Provide supervisor support for external creation and updating of SDR records. Provide supervisor support for external creation of OBR records. Provide emulator interface. Provide OlTEP with the facility to operate in supervisory state. Provide return from wait multiple WAITF for MICR type device. (Reserved) (Reserved) Reserved for LlOCS error recovery. Return phase length at OlTEP request. EXIT (MR) * = optional Figure 1.3. 22 Function Dec. Supervisor Calls (Part 2 of 2) DOS system Programmer's Guide SVC Code 0 (EXCP) This code requests the supervisor to initiate an input or output operation. The address of a Command Control Block (CCB) located in the requesting program is also passed to the supervisor via register 1. This block contains information that describes the precise nature of the operation to be performed. When the supervisor receives the EXCP request but is unable to initiate the required operation, it places the request in a queue for later action. The traffic bit in the relevant CCB is then set 0 to whether or not an operation can be started when requested. The supervisor then returns control to the p~ogram that requested the operation. SVC Code 7 (WAIT) This code informs the supervisor that the program is unable to proceed further until a previously requested operation has been completed, and that the operation is still in progress because the relevant traffic bit is still set to O. The program is placed in the wait state. Note that the instructions immediately preceding the supervisor call instruction form a test of the traffic bit so that, if the traffic bit is set to 1, the supervisor call is bypassed. When the SVC 7 is recognized, the program return address is reduced so that the instructions generated by the WAIT macro will be issued. I When the supervisor recognizes an SVC 7 interrupt, it records that the program is in the wait state. The supervisor then gives control to the next partition of the highest priority that is ready to run. If such a partition does not exist, the supervisor causes the central processing unit to enter the wait state until an interrupt occurs. A program loses control to the supervisor whenever an interrupt occurs. Only the input/output interrupts are described in the following text because they are the most significant interrupts in a multiprogramming environment. When an input/output interrupt occurs, the supervisor identifies the operation in question and checks whether it has been satisfactorily performed. If it has, the traffic bit in the related CCB is set to 1; the owning partition is made ready to run, that is, if it was in a wait state it is removed from that state; and any further input/output operation pending for this channel or device is initiated. The task selection routine in the supervisor then gives control to the next partition of the highest system priority that is ready to run. The following three figures show the relationship between six different operations while operating under MPS. All three partitions are active. Figure 1.4 assumes that programs were initiated at some prior point in time in all three partitions. The first part of Figure 1.4 shows that foreground 1 has control of the CPU and is processing. At some point in time, the program in F1 returns control of the CPU to the supervisor by issuing an I/O wait (SVC 7). The supervisor goes through a task selection process, determines that foreground 2 is ready to run and gives CPU control to it. F2 processes its program until it requires I/O, and then returns control of the CPU to the supervisor by issuing an I/O wait (SVC 7). The supervisor goes through a task selection process, determines that F1 is not ready to run but the background is ready to run, and gives CPU control to the background. BG processes its program until it requires I/O and then returns control of the CPU to the supervisor by issuing an I/O wait (SVC 7). The supervisor goes through a task selection process, determines that no partitions are ready to run, and gives control of the CPU to a task called All Bound. This task loads a PSW that puts the system in the wait state with all interrupts enabled. Note that no I/O interrupts have occurred. section 1: Supervisor Planning Concepts 23 2 .Foreground 1 (Fl) 3 4 5 6 I Processing Waiting for I/o ~ompletion ~ I/O Wait* : I I I Foreground 2 (F2) I I Waiting for I/O Completion Background (BG) letion I I/O Wait* I I Task ISelectio Supervisor Task Selection I I j 5 Active State NOTES Inactive State I * I/O Wait means an SVC 7 is issued (WAIT Macro) Figure 1.4. 24 I All Bound System in Wait State I/O Interrupts Task Selection Processing and I/O Requests Relationship DOS system Programmer's Guide 2 Foreground 1 (Fl) J 3 4 5 U Waiting for I/O I I I I Foreground 2 (F2) Waiting for I/O Background (BG) Waiting for I/O Supervisor Waiting to be Selected I I \ j I I I I I Q ~ 1\ 1\ Waiting to be Selected I I Posting Traffic Bit and Performing Task Selection I I I I I I I I I I I I I I Fl BG F2 J All Bound System in Wait State I/O Interrupts I 1\ J J I/O INTERRUPT SEQUENCE 1. 2. 3. Figure 1.S. Flls I/O Interrupt Occurs BG IS I/O I nterrupt Occurs F2 1s I/O Interrupt Occurs First Example of Processing and I/O Requests with I/O Interrupts Figure 1.5 starts with all partitions waiting for I/O, and the system in the wait state with interrupts enabled. When the first I/O interrupt occurs, the supervisor I/O interrupt routine gets control of the CPU, and turns on the traffic bit in theCCB associated with the device causing the I/O interrupt (Fl partition). The supervisor task selection routine then gets control, determines that Fl is through waiting, and gives CPU control to it. Fl starts processing its program. An I/O interrupt occurs and control passes to the supervisor I/O interrupt routine. It turns on the traffic bit in the CCB associated with the device causing the I/O interrupt (BG partition). The supervisor task selection routine gets control, determines that Fl is still the highest priority program ready to run, and gives CPU control to it. Note that BG is still waiting, but now is ready to run because its I/O wait is complete. While Fl is processing, another I/O interrupt occurs and control passes to the supervisor I/O interrupt routine. It turns on the traffic bit in the CCB associated with the device causing the I/O interrupt (F2 partition). The supervisor task selection routine then gets control of the CPU, determines that Fl is still the highest priority program that is ready to run, and gives CPU control to it. Note that both BG and F2 are now ready to run, but control of the CPU is retained by the highest priority partition (Fl) until it issues an SVC or until one of the four other system interrupts occurs. Section 1: Supervisor Planning Concepts 25 3 2 I 4 5 6 7 I I I I Waiting for I/O Foreground 1 (F 1 ) Processing I I I I I Waiting for I/O Foreground 2 (F2) Waiting to be Reselected J I I I Waiting to be Reselected I Waiting for I/O Background (BG) Supervisor 1/ \ lot J J Posting Traffic Bit and Performing Task Selection I I System in Wa it State All Bound J I I I I I J I BG I/O Interrupt I J F2 Fl Jt-------'~~----I\~I\----------i5 I/O INTERRUPT SEQUENCE 1. BG IS I/O Interrupt Occurs 2. F2 1s I/O Interrupt Occurs 3. Flls I/O Interrupt Occurs Figure 1.6. Second Example of Processing and I/O Requests with I/O Interrupts Figures 1.4 and 1.5 show a simplified version of what actually occurs. In actual practice, the process time for F1 would be longer than F2 or BG, and the sequence of I/O interrupts would probably be staggered. Figure 1.6 starts with all partitions waiting for I/O, and the system in the wait state with interrupts enabled. When the first I/O interrupt occurs, the supervisor I/O interrupt routine gets control of the CPU, and turns on the traffic bit in the CCB associated with the device causing the I/O interrupt (BG partition). The supervisor task selection routine gets control, determines that the BG partition is the highest priority task ready to run, and gives CPU control to it. The BG partition starts processing with the instruction 6 bytes before the I/O wait (SVC 7). 26 DOS system Programmer's Guide I When the second I/O interrupt occurs, the supervisor I/O interrupt routine gets control of the CPU, and turns on the traffic bit in the CCB associated with the device causing the I/O interrupt (F2 partition). The supervisor task selection routine gets control of the CPU, determines that the F2 partition is now the highest priority partition ready to run, and gives CPU control to it. The F2 partition starts processing with the instruction 6 bytes before the I/O wait (SVC 7). When the third I/O interrupt occurs, the supervisor I/O interrupt routines gets control of the CPU, and turns on the traffic bit in the CCB associated with the device causing the I/O interrupt (F1 partition). The supervisor task selection routine gets control of the CPU, determines that the F1 partition is now the highest priority partition ready to run, and gives CPU control to it. The foreground 1 partition remains in control of the CPU until it issues an SVC or until one of the four other system interrupts occurs. system Considerations Any program that is process-bound (compute-bound) completely suppresses any event from taking place in any partition of lower priority, regardless of the utilization of channels and devices. Thus, if the program in the foreground 1 partition is process-bound, multiprogrammdng cannot take place because a partition of lower priority cannot get control. In general, a foreground program should never be process-bound in a multiprogramming environment. Because the slowest devices are those that are associated with unit recordequipment (e.g., card readers, card punches, line printers and terminals), unit record and teleprocessing devices in a multiprogramming environment should be associated with the partitions of highest system priority. In general, the slowest input/output devices should run with maximum efficiency, because loss of efficiency on such devices is more serious in terms of system throughput than on faster devices. Note: I/O bound programs with the slowest system devices should be allocated to the highest priority partitions. The efficiency of a low priority program depends on the quantity and frequency of processing time made available to it. The most advantageous high priority program (in terms of overall system efficiency) combines lengthy input and output operations with a minimum of processing. Every time an input/output interrupt occurs, it must be interrogated for all partitions of higher priority than the partition to which it relates. Therefore, a reduction in the number of such interrupts (which may be achieved by increasing blocking factors of tape and disk files), promotes greater multiprogramming efficiency because it lowers system overhead. Increased blocking factors, however, result in increased core storage requirements. Another important system consideration is the use of two input or output areas in connection with one file (double buffering>. Double buffering increases computer utilization by allowing the overlap of input/output operations with processing. Multiprogramming has the same purpose. In double buffering, input/output operations are overlapped with processing relating to the same program; in multiprog~amming, input/output operations are overlapped with processing relating to a different program. Therefore, the more efficiently double buffering operates in relation to a given foreground program, the less time will be freed for use by the background program. In a multiprogramming environment, it may prove more efficient in terms of total system throughput to dispense with double buffering for programs operating in foreground partitions. In most cases, main storage can be better applied to the accommodation of greater block sizes than to the accommodation of double input/output areas. Concurrent Peripheral Operation (CPO) The CPO (Concurrent Peripheral Operation) concept is the application of multiprogramming techniques to the basic utility operations of card-to-tape, tape-to-punch, tape-to-printer, and their disk equivalents. Such operations are performed in a separate storage partition. A typical CPO program is a file-to-file utility containing a minimum amount of processing. Blocking and deblocking operations and some data selection can be performed, but this is all. Thus, CPO fits the specifications for an efficient high priority program. A CPO program is normally associated with a unit record device and the greater part of its input/output time is likely to utilize subchannels of the multiplexor channel. Therefore, channel contention with other concurrent programs is greatly reduced. CPO is one of the most efficient practical applications of the multiprogramming technique. Operational Considerations Two methods used to initialize and operate programs in the foreground partitions are: 1. Batch Job Foreground (BJF): This method uses the job control program. Section 1: Supervisor Planning Concepts 27 The foreground partition(s) essentially operates like the background partition (i.e., batched processing automatic job-to-job transition). The foreground partition(s) must be a minimum of 10K. 2. Single Program Initiator (SPI): This method uses the IBM 1052 Printer-Keyboard for System/360 or the IBM 3210 or 3215 Console Printer-Keyboards for System/370 to initialize single programs in the foreground partition(s). When the single program is terminated (either under its own control by issuing an EOJ, DUMP or CANCEL macro, or through operator action, a program error or certain I/O failures), a terminating message is printed on the console and the foreground partition becomes inactive. To run the next single program in the foreground partition, the operator must again initialize it from the 1052, 3210, or 3215 console. The major advantage of SPI is that the foreground partition size can be a minimum of 2K bytes. Programming Considerations The output of the language compilers can be link-edited to run in any partition, provided enough core storage is available. In a system that supports both batched-job foreground and private core image libraries (see Private Core Image Libraries), the function of compiling can be run in the foreground partitions as well as the background partition, providing enough core storage is available in which to execute the compiler. The linkage editor can execute in any batched-job partition. A private core image library is required when executing the linkage editor in a foreground partition. system Generation Guidelines The multiprogramming facility is specified at system generation time by the MPS= keyword parameter in the SUPVR macro. MPS={~~} .BJFJ NO 28 This option automatically creates a background partition consisting of all available main storage above the supervisor and negates DOS system Programmer's Guide any and all multiple partition operation. NO is the assumed value. YES When yes is specified, one, two, or three problem program partitions may exist. The foreground partitions may only be initialized using the single program initiator (SPI). BJF Under this option, one, two, or three problem program partitions may exist and the foreground partition(s) may be controlled either by job control or the single program initiator (SPI). The parameter YES or BJF must be specified if the supervisor is to be generated to support QTAM. AMERICAN NATIONAL STANDARD CODE FOR INFORMATION INTERCHANGE (ASCII) SUPPORT In addition to processing EBCDIC data files, DOS can process magnetic tape files written in ASCII (American National Standard Code for Information Interchange), a 128-character, 7-bit code. The high-order bit in the System/360 8-bit environment is zero. ASCII tape files may be either unlabeled or labeled according to the specifications of the American National Standards Institute, Inc. (ANSI). System Considerations ASCII tape files may be processed in either a foreground or background partition. Because internal processing of ASCII files is performed in EBCDIC, the data is translated at I/O time. Input files containing ASCII data are translated to EBCDIC as soon as the record is read into the I/O area. Output files described as ASCII are translated from EBCDIC to ASCII just prior to writing the record. Two translate tables (providing for the conversion from ASCII to EBCDIC and from EBCDIC to ASCII) are generated at system generation time by specifying the ASCII=YES parameter in the SUPVR macro. These tables are located immediately before the Seek Address Blocks in the supervisor. The address of the ASCII-EBCDIC translate table is in locations 44-47 (decimal) of the communications region extension. Add 256 (decimal) to this table to get the address of the EBCDIC-ASCII translate table. The address of the communications region extension is in bytes 136-139 (decimal) of the communications region. Figures 1.7 and 1.8 show the system and background communications regions. When ASCII=NO is specified, or if the parameter is omitted or incorrectly specified, the translate tables are not generated. The system will then process EBCDIC files only. system Generation Guidelines YES To generate supervisor support for handling ASCII tape files, ASCII=YES must be specified in the SUPVR macro. ASCII={~~S} When YES is specified, the two translate tables are generated in the supervisor. The address of the first table (ASCII-EBCDIC) is inserted in each communication region extension to enable accessibility by any task in any partition. Section 1: Supervisor Planning Concepts 29 COMREG* Displacement hexadecimal Displacement decimal 0 8 OA OC 17 18 20 24 28 2C 0 8 10 12 23 24 UPSI Byte Job Name 36 40 Address of End Address Uppermost of Last Phase Byte of Phase Fetched or with Highest Loaded Ending Address 44 Problem Program Use 32 Highest Storage Address of the Partition XXXXXXXX XXX X Address of Address of PPBEG EOSSP Date XXXXXXXX D i spl acemen t hexadecimal Displacement decimal XX XX X XXXXXXXXXXX XXXX XXXX 2E 30 34 35 36 37 38 39 3A 3B 3C 3E r46 48 52 53 54 55 56 57 58 59 60 62 PIK (PI D) End of Storage Address Machine Confg. Byte System Confg. Byte XX XXXX X X Standard Language Translator I/O Options Dump, Log and ASCII Options Job Control Byte X X X Linkage Language Job Control Translator Duration Control Indicator Byte Byte Byte X " X Label Area Length XX Disk Address Address of of Label FOCL Cylinder X XX XX ~ ... Job Control Switches Displacement hexadecimal Displacement decimal ~O 42 44 46 48 4A 4C 4E 4F 04 66 68 70 72 74 76 78 79 Address of LUB Line Count for SYSLST System Date LlOCS C6mm. Bytes Address of 1st Part of PIB Table ID Number of Last Checkpoint XX X XXXXXXXXX XX XX XX Displacement hexadecimal Displacement decimal Address of PUB Address of FAVP XX XX Address Address Address Address of of of of TEB FICL NICL JIB XX XX 88 90 92 60 62 64 66 68 6A 6C 6E 96 98 100 102 104 106 108 110 Length of LUB ID Queue = No. of Channel Queue Entries Address of Disk Information Block (DIB) Address of PC Option Table less 8 bytes Address of Error Recovery Block XX Address of IT Option Table less 8 bytes XX XX Address of OC Option Table less 8 bytes XX Key of Program with Timer Support Address of the LUBID Queue XX XX XX 70 7C 7E 80 84 86 112 ·124 126 128 132 134 Address of BG Comm. Region Option Indicator System Config· uration Byte 2 Pointer to Comm. Region Extension X X XXXX Supervisor Constants Address of 2nd Part of PIB Table Address of MICR DTF Table (PDTABB) Address of QTAM Vector Table XXXXXXXXXXXX XX XX XXXX XX Displacement values illustrated can be used to access the listing and/or the key that follows the figure. The key offers more detailed information about each area when necessary. 30 5C 94 * The address of the communications region is in fixed location X'14' - X'17'. Figure 1.7. 5A 5E XX Displacement hexadecimal Displacement decimal XX XX 58 System Communications Region (Part 1 of 5) DOS System Programmer's Guide 87 88 135 136 Logical Transient Key XX Key to Communications Region Displacements: MM/DD/YY or DD/MM/YY obtained from the job control date statement. Format controlled by COMREG + 53 (System Configuration Byte, date convention bit 0). Address of the problem program area. Address of the beginning of the problem program area. Y (EOSSP)=Y (PPBEG) if the storage protection option has not been selected. Y (EOSSP) equals the first main storage location with a storage protection key of 1, if storage protection is supported. User area. If seek separation option is specified, bytes 12 and 13 are used at IPL time for the address of the seek address block. User program switch indicator. Job name set by the job control program from information found in the job statement. Address of the uppermost byte of the problem program area as determined by the IPL program (Clear storage routine determines the address, ENDRD routine of $$A$IPL2 stores it.), or the address of the uppermost byte of the partition as determined during processing of the ALLOC statement. Address of the uppermost byte of the last phase of the problem program fetched or loaded. The initial va lue (as shown) is overlaid by the first fetch or load to the problem program area. Highest ending main-storage address of the phase among all the phases having the same first four characters as the operand on the EXEC statement. For the background partition only, job control builds a phase directory of these phases. The address value may be incorrect if the program loads any of these phases above its Iink-edited origin address. If the EXEC statement has no operand, job control places in this location the ending address of the program just link-edited. Length of the problem program label area. Program Interrupt Key - PIK (if asynchronous processing is not supported): Value is equal to the displacement from the start of the PIB table to the PI B for the task. OR Partition Identifier - PID (if asynchronous processing is supported): Value is hex 10, 20, or 30 to identify the partition in which a maintask or a subtask is running. (See the communications region extension, displacement 18, for the PIK in an asynchronous processing supervisor.) First byte - always zero. Second byte - contains the key of the program that was last enabled for interrupts, or the partition identifier in an AP supervisor. Task *AII Bound BG *F2 *F1 Attn Rtn Quiesce I/O Supervisor PIK (PID) Value X'OO' X'lO' X'20' X'30' X'40' X'50' X'60' *These tasks do not exist in a non - MPS supervisor. ~ Logical end of main storage address. Figure 1.7. system Communications Region (Part 2 of 5) ) section 1: supervisor Planning Concepts 31 Key to Communications Region Displacements: Machine Configuration Byte (Values set at supervisor generation time.) Bit 0: 1: 2: 3: 4: 5: 6: 7: 1 = Storage protect feature o = No storage protect feature 1 = Decimal feature No decimal feature 1 = Floating-point feature o = No floating-point feature 1 = Physical transient overlap option o = No physical transient overlap option 1 = Timer feature o = No timer feature 1 = Channel switching device 0= No channel switching device 1 = Burst mode on multiplex channel support 0= No burst mode on multiplex channel support Reserved o= System Configuration Byte Bit 0: 1: 2: 3: 4: 5: 6: 7: 6: ~~~~~~} (Date convention bit set at generation time by STDJC) 1 = Multiprogramming environment = Batch job environment 1 = DASD file-protect supported o = No file-protect support for DASD 1 = DASD SYSIN - SYSOUT 0= No DASD SYSIN - SYSOUT 1 = Teleprocessing o = No teleprocessing 1 = Batch job in foreground 0= No BJF 1 = Asynchronous processing 0= No AP 1 = Track Hold o = No Track Hold o This byte contains the standard language translator I/O options (set by the STDJC macro). Bit 0: 1: 2: 3: 4: 5: 6: 7: DECK option LIST option LlSTX option SYM option XREF option ERRS option CHARSET option Reserved 1 = yes, output object modules on SYSPCH 1 = yes, output source module listings and diagnostics on SYSLST 1 = yes, output hexadecimal object module listings on SYSLST (compilers only) 1 = yes, output symbol tables on SYSLST/SYSPCH 1 = yes, output symbolic cross reference list on SYSLST 1 = yes, output diagnostics on SYSLST (compilers only) 1 = 48, input on SYSIPT is 48 or 60 character set This byte contains the standard supervisor options for abnormal EOJ and control statement display, and the indicator for the presence of the ASCII-EBCDIC and EBCD IC-ASCII translation tables. Bit 0: 1: 2: 3: 4-6: 7: Figure 1.7. 32 Always on DUMP option Reserved LOG option Reserved ASCII option = yes, dump registers and storage on SYSLST = yes, I ist all control statements on SYSLST = yes, ASCII supported system Communications Region (Part 3 of 5) DOS System Programmer's Guide Key to Communications Region Displacement: Job control byte Bit 0: 1: 2: 3: 4: 5: 6: 7: 1 = Job Accounting Interface (JA) not supported 0= Job Accounting Interface (JA) is supported 1 = Return to caller on LlOCS disk open failure 0= Do not return to caller on LlOCS disk open failure 1 = Job control input from SYSRDR 0= Job control input from SYSLOG 1 = Job control output on SYSLOG 0= Job control output not on SYSLOG 1 = Cancel job o = Do not cancel job 1 = Pause at end-of-job step 0= No pause at end-of-job step 1 = SYSLOG is not a 1052 o = SYSLOG is a 1052 1 = SYSLOG is assigned to the same device as SYSLST 0= SYSLOG is not assigned to the same device as SYSLST linkage control byte Bit 0: 1: 2: 3: 4: 5: 6: 7: 1 = SYSLN K open for output o = SYSLN K not open for output 1 = $ or FG program phase deleted, renamed, or cataloged (flag bit for $MAINEOJ) 1 = Allow EXEC o = Suppress EXEC 1 = Catalog linkage editor output 0= Do not catalog linkage editor output 1 = Supervisor has been updated o = Supervisor has not been updated 1 = Executing in AUTOTEST mode o = Not executing in AUTOTEST mode 1 = R,eallocate or condense in progress 1 = Fetch $MAINEOJ at end of job to update system directory 0= Do not fetch $MAINEOJ at end of job for update Language processor control byte. This is a set of switches used to specify nonstandard language translator options. The switches within the byte are controlled by job control OPTION statements and when set to 1, override standard options. The format of this byte is identical to the stnadard option byte (displacement 54) with one exception: Bit 7 in this byte is used to indicate to LlOCS that the rewind a'nd unload option has been specified. Job duration indicator byte Bit 0: 1: 2: 3: 4: 5: 6: 7: Figure 1.7. 1 = Within a job condition job condition 1 = Dump on an abnormal end-of-job condition 0= No dump on abnormal EOJ 1 = Pause at EOJ step } '. . Set by Attention Routine for Job Control O = N 0 pause a t EOJ 1 = Job control output on SYSLST o = Output not on SYSLST 1 = Job is being run out of sequence with a temporary assignment for SYSRDR o = Conditions for 1 setting not met 1 = PCIL is being condensed o = PCIL is not being condensed Reserved 1 = Batch command just issued o = Condition for 1 setting did not occur o = Outside a system Communications Region (Part 4 of 5) Section 1: Supervisor Planning Concepts 33 Key to Communications Region Displacements: ~ Binary disk address of the volume label area (label cyl inder). ~ o o G G ~ G G G As illustrated (Figures for information blocks, I/O tables, and pointers begin at Figure 1.14 which refers to more detailed Figures). Set to the value nn specified in the LINES = nn parameter of the STDJC macro. The format of the system date contained within this field is determined by the IPL program from information supplied in the date convention byte (displacement 53). Bytes 85 - 87 contain the day count. Bytes reserved for use by LlOCS. Transient dump programs insert a key to indicate to the LlOCS end-of-volume routine, $$BCMT07, that it was called by a B-transient. Address of the first part of the program information block (PIB) table. (See Figures 4.4, and 4.5.) ID number of the last checkpoint. Temporary indicator of file protected DASD. Used at IPL time, when DASDFP is specified. Length of the LUBID queue (in bytes). This equals the number of channel queue entries. It can also be used to access the REQID, LUBDSP, and TKREQID queues: (See Figure 1.29.) Address of disk I/O position data. This is the starting address of the disk information block{DIB)table (See Figure I .24). Address of the beginning of the error recovery block. The error recovery block contains addresses of error recovery exits, error recovery queue information that can be used by physical transients routines, and defines storage for the error queue entries As illustrated (See Figure 1.13). Key of the program (BG, F2, or FI) that has timer support. As illustrated (See Figure I .29). Logical Transient Key (LTK) contains the same value as the PIK (PID) (Displacement 46) when the logical transient is requested. When the transient area is not in use, LTK is equal to zero. The SVC 2 routine sets the LTK. The SVC II routine resets the LTK. Supervisor constants: DOLLARBO SSKADR LTAREA (4 bytes) = C'$$BO' (5 bytes) = XL5'O' (3 bytes) = Adcon of LTSVPT, logical transient save pointer Address of second part of program information block (PIB) table (See Figure 4.6). Address of PDT ABB, table of DTF addresses for MICR support (See Figure I .9). Address of OT AM vector table (IJLQTT AD). Address of background communications region. Option Indicator Byte Bit 0: I = MCRR indicated for OBR writer No MCRR indicated for OBR writer I = EU interface acti ve o = EU interface not active I ~ Teleprocessing request o = No teleprocessing request I = Supervisor support for only 9-track tape 0= Supervisor does not support 9-track tape exclusively Reserved J = RETAIN/370 support generated 0= RETAIN/370 support not generated Reserved o= I: 2: 3: 4: 5: 6-7: System Configuration Byte 2 Bit 0: I = PCIL supported 0= PCIL not supported I -7: Reserved Pointer to communications region extension (See Figure 1.8). Figure 1.7. 34 System Communications Region (Part 5 of 5) DOS System Programmer's Guide BGXTNSN (See Note) o (Hexadecimal 8 OC 10 12 14 18 lC 20 o 8 12 16 18 20 24 28 32 4 Displacement) (Decimal 4 Displacement) CE Table Address XXXX Difference Track Hold Between 1st Table Address and 2nd Part (THTABAD) of PIB Table (PIBDtFF) 24 (Hexadecimal 28 Displacement) 40 36 (Decimal Displacement) OLTEP Linkage Address XXXX XXXX XXXX RMS Linkage Address (RASLlNK) XXXX ID of Task Owning LTA (LID) AB Termination Table Address -8 (ABPTR) XX XXXX ID of Task Running (PIK) Task Requester ID Tab Ie Address (TKIDPTR) XX XXXX 2C 30 34 38 3C 44 48 52 56 60 ASCII-EBCDIC Translation Table Address XXXX Address Used by QTAM (MVCFLD) XXXX SDR Communications Address (SDRTABLE) XXXX TEBV Table Address (TEBYTAB) XXXX JAI Common JAI Partition &SYSPARM (Reserved) Table Address Table Address Field (ACCTCOMN) (ACCTxx) Address XXX X XXXX XXXX XXXX Key to displacements: G CE Table Address. ~ Track Hold Table Address (THTABAD). ~ Difference between addresses of first part of PIB table and second part of G G ~ PIB table (PIBDIFF). Abnormal Termination Table Address (minus 8) (ABPTR). Identification (LID) of the task owning the Logical Transient Area. Contciins same value as PIK (displacement 18) when LTAis in use. Contains zero when LTA is not in use. Program Interrupt Key (PIK) if asynchronous processing is supported. Value is equal to the displacement of the start of the PIB table to the PIB of the main task or subtask being selected (running). First byte - zero Second byte - contains the displacement into the PIB table for a maintask or a subtask. Maintask - PIK value is hex 10, 20, or 30. Subtask - PIK value is hex 70, 80, 90, FO. ~ Task Requester ID Table Address (TKIDPTR). ~ MVCFLD address used by QTAM. ~ Statistical Data Recorder Tcible Address (SDRTABLE). ~ Tape Error Blocks by Volume Tobie Address (TEBVTAB). ~ Pointer to OLTEP Linkage Addresses ~ RMS Linkage Area Address (RASLlNK) B ASCII-EBCDIC Translation Table Address. ~ (Reserved) o JAI Common Table Address (ACCTCOMN) ~ JAI Partition Table Address (ACCTxx; where xx = BG, ~Address of&SYSPARM Field. Note: F2, or Fl). If communications regions are generated for the foreground partitions, the labels in those extensions will be F2XTNSN and F1XTNSN. The extensions, wherever used, are generated by the COMMNEX macro. Following the background extension (and immediately preceding the MCRR Linkage Table) is a six-byte area. The first four bytes are the address of the background save area (BGSAV), and the last two bytes are the value 4,096, used to restore base registers. Figure 1.8 Background Communications Region Extension (BGXTNSN) section 1: Supervisor Planning Concepts 35 MAGNETIC INK CHARACTER RECOGNITION SUPPORT (MICR) A Magnetic Character Reader, such as an IBM 1255, 1259, 1412, or 1419, can be attached to a channel for reading magnetically-inscribed data on checks and other banking documents. They differ mainly in document reading rates. The 1255 reads at speeds as high as 500 six-inch-Iong documents per minute on its Model 1, and 750 documents per minute on its Models 2 and 3; the 1259 reads at speeds as high as 600 six-inch-Iong documents per minute; the 1412, at speeds as high as 950 documents per minute; the 1419, at speeds as high as 1,600 per minute. Specific speeds depend on document length as well as on the program. instructions are provided. For multiple MICR processing, READ, CHECK, and WAITF macro instructions allow processing to continue as long as one of the files has documents ready for processing. Figure 1.9 shows the tables for MICR DTF addresses and pointers. System Generation Guidelines To specify supervisor support for MICR devices, the MICR= parameter must be included in the SUPVR macro. 1. If both 1412s and 1419s are present, specify MICR=1419. If 1255s or 1259s are to be supported, also specify MICR=1419. MICR=1419D indicates Dual Address Adapter 1419s. 2. 1419 support gives 1255/1259/1270/1275 capability. The 1270/1275 are optical reader/sorters. 3. If 1255/1259/1270/1275/1412/1419s are attached to the multiplexor channel, the PIOCS parameter BMPX=YES is not supported. 4. If MICR support is required on a Model 65, specify MODEL=65 in the CONFG macro. 5. For MICR support on selector channel, specify MRSLCH=YES in the PIOCS macro. system Considerations The DOS supervisor support allows operation of Magnetic Ink Character Recognition (MICR) devices in either a foreground or background area. An extension to the DOS supervisor monitors, by means of external interrupts, the reading of documents into a user-supplied I/O area (document buffer area). All MIC~ documents must be accessed through logical IOCS. Logical IOCS gives you the next sequential document and automatically engages and disengages the devices, as necessary, to provide a continuous stream of input. Detected error conditions and information are passed to you in each document buffer. The magnetic character readers are unique in that documents must be read at a rate dictated by the device rather than by the program. To ensure time for necessary processing (including determination of pocket selection) a MICR device generates an external interrupt at read completion of each MICR document. The supervisor gives highest priority to external interrupt processing. In an MPS system with MICR document processing, any partition (background or foreground) can use MICR devices. For programs with one MICR device, GET macro 36 DOS System Programmer's Guide MICR processing requires at least two I/O channels. If MICR devices are attached to the multiplexor channel, no burst mode devices are supported on the multiplexor channel. MICRs should be attached as the highest priority devices on the multiplexor channel. Single addressing 1412s or 1419s are supported on any selector channel, but device performance is maintained only if a selector channel is dedicated to a single MICR device. Also note that the Dual Address 1419 is not attachable to selector channels. In addition, MICR processing requires either the direct control feature or the external interrupt feature. The table of DTF addresses (PDTABB) contains six 8- byte entries; one for each external line of the direct control feature on the system. PDTABB Byte ---+- 0 + PDSTAT + 1 PDSTAT + 1 PDSTAT + 1 PDSTAT+l PDSTAT + 1 PDSTAT+l, NI NI NI NI NI NI 0 8 16 24 32 40 2 1 3 4 X'FE ' X'FD ' X'FB ' X ' F7 1 X'EF ' X'DF ' .9- ...!: ~ Q) s:: 3: 6 5 VI C> 0 au:: 7 DTF address for MICR: Device on line 7 Device on line 6 Device on line 5 Device on line 4 Device on line 3 Device on line 2 Background =10 Foreground 2 = 20 Foreground 1 = 30 • Bytes 0- 3 - - Contain an lAND I instruction that is executed in main I ine coding to turn off the external line status after its detection. PDSTAT + 1 contains one or more of the following interrupt codes: PSW Interrupt Code Bit External Interrupt Cause Interrupt Code (PSW Bits 26- 31)* nnnnnnnl nnnnnnln nnnnnlnn nnnnlnnn nnnlnnnn nnlnnnnn 31 30 29 28 27 26 External External External External External External signal signal siRnal signal signal signal 7 6 5 4 3 2 • Byte 4- - Contains the flag of the partition containing the DTF. • Bytes 5- 7 - - Contain the address of the DTF table. Table of pointers (PDTABA) to DTF addresses associated with the external interrupt line. The table contains the status in descend ing order from Bit 31 to Bit 26 of the external old PSW. PDTABA Byte~ + 0 8 16 24 32 40 48 56 0 1 2 3 4 5 00 00 00 00 00 00 00 00 7 6 I I 08 08 08 08 08 08 08 08 00 00 00 00 00 00 00 00 10 10 10 10 10 10 10 10 00 00 00 00 00 00 00 00 08 08 08 08 08 08 08 08 00 00 00 00 00 00 00 00 18 20 18 28 18 20 18 I *n =other external - interrupt cond itions. Bytes 126 and 127 (X'7E'- '7F') of the communications region contain the address of these tables. Label PDTABB identifies the first byte of the first table. Figure 1.9. Tables for MICR DTF Addresses and Pointers Section 1: supervisor Planning Concepts 31 ASYNCHRONOUS PROCESSING (AP) The asynchronous processing function, also known as multitasking, provides greater use of system resources at the partition level. Multitasking provides the ability to execute more than one program in a partition, that is, the ability to do multiprogramming within a partition (or in all three partitions) of the DOS system. Just as multiprogramming between partitions can increase the system throughput, multitasking can increase overlap of I/O activity and computer processing for a given job. To perform multiprogramming within a partition, the program must consist of a main program (main task) and one or more subprograms (subtasks). Because multitasking is a logical extension of the current task selection mechanism, a maximum of nine subtasks can exist in the system at any given time. These nine subtasks can all reside in one partition, or can be spread among the three available partitions. A total of 12 tasks (a task can be considered either a main task or a subtask) can be executed concurrently in the system. The subtasks share the same partition their associated main task. The main task initiates (attaches) execution of the subtasks. The ability of the main task to attach subtasks minimizes operator intervention. Storage within the partition may be allocated to the main task and its associated subtasks in any way desired by the user. Subtasks have the same storage protect key as the main task. ~ith When subtasks are attached to a given partition, they retain the priority of that partition. Priorities are also established within the partitions. The priority within a partition is determined by the order in which a subtask is initiated. The first subtask to be attached has the highest priority, and as each subsequent subtask is attached, it has the next highest priority, followed by the main task which has the lowest priority. When a subtask is attached, it receives control from the system before control is returned to the main task. See Figure 1.10 for an example describing priority structure in a multitasking environment. If the Fl partition has two attached subtasks, the F2 partition has four attached subtasks, and the BG partition has three attached subtasks (a maximum of nine subtasks), their priority would be as shown (with 1 being the highest priority and 12 the lowest priority). 38 DOS System Programmer's Guide A subtask can operate independently of its main task and has its own save area for registers. The subtask can communicate with other subtasks and main task via a set of macro instructions (see Intertask Communication). r----------------------T------------------, Partition I Priority I I ~----------------------+------------------~ I Fl I I Subtask 1 Subtask 2 Main Task I F2 I I I I Subtask 1 Subtask 2 Subtask 3 Subtask 4 Main task I I I 1 2 I I I I I 4 5 6 7 8 ~ I I I ~----------------------+------------------~ I I I I I ~----------------------+------------------~ I BG Subtask 1 I Subtask 2 Subtask 3 I IL _____________________ Main Task Figure 1.10. I 9 I I 10 I I 11 I JI I __________________ 12 ~ Example of Multitasking Priorities When a subtask is no longer required, it can be detached from the system. The subtask can either detach itself or be detached by its main task. When one or more subtasks are detached, subtasks with lower priorities receive the next highest priority. If a detached subtask is later attached, it becomes the lowest priority subtask in the partition, but it still has higher priority than the main task. system Considerations Under DOS there are additional optional components and specifications that greatly enhance multitasking operations. Track Hold: The track hold facility prevents two independent subroutines in the same partition or in two different partitions from simultaneously trying to update the same record or write a new record on the same track when processing DTFDA, DTFIS, and DTFSD files. When this facility is used, a second routine requesting an I/O operation on a track being held must wait for that track to be freed by the first routine. Because track hold is implemented by programming rather than hardware, all routines processing the same DASD files must use this facility to ensure proper protection. This facility can be used without specifying AP=YES and is specified at system generation time. See discussion of TRKHLD parameter under FOPT Macro for more information. Multiple Wait: Under DOS, a number of independent logical IOCS operations (requiring explicit waiting for completion) can be initiated before waiting for the completion of any particular operation. Once all logical IOCS operations have been initiated, you must determine the sequence in which you will wait for their completion. Once you wait for a particular operation, you no longer have control, even though one of the remaining operations completes before the one on which the wait occurs and useful processing could have been done. This can be avoided at the physical IOCS level, but requires some additional coding effort on your part. The multiple wait facility allows you to wait asynchronously for anyone of a number of I/O operations to complete at either the logical or physical IOCS level for the above situation. This facility provides increased I/O overlap processing and is specified at system generation time. See discussion of WAITM parameter under FOPT Macro for more information. Abnormal Termination: Under DOS, your program is canceled when certain error conditions occur. In many cases, it is desirable to perform certain termination functions (e.g., close files) to minimize any problems that may occur. The abnormal termination facility allows for these situations via a user exit. This function is specified at system generation time and implemented via the AB operand of the STXIT macro. When the supervisor determines that the task has been abnormally terminated, control passes to the task's abnormal termination routine. In this routine, you may close data files (such as an indexed sequential ADD) or perform other operations that are necessary to minimize any possible damage. Abnormal termination exits can be established for both main tasks and subtasks or, if desired, subtasks can share the coding of their main task's abnormal termination routine. It is strongly suggested that in the shared abnormal termination routine no I/O be performed. If I/O is attempted and causes cancelation, all tasks in the partition are canceled. Any abnormal termination within the abnormal termination routine causes the task (or job if in the main task) to be canceled without regard to an abnormal termination exit. This facility of sharing an abnormal termination routine can be used even if the multitasking function (AP=YES) is not used. See AB parameter under FOPT Macro for more explanation. Reentrant Modules: Reentrant modules for CDMOD, DAMOD, ISMOD, MTMOD, PRMOD, SDMOD, and DIMOD allow a module to be shared by the same device type DTFs in a multitasking environment. For example, one PRMOD can support several subtasks using multiple printers within a partition. One DAMOD can support several subtasks within a partition. MultitaskinqMacro Usage Although these four functions (asynchronous processing, track hold, mUltiple wait and abnormal termination) can be used independently, they are discussed under the heading where they are most frequently used. The multitasking macros are designed to handle three basic situations: subtask initiation and normal termination" resource protection and intertask communication. See Supervisor and I/O Macros listed in the Preface for a description of the macro formats·. Some examples using the multitasking macros are included. Subtask Initiation and Normal Termination Subtask initiation can only be performed by a main task that issues an ATTACH macro instruction. Normal subtask termination can be performed by either a main task or a subtask that issues a DETACH macro instruction. ATTACH Macro Considerations Only a main task can attach subtasks. A maximum of nine subtasks can be attached in the system at any given time. They can all reside in one partition or be spread among the three partitions in any combination. If a main task attempts to attach a tenth subtask to the system, a supervisor Event Control Block (SPVECB) is unposted (SPVECB+2, bit 0, set to zero), the address of the ECB is stored in general register 1 of the main task, and bit 0 of register 1 is set to 1 giving the register a negative value. The main task can test register 1 for a negative value and, if found, wait on register 1 until one of the nine subtasks is detached. Figure 1.11 illustrates the ECB. When a subtask is successfully attached, it has a higher priority than its main task. Therefore, control is passed to the subtask before it is returned to the main task. In addition, the registers of the subtask contain the same values as the Section 1: Supervisor Planning Concepts 39 registers of the main task (both the general registers and floating point registers if specified), with the following two exceptions: If a main task is canceled, all subtasks in that partition are canceled. DETACH Macro Considerations 1. 2. Register 1 of the subtask contains the address of the save area for the main task. Register 0 of the main task contains the address of the byte immediately following the save area of the subtask (save area+96 if no floating point registers, or save area+128, if floating point registers). The passing of the main task's registers to its attached subtask(s) is worth noting, because the subtask(s) can be under control of .and use the main task's base register without initializing it. In addition: 1. The subtask ID (a value from X'70'to X'FO') is stored in the subtask's save area (save area+88, if no floating pOint registers or save area+120, if floating point registers) 2. The address of the subtask's entry point is stored in the save area (save area+13),and 3. Byte 2 bits 0 and 1 of the subtask's ECB are set to 0 (unposted). You should store the subtask name in the first eight bytes of the save area to be used for subtask identification when messages are printed on SYSLOG. In certain instances, a routine to be attached may not be in main storage. In this case, the entry point could be the label of a FETCH or LOAD routine that fetches the desired routine into storage. The following conditions cause cancelation of a main task (or possibly a subtask). 1. A main task has not issued the ATTACH macro (issued by another subtask). 2. The subtask save area is not aligned on a doubleword boundary. 3. The save area of the subtask being attached is not within the partition. 4. The entry point of the subtask itself is not within the partition. 5. The ABSAVE save area, if any, is not within the partition. 6. The Event Control Block (ECB) of the subtask is not within the partition. 40 DOS system Programmer's Guide A main task can detach any subtask (within its partition), but a subtask can only detach itself. In addition, a subtask can be detached by issuing the CANCEL, EOJ and DUMP macros. If a subtask is detached, all pending I/O operations are completed before the DETACH operation is completed. In addition, any tracks being held by the subtaskjare freed. If the subtask has an ECB, the ECB is posted (ECB+2, bit 0 set to one) and any tasks waiting on the ECB are removed from wait state. The task with the highest priority then gains control. The supervisor ECB is also posted (SPVECB+2, bit 0 set to one) and any main task waiting on it is removed from wait state. Although a main task can detach a subtask, it is generally more desirable for a subtask to detach itself. The entire system could be put into wait state if two (or all three) main tasks attempted to attach more than the nine subtasks allowed by the system. The following two examples show what could happen if the main task is allowed to detach its subtasks. Example 1: All partitions attempt to attach five subtasks apiece. Each set of subtasks is independent and processing is such that each main task has a chance to attach a subtask before anyone main task has attached all its subtasks. The entire system could then be placed in wait state, because the main task is not able to get to the routine to detach a subtask when it has successfully completed (it is waiting to attach another subtask). Example 2: Placing one or two of the three partitions in wait state is another situation that could occur, if all partitions attempted to attach five subtasks each. The F1 partition may attach all five of the subtasks. F2 partition may attach four of its five subtasks, and the BG partition may not attach any of its subtasks and, therefore, be in wait state. The main task of the F2 partition would also be in wait state because it still has one more subtask to attach. These subtasks remaining to be attached have to wait until one or more of the attached subtasks are detached. In addition, if the five subtasks in the F2 partition are dependent upon each other, the entire F2 partition could also be in wait state. Thus, only the tasks in the F1 partition may be executing. The following conditions cause cancelation of a main task or a subtask: 1. The main pass the area (if the save 2. The main task detaches and the subtask is already canceling or canceled. a resource protected by an enqueue in one partition is not protected in another partition because an RCB is generated in its own partition and cannot be accessed by other partitions. Figures 1.11 and 1.12 show the ECB and RCB. task detaches and does not address of the subtask save a subtask detaches and passes area address, it is ignored). 3. The limits of the save area specified in the DETACH macro do not reside in the partition of the main task. If the main task is canceled, all subtasks within the partition are canceled. 4. The subtask 10 stored in the save area is not a valid subtask 10 (hexadecimal I 2. The second technique can only be applied to DTFDA, DTFIS, and DTFSD DASD files or those files you created using physical IOCS (EXCP/WAIT macros). This is the track hold facility previously discussed. In contrast to the first technique, track hold applies across partitions. 70-FO). In the last case, a check cannot be made if the value has been altered to that of another subtask 10. In this case, it would be possible for the wrong subtask to be detached because this is the only way the system can locate the task being detached. (This is also the reason why the main task must specify the save area of the subtask.) In addition, the system sets the invalid 10 to binary zeros. Resource Protection The resource may be a file, an I/O device, a DTF, a work area or I/O area, or a set of non-reentrant code, etc. In general, it is anything that has the possibility of being shared by two or more tasks. A means of protection has been provided so that two tasks sharing the same resource don't access the resource at the same time. I Figure 1.11. Event Control Block (ECB) I Figure 1.12. Resource Control Block (RCB) Resource protection can be accomplished in one of two ways, depending upon the resource to be protected. 1. The first technique applies to the types of resources just stated and requires three macro instructions (RCB, ENQ, DEQ). The RCB macro generates a Resource Control Block (RCB) that is associated with the resource to be protected, but is not necessarily a part of that resource. When a resource is to be protected, an ENQ macro must be issued to enqueue an RCB. This places a hold on the RCB associated with the resource until the enqueuing task releases the RCB by issuing a DEQ macro to dequeue the RCB. These resource protection macros apply only within a partition and not across partition boundaries. That is, Section 1: Supervisor Planning Concepts 41 ENQ Macro Considerations A resource can only be protected within a partition. Every subtask that enqueues a resource must have an ECB specified in its ATTACH macro (issued by the main task) and that ECB should not be used for any other purpose while a resource is enqueued. The address of the ECB is stored in the RCB. A main task does not require an ECB and has no means of specifying that it has an ECB (the address of which could be stored in the RCB). When a main task enqueues a resource, the ECB address field of the RCB is set to binary zeros which identifies the resource owner as being the main task. A task requesting use of a resource is either enqueued and executed or put into wait state if the resource has already been enqueued by another task (byte 0 of the RCB contains binary ones). In the latter case, the flag byte is turned on in the RCB (byte 4, bit 0 is set to one) and the ECB address of the current resource owner is stored in general register 1 of the task placed into wait state. The following conditions can cause cancelation of a task: 1. A subtask does not have an ECB. 2. A previous owner of a resource terminated without having dequeued the resource. (If the main task terminated, the entire partition was terminated.) 3. A task issued two consecutive ENQs for the same RCB without having issued an intervening DEQ. 4. The limits of the RCB specified in the ENQ do not reside in the partition of the enqueuing task. The following conditions cause cancelation of a task: 1. The RCB has the wait bit on in its flag byte (byte 4) and no waiting task which has been enqueued can be found for the RCB. This could be caused by the flag byte being inadvertently altered while a resource was enqueued. 2. A subtask does not have an ECB. 3. The limits of the RCB specified in the DEQ do not reside in the partition of the dequeuing task. Intertask Communication In certain situations, tasks may be dependent on other tasks within a partition. In these cases, macro instructions (POST, WAIT and WAlTH) have been provided to permit synchronization of tasks for intertask communication. To use these macros, each task must have an Event Control Block (ECB) associated with it. When a particular task is performing a function and other tasks are waiting for its completion, it can indicate completion via the ECB by issuing a POST macro instruction. The tasks waiting for the completion may indicate this by issuing the WAIT macro instruction, designating the ECB on which the waiting is to be done. If a task is waiting for completion of a number of events (in which the order of completion is of no importance), it can issue the multiple wait macro instruction (WAITM) designating a number of ECBs. POST Macro Considerations DEQ Macro Considerations A resource can only be dequeued within a partition. Only the current owner of a resource can dequeue that resource. When an RCB is dequeued, byte 0 is reset to binary zeros, and all tasks waiting for that resource are removed-from wait state. The task with the highest priority obtains control. If no other tasks are waiting for the RCB, control returns to the dequeuing task. 42 DOS System Programmer's Guide The tasks removed from wait state are those placed in wait state by ENQ, WAIT, or WAITM. When the SAVE parameter is omitted in the POST macro instruction, all tasks waiting on the specified ECB are removed from wait state. By specifying a SAVE parameter, only the task identified by the save area is removed from wait state. This parameter can be used for synchronizing the order in which tasks are to receive control. The synchronization technique prevents the priority task within a partition from gaining control. Be careful with this technique when the ECB to be posted is the ECB specified in the ATTACH macro and ENQ/DEQ macros are used, because DEQ also removes all waiting tasks from wait state. When the posting task dequeues, all tasks waiting for the RCB are removed from wait state. from each other. The ENQ, DEQ, and RCB macros offer protection of resources, but only if all subtasks enqueue and dequeue before using the resource. They do not protect against inadvertent coding errors. In addition, the user must be careful when using ENQ/DEQ. If a higher priority subtask dequeues an RCB and does not enter wait state before enqueuing the RCB again, a lower priority task does not gain control of that RCB on which it has also enqueued. Thus, the lower priority task has to wait until the higher priority task terminates, before it can enqueue the RCB. A similar situation exists if the posting task dequeues before posting. The DEQ removes all tasks waiting for the RCB from wait state. Then, if it issues a POST to a particular task, the POST acts as a NOP because task selection gives control to the highest priority task ready to use the cpu. Although the task being posted is removed from wait state, the posting task is still active. If the posting task issues another POST to the same or another ECB, all other tasks waiting on the posted ECB are removed from wait state. To avoid this situation, use a second ECB when synchronizing tasks. It is your responsibility to reset the wait bit in the second ECB that is to be posted (MVI ECB+2,X'OO'), so that tasks testing that ECB can be put in wait state. Access To Communications Region: Only one communications region exists in a batched-job partition. Therefore, i t is likely that only one task per partition has meaningful access to it. System Logical Units: Only one set of system logical units exist per partition (SYSLST, SYSRDR, etc). Therefore, interspersed usage by several independent tasks is not practical, although, if either the resource protection facilities or the intertask communication macros are employed, it can be done. If a task associated with the specified save area cannot be found, the post operation is ignored and control passes to the highest priority task that is ready to run. A task can be canceled if the ECB specified in the POST macro instruction does not reside within the partition. Operator Intervention: While operator intervention is minimized for subtask initiation, SYSLOG will probably be used by all tasks within all partitions. The additional number of messages possible on one SYSLOG could possibly increase the responsibility of the operator and require more careful operation than in the past. Summary of Multitasking Considerations Maximum Number of Tasks: A maximum of 9 subtasks can be attached to the system. They can all reside in one partition or be spread among the three partitions. Thus, a total of 12 tasks can be executed concurrently in the system. Subtask Priority: Each subtask must be initiated by a main task. A subtask has a higher priority than its main task. Subtask priority within a partition is determined by the order of attachment. The first subtask attachment has the highest priority in the partition, the next subtask has the second highest priority in the partition, etc. Of course, the priority of the partitions remains the same (i.e., Fl, F2, and BG). If the highest priority subtask is terminated and later reattached, it will then be the lowest priority subtask within the partition, but still higher in priority than its main task, or any subsequent subtask that may be attached within that partition. Storage Protection: Because subtasks are subprograms within a partition, they have the sam~ storage protect key as the main task. Therefore, the main task and its subtasks do not have storage protection STXIT Macro Usage: Subtasks may only provide their own AB and PC routines via the STXIT macro. IT and OC operations must be performed via the main task. An AB exit is not taken for a task when it is already in its AB routine (prevents looping on abnormal termination condition). The task is canceled. Checkpoint Consideration: can issue checkpoints. I Only main tasks Track Hold Facility: Files being shared on DASD are not protected unless the HOLD option is specified by the various users (only applies to DTFDA, DTFIS, DTFSD, and DTFPH files). Register Usage: Although a subtask has the register values (2-15) of its main task upon being attached, the registers cannot be used for passing information between tasks once attached. (It is possible for a task to access the register save areas of other tasks within its partition.) Process Bound Tasks Considerations: Because subtasks are executed in priority order, a process-bound task can degrade Section 1: supervisor Planning Concepts 43 performance of lower priority tasks, or in extreme cases, even prevent execution of lOwer priority tasks until it has terminated. as the cancel routines.) Therefore, when the abnormal termination routine is entered, you should dequeue all RCBs that the subtask could have enqueued. Task Synchronization: Task synchronization is normally performed by POST, WAIT, and WAITM macros. This can also be done by ATTACH/DETACH or ENQ/DEQ providing you are careful, particularly when intermixing POST, ENQ/DEQ, and ATTACH/DETACH macros. While POST may be used to free one waiting task, DEQ and DETACH can free all tasks waiting on the ECB posted, if the ECB is the same one specified in the ATTACH. If the subtask issues a DEQ for an RCB on which it has not enqueued, the DEQ is ignored and the supervisor returns to the subtask's abnormal termination routine. Resource Protection: The POST, WAIT, and WAITM macros are also used for resource protection, providing you are careful in your synchronization techniques. Resource contention: The problem of resource contention cannot be over emphasized in this system. It has already been pointed out that you can interlock two or more tasks, or even put the system into wait state when two or more partitions are concurrently attaching more than 9 subtasks or when two or more tasks (or partitions) are contending for the same sets of tracks while using track hold. In addition, a similar problem can exist when two or more tasks within a partition are enqueuing and dequeuing on the same set of RCBs. For example, if task A enqueues RCB 1 and task B enqueues RCB 2, task A is put in wait state when it attempts to enqueue RCB 2. The same is true when task B attempts to enqueue RCB 1. Neither task is able to get out of wait state to release the resource it has enqueued. This problem can be avoided by having each task, which shares common resources with other tasks, enqueue on the same resources in order. For example, task A enqueues on RCB 1 and then task B enqueues on RCB 1 (instead of RCB 2 first); task B goes into wait state. Task A can now enqueue on RCB 2 without entering wait state. When task A dequeues RCB 1, task B has the chance of enqueuing RCB 1 (providing task A does not enqueue RCB 1 again, before task B has a chance to reattempt its ENQ). Another possibility of task interlock is for two tasks to wait on ECBs, with each task assuming that the other task will post the ECB on which it is waiting. Subtask Cancelation: While the cancelation of a subtask frees tracks being held, and posts the subtask's ECB (as. specified in the ATTACH macro) it does not dequeue any RCBs enqueued by that subtask. (Cancelation of a subtask executes the DETACH routin~s of the supervisor as well 44 DOS system Programmer's Guide Wait Considerations: Although tasks can wait on ECBs to be posted by other tasks or on the ECBs of other tasks (in their own partition), they cannot wait on the CCB of another task when that task has initiated the I/O operation. This does not mean that two tasks cannot share a CCB as a resource. It only means that the system identifies the CCB with the task dOing the I/O operation. Therefore, only that task can be removed from wait state by the system. Any other task waiting on another task's CCB can only be removed from wait state by having the task that started the I/O operation issue a POST to the CCB. In this case, the CCB would function like an ECB. Also, note that the task doing the I/O operation must issue the POST macro after the WAIT macro rather than before the WAIT macro. Otherwise it would never enter the wait state or determine when the I/O operation is completed. Abnormal Termination: In all abnormal termination conditions where an exit is taken to an abnormal termination routine, the register values are stored in the ABSAVE save area before the appropriate error code is stored in the low-order byte of register O. To have this value available when looking at a storage dump, you should store (STC or ST) register 0 in another save area upon entry into the abnormal termination routine. You will find that the SVC code shown in the wOS04I ILLEGAL SVC-.,•• w message along with the error codes in register 0 will be helpful in tracing program errors. See Debugging Aids section for add1tional information on abnormal termination codes. System Generation Guidelines The multitasking facility is provided at system generation time by specifying AP=YES in the SUPVR macro. When AP=YES is specified, MPS=YES and WAITM=YES are implied. To implement the other facilities related to multitasking, the following additional specifications are required at system generation time: • For abnormal termination support, AB=YES must be specified in the FOPT macro. AP=YES in the SUPVR macro is not required to utilize this function,. • For multiple wait support, WAITM=YES must be specified in the FOPT macro. Although the multiple wait function can be used without specifying AP=YES, AP=YES cannot be used without specifying WAITM=YES. MULTITASKING EXAMPLES ATTACH Macro Example The normal procedure for attaching subtasks is as follows: 1. 2. MAINTASK BALR USING • • STXIT 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. MVC ATSTl ATTACH LTR BNM WAIT B ATST10K SUBTASKl MTABENO BCTR ST • • BALR USING ST STC C BE • • EQU • • 2,0 *,2 AB,MTABEND,MTSAVE SUB1SAV(8),SUB1NAME Initialize subtask 1 save area SUBTASK1,SAVE=ST1SAV,ECB=ST1ECB,ABSAVE=STlABSV 1,1 Test if ATTACH is successful ATST10K BR if successful (1) WAIT to retry ATTACH ATSTl BR to retry 0,0 Get end of subtask 1 save area 0,ST1SVEND Store ending address of subtask 1 save area 3,0 *,3 1,MTSVAR O,ABSVCOOE 1,=A(ST1ABSV) ST1ABENO Store address of main task save area Save ABTERM code Test if subtask 1 ABTERM BR if YES * 17. STlABENO 18. 19. ST1SAV OS OC 00 160'0' 20. 21. 22. ST1ABSV ST1ECB MTSVAR OC OC OC 90'0' FlO' F'O' 23. ST1SVENO O~ F'O' 24. 25. 26. SUB1NAME ABSVCOOE MTSAVE DC OC OS C'SUBTASK1' X'O' 90 Align on doubleword boundary Subtask 1 save area with floating point registers Subtask 1 AB save area Subtask 1 ECB Address of main task save area Ending address of subtask 1 save area Subtask 1 name Main task save area used by STXIT ) Section 1: supervisor Planning Concepts 45 Explanation for ATTACH Macro: Statement 3 initializes the subtask save area with the name of the subtask which is used for messages for subtask identification when messages are written on SYSLOG. statement 4 is the ATTACH of the subtask. SUBTASK1 is the entry point of the subtask, ST1SAV is the save area for the subtask, ST1ECB is its ECB, and ST1ABSV is the ABTERM save area for the subtask. In this case, the subtask is using the main task's abnormal termination routine. statements 5 and 6 test for a successful ATTACH. If the ATTACH was not successful (nine subtasks already attached), the main task waits until another subtask is detached and retries the ATTACH. If the ATTACH was successful, the main task stores the ending address of the subtask's save area for later reference, if necessary. The main task can then continue to do other processing. statement 11 is the entry point to the subtask. In this example, the subtask and the main task use different base registers. This may not be necessary, depending on program design. The subtask could have omitted the BALR and USING statements because addressability is available through the main task register (register 2). The values in the main task registers are passed to the task. Therefore, register 2 wou1d still be initialized. Statement 13 saves the address of the main task's save area for reference by the subtask (if it is necessary for the subtask to name the main task in the POST macro instruction). Statement 14 stores the ABTERM code when the abnormal termination routine is entered. This routine is shared by both the main task and subtask 1. Statements 15 and 16 determine which task abnormally terminated (ABTERM save area of the task in error is stored in register 1). Statement 18 aligns the save areas on a doubleword boundary. Statement 21 is the user-coded ECB for the subtask. c 46 DOS System Programmer's Guide DETACH Macro Example A subtask may detach itself or be detached by the main task. 1. MAINTASK BALR 2, 0 2. USING *,2 3. ATSTl • • ATTACH • 4. ATST2 ATTACH ST2,SAVE=ST2SAV,ECB=ST2ECB • • • DETACH • 5. ST1,SAVE=ST1SAV,ECB=ST1ECB • SAVE=ST1SAV 6. STl ST 1,MTSVAR1 7. 8. ST2 B ST ST1+4 1,MTSVAR2 9. 10. *DETACH • • • • Detach subtask 1 Subtask 2 DETACH Explanation for DETACH Macro: The main task attaches two subtasks. When subtask 1 completes processing, i t indicates this to the main task. The main task then detaches subtask 1 by issuing a DETACH macro and specifying the save area for subtask 1 (statement 5). When subtask 2 completes its processing, it detaches itself (statement 10). Note that an operand was not specified when subtask 2 detached itself, and that the comment was placed in a comments card (statement 9). The comment would have acted as an operand, resulting in an error. Section 1: Supervisor Planning Concepts 47 ENQ/DEQ and RCB Macros Examples EXAMPLE 1: When two subtasks share the same resource within a partition, they can use the resource protection macros as follows: 1. 2. MAINTASK 3. SUBTASKl 4. SBTASKlA 5. 6. 7. 8. SUBTASK2 9. 10. 11. SBTASK2A • • EQU • • ENQ BAL DEQ • • B • • EQU • • ENQ BAL DEQ • • • • B 12. 13. BALR USING RCBl 2,0 *,2 * RCBl 4,WRITEDTA RCBl Protect resource. Write a record. Release resource. SBTASK1A * RCBl 4,WRITEDTA RCBl Protect resource. Write a record. Release resource. SBTASK2A RCB Resource control block for WRITEDTA Explanation for Example 1: Both subtask 1 and subtask 2 are sharing the same file using a common subroutine. The subroutine is not reentrant, and the file cannot use track hold. Therefore, i t is necessary for each subtask to enqueue on the RCB associated with the resource and dequeue when the resource can be released for a waiting subtask. 48 DOS system Programmer's Guide EXAMPLE 2: In the following example, two subtasks are sharing a common processing routine defined in the first subtask. 1. MTASK 2. 3. 4. STASK1 5. * • • ATTACH • • ATTACH • • ENQ • • • • DEQ • • EQU • • B • • STASK1,SAVE=SAVE1,ECB=ECB1 STASK2,SAVE=SAVE2,ECB=ECB2 RCBA STASK2 8. 9. RCBA 10. TOTAL RCB DS Protect resource TOTAL. Used by STASKl and STASK2. Process TOTAL 6. 7. START 0 RCBA Release resource TOTAL. * STASK1 Process TOTAL RCB for resource TOTAL Shared resource Explanation for Example 2: The resource (TOTAL) in STASK1 is protected by the resource control block named RCBA. The protection remains in effect only if every segment of coding within the partition referring to TOTAL issues the ENQ macro before executing that selection of coding and subsequently dequeues that resource with the DEQ macro. This is effectively accomplished by branching to the same physical set of code. Note that the coding from statements 4-6 does not necessarily have to be reentrant, but you should ensure that values for constants associated with the subroutine do not have to be retained from one reference to the next, whenever the resource is used. If so, these values should be saved with the appropriate subtask and then later restored. Section 1: Supervisor Planning Concepts 49 EXAMPLE 3: In this example, the subtasks again share the same resource, but use different subroutines for processing that resource. 1. MTASK START 0 2. • • ATTACH • 3. ATTACH ST2,SAVE=SAVE2,ECB=ECB2 4. • • • EQU • STASKl • ENQ 5. 6. *Update • • RESRCA • • DEQ 7. 8. STASK2 • * Updat.e 12. • • RES RCA • • 11. 13. • • EQU • ENQ 9. 10. ST1,SAVE=SAVE1,ECB=ECBl DEQ RCBA RESRCA • • * ReBA Protect resource RES RCA Process using RESRCA ReBA Release resource RES RCA * ReBA Protect resource RES RCA Process using RESRCA RCBA RCB OS or DTF Release resource RES RCA RCB for resource RESRCA Shared resource Explanation for Example 3: RESRCA can be simply an area in main storage or a file defined by a declarative macro. In either case, RESRCA is protected from subtask 2 while subtask 1 is operating on it. Thus, if all tasks enqueue and dequeue each reference to RESRCA, then RESRCA is protected during the time it takes to process instructions from that task's ENQ instruction to its DEQ instruction. This is readily apparent if RESRCA is in main storage. However, if it is a file, the record being operated upon is protected while in main storage, but it is not necessarily protected on the external storage device. If the file is on DASD, the HOLD function should be utilized, if possible. In any such situation, the priorities of subtasks must be considered for proper operation. 50 DOS System Programmer's Guide POST Macro Example The POST macro can be used by one task to inform another task of the completion of some event, or it can release a number of tasks from wait state. 1. 2. MAINTASK BALR USING • • ATTACH • • ATTACH • • ATTACH • • 3. 4. 5. 6. 7. 2,0 *,2 ST1,SAVE=AREA1,ECB=ECB1 ST2,SAVE=AREA2,ECB=ECB2 ST3,SAVE=AREA3,ECB=ECB3 ECBl WAIT DETACH SAVE=AREAl Wait for completion of subtask 1 Detach subtask 1 • 8. 9. • ST1 12. 13. 14. ST1EOJ 15. ST2 16. ST2A • • L POST WAIT 17. 18. 19. ST3 20. ST3A 21. • • EQU • • EQU • • POST • • B • • EQU • • EQU • • • • B • • POST 22. ) • • 1,MTSVAR WAITM ECB2,ECB3 2(1),X'7F' NI 10. 11. 23. 24. 25. 26. 27. EOJ ST MTSVAR ECB1A ECBl ECB2 ECB3 DC DC DC DC DC O,MTSVAR ECB1,SAVE=(O) ECB1A Store address of main task save area Wait for subtask 2 or subtask 3 Turn off WAIT bit Get address of main task save area POST ECB for main task WAIT to be detached * * ECB2 POST ECB for subtask 1 ST2A * * ECB3 ST3A F'O' F'O' F'O' F'O' F'O' Save area address for main task Dummy ECB for subtask 1 ECBs for subtasks section 1: supervisor Planning Concepts 51 Explanation for POST Macro: Subtask 1 (ST1) is dependent on input from subtask 2 (ST2) and subtask 3 (ST3). Therefore, it issues a WAITM on the ECBs for those subtasks. Notice that statement 11 resets the wait bit (set to 0) in the ECB that satisfies the wait condition. This ensures that the wait bit is off before reissuing the WAITM. (Subtask 1 is the highest priority task and, therefore, would gain control before subtask 2 and subtask 3. The result is that the WAITM is always satisfied from the first operation.) Initially, subtask 1 is placed in wait state by the WAITM. Control is then passed to subtask 2 and then to subtask 3. When either of the two subtasks has the necessary data for subtask 1, it posts its ECB that removes subtask 1 from wait state. when subtask 1 finishes its processing, i t posts its ECB causing the main task to be taken out of wait state which then detaches subtask 1. WAITM Macro Example A task issuing the WAITM macro should ensure that if an event has the possibility of not occurring (perhaps the task posting the event was terminated), the waiting task should allow an eventual outlet. This outlet, as shown in the following example, can also wait on the terminating ECB of the task that was to perform the preferred event. 1. 2. MAINTASK • • ATTACH • • 3. 4. 5. 6. 7. 8. 11. 12. 13. 14. 15. 2,0 *,2 ST1,SAVE=SAVE1,ECB=ECBl WAITM ECB2,ECBl 2(1),X'7F' NI 4(1) B PREVENT TEVENT 9. 10. BALR USING STl • • EQU • • EQU • • EOJ • • EQU • • ECBl ECB2 POST DC B DC B Wait for preferred or secondary event Turn off WAIT bit BR to branch in vector table * Main task preferred event * Main task secondary event ~ Main task end of job * ECB2 F'O' TEVENT F'O' PREVENT POST completion of preferred event. ECB for secondary event Vector BR to secondary event ECB for preferred event Vector BR to preferred event Explanation for WAITM Macro: In this example, the WAITM macro contains a preferred event as the first operand and a secondary event as the second operand. The preferred event is the posting of ECB2 after subtask 1 completes its calculation. If subtask 1 terminated before its calculation is completed, the supervisor posts the ATTACH macro ECB of subtask 1, ECB1, and the secondary event can satisfy the WAITM macro. In either event, after the WAITM macro is satisfied, the address of the posted ECB is contained in register 1. This address can select a problem program routine. In this particular case, a branch instruction points to a table containing a.list of ECBs with corresponding branch instructions to the routine to be given control when the ECB is posted. This table can easily be expanded to include up to a maximum of 16 ECBs (due to the WAITM format used). 52 DOS System Programmer's Guide « STXIT AB Macro Example The STXIT AB macro instruction establishes linkage to an abnormal termination routine for either a main task or a subtask. 1. 2. 3. MAINTASK 4. 5. 6. 7. 8. 9. MTABEND BALR USING STXIT • • ATTACH • • ATTACH • • ATTACH • • STC C BE 2,0 *,2 AB,MTABEND,MTABSV Initialize AB exit ST1, SAVE=SAVE1, ECB=ECB1,ABSAVE=ST1ABSV ST2,SAVE=SAVE2,ECB=ECB2 ST3, SAVE=SAVE3, ECB=ECB3 O,MTABCODE 1, A (ST1ABSV) ST1ABEND Save AB code Test if ST1ABTERM BR if YES • 10. 11. • CANCEL STlABEND 12. 13. ST1 14. ST2 15. ST2ABEND 16. 17. ST3 18. ST3ABEND CANCEL for main task cancels all tasks EQU • • CANCEL • • EQU • • STXIT • • STC • • CANCEL • • • STXIT • • STC • • 19. CANCEL 20. 21. 22. 23. 24. 25. 26. 27. OC DS OC OS OS DC DC OC * CANCEL ALL for subtask 1 ALL * AB,ST2ABEND,ST2ABSV Initialize subtask 2 AB exit O,ST2ABCOD Save AB code CANCEL for subtask 2 AB,ST3ABEND,ST2ABSV Initialize subtask 3 AB exit 0,ST3ABCOO Save AB code OD 9D'0' 90'0' 9D'0' 90'0' X'O' X'O' X'O' Align on doubleword boundary Main task AB save area Subtask 1 AB save area Subtask 2 AB save area Subtask 3 AB save area Save area for AB codes • • MTABSV ST1ABSV ST2ABSV ST3ABSV MTABCODE ST2ABCOO ST3ABCOD section 1: Supervisor Planning Concepts 53 Explanation for STXIT Macro: statement 3 establishes linkage to the abnormal termination routine for the main task. statement 4 attaches subtask 1 and indicates to the supervisor that it will use the main task's abnormal termination routine by specifying the ABSAVE parameter. Note that the main task's abnormal termination routine tests for a main task or subtask 1 abnormal termination by comparing the address in register 1 to the address of subtask l's AB save area. When the main task or subtask 1 cancels (CANCEL ALL), the entire partition is canceled. Subtasks 2 and 3 initialize their own abnormal termination exits because they use their own abnormal termination routines. When either subtask 2 or subtask 3 cancels, only that subtask is terminated; the other tasks within the partition continue processing. 54 DOS System Programmer's Guide Track Hold and Reentrant Modules Example Although track hold applies across partitions, this example only shows two subtasks sharing the same DA file and the same DA modules. It is possible that a similar set of routines could be executing in a second partition also sharing the file with the first partition, but that partition would have its own DA module. 1. MAINTASK START • • 0 ATTACH ST1,SAVE=AREA1,ECB=ECB1 2. • 3. 4. ST1 5. 6. • ATTACH • • OPEN • • LA READ • • WAITF • • 7. 8. 9. 10. WRITE WAITF FREE 11. DAFILE1 12. ST2 • • DTFDA • • OPEN • • ST2,SAVE=AREA2,ECB=ECB2 DAFILE1 OPEN DA master file 13,DASAVE1 DAFlLE1,KEY Initialize register 13 with DA save area Read and hold record DAFILE1 DAFILE1,KEY DAFILE1 DAFILEl Write updated record Release track HOLD=YES,RDONLY=YES, ••• DAFlLE2 OPEN DA master file. Initialize register 13 with DA save area Read and hold record From DA master file 13. 14. 15. WAITF 13,DASAVE2 DAFlLE2,KEY DAFILE2 16. 17. WRITE WAITF DAFILE2.KEY DAFILE2 Write updated record DAFILE2 Release track LA READ • • 18. 19. DAFILE2 20. 21. 22. DASAVE1 DASAVE2 • • FREE • • DTFDA • • DAMOD • • DS OS HOLD=YES.RDONLY=YES •••• HOLD=YES.RDONLY=YES, ••• 8D'0' 8D' 0' Save areas used by DAMOD when shared and reentrant Section 1: Supervisor Planning Concepts 55 Explanation for TRACK HOLD and REENTRANT Modules: Because both subtasks share the same file, HOLD=YES and RDONLY=YES must be specified in both DTFs and in the DAMOD. In addition, before any I/O operation is issued (READ, WRITE, or WAITF), register 13 must contain the address of a unique save area to store the registers used by the module. Register 13 is not altered between I/O operations executed by a given subtask, and therefore, only needs to be initialized once. If other reentrant access methods were used by the subtask, register 13 would have to be initialized for each LIOCS function. FOPT Macro OPERATOR COMMUNICATIONS SUPPORT (OC) Operator Communications (OC) refers to the processing of an external interrupt by a problem program. In a multitasking environment, only the main task can communicate via the OC linkage. By specifying OC=YES, a table (OC option table) is generated within the supervisor (see Figure 1.13). When the problem program issues the STXIT macro, the address of its external interrupt routine is moved to the OC option table. The user's routine is terminated by issuing the EXIT macro. When OC=YES is specified, support is available to all partitions. Figure 1.20 illustrates a sample program using this support. The Tape Compare Utility program requires this support. OC=YES is also required if emulator program operator services are to be requested through the INTERRUPT key. Operational Considerations To cause an external interrupt for the background partition, the operator presses the INTERRUPT key on the CPU console. To cause an external interrupt for the 56 DOS system Programmer's Guide foreground partitions, the operator the REQUEST key on the 1052 console reply to the ATTN routine statement FOR COMMUNICATIONS', types 'MSG Fl' F2'. presses and. in 'READY or'MSG INTERVAL TIMER SUPPORT (IT) This parameter generates programming support for the hardware timer feature. The timer consists of two parts. The first part keeps track of the time-of-day and is used to time-stamp system time. The second part of the timer allows a problem program to set a time interval (via SETIME macro). By using the STXIT, EXIT, and TECB macros, a specific routine within the problem program is entered when this time interval elapses. In a multitasking environment, only the main task can set a Timer Event Control Block (TECB). The interval timer is in addition to and separate from the time-of-day support generated by the specification of the TIMER= parameter of the CONFG macro. When interval timer support is specified (i.e., IT=BG, Fl, or F2), TIMER=YES is assumed for the CONFG macro. Support is only available to one partition at a tim~_as defined at system generation time. The TIMER command can change the assignment from one partition to another after the supervisor has been generated. QTAM requires IT=Fl. PC Option Table and OC Option Table: A ::11-----:-----1-1- :-------II 1-1- - - - word -~---+I-,----- word -----+II No STXIT given: a = 0 STXIT issued: a = address of the user program check (operator communications) routine STXIT issued when the user routine is already in use: a = complement of user program check (operatar communications) routine address No STXIT given: b = 0 STXIT issued: address of the user save area IT Option Table D C I I c I d 11------ word -----+--I- - - - word -----il No TECB or STXIT issued: c = 0 TECB issued: c = addr.ess of the timer event control block STXIT issued: c = address of the user interval timer routine STXIT issued when user routine is already in use: c = complement of the user interval time routine address 0 No TECB or STXIT issued: d = 0 TECB issued: d = complement of the TECB address STXIT issued: d = address of the user save area AB Option Tabl~ F E I 1 e f e f I e I word 0 f word I 1 No STXIT given: e = 0 STXIT issued and rtnaddr parameter passed: e=address of entry point of user's abnormal termination routine. If AP (asynchronous processing) .is supported, the main task and subtasks may have the same or different AB routines. When a subtask is attached after a STXIT AB macro has been issued by the main task, the subtask will receive the AB routine address specified by the main task only if the ATTACH macro for that subtask has the ABSAVE parameter specified. The subtask can override this by issuing its own STXIT AB macro. No STXIT given or no save area parameter passed: f = 0 STXIT issued and save area parameter passed: f=address of a 72- byte save area used by the supervisol" to store the old PSW and general registers 0-15. Each table address (less 8 bytes) is found in the communications region at the byte locations specified below. The labels shown identify the first byte of the corresponding table. Table PC IT OC AB ~ Bytes in COM REG Label - 100- 101 (X'64'- '65') 102-103 (X'66'- '67') 104- 105 (X'68'- '69') 12-13 (X'OC'- 'OD') of extension PCTAB ITTAB OCTAB ABTAB -- Figure 1.13. Option Tables Section 1: supervisor Planning Concepts 57 PROGRAM CHECK SUPPORT (PC) Program Check (PC) support generates a PC table within the supervisor (see Figure 1.13). The PC table contains the address of a user program check routine. This address is placed in the table via the STXIT macro issued by the problem program. If the STXIT PC linkage is established and a program check within this program occurs, the supervisor gives control to the user's routine instead of canceling the job being run in this partition. The support is extremely advantageous when using LIOCS (e.g., files can be closed before job termination). If a program check occurs in a routine being executed from the logical transient area (LTA), only the task associated with that routine is abnormally terminated. In a multitasking environment each subtask and main task may have its own PC routine. A PC routine can be shared by more than one task within a partition. This can be done by issuing a STXIT macro in each task with the same routine address but with separate save areas. To successfully share the same PC routine it must be reentrant (capable of being used concurrently by two or more tasks). Figure 1.20 shows a sample program using this support. Refer to supervisor and I/O Macros listed in the Preface for fUrther information on problem program macro formats and their use. TAPE ERROR RECORDING The three options and their system generation specifications for tape error recording are: TEB: The system generates the number of tape unit error blocks specified by n. TEB support automatically collects and writes magnetic tape unit status on SYSLOG at the end of every job utilizing these units. The n must be at least equal to the number of tape units and/or tape cartridge readers attached to the system. (TEB is the only one of the three options supporting the tape cartridge reader.) Additional TEBs should be specified for possible future expansion. ESTV: The system generates a TEBV table with a status block and the number of error blocks specified by the n in TEBV=(DASD,n) I (SYSLOG,n). ESTV transients format and write the error records on DASD or SYSLOG each time a particular volume is ended by CLOSE, EOVi EOJ, or abnormal termination. For TEBV=(DASD,n), the ESTV recorder file (ESTVFLE) must be formatted and opened for the collection of statistics using ESTVFMT, the ESTV format program. SYSREC is the system logical unit used to collect ESTV statistics. The information written on ESTVFLE may be retrieved by executing the ESTV dump program, ESTVUT. For TEBV=(SYSLOG,n), ESTV transients format and write the data on SYSLOG and do not access any intermediate storage device. EVA: The system generates a TEBV table and prints a message on SYSLOG when the temporary read error threshold (r) or temporary write error threshold (w) has been exceeded on a currently accessed tape volume. The number of SIOs is also included in the message. EVA can be used for both labeled and unlabeled tape volumes. Only the first four bytes of the status block portion of the TEBV table are generated if TEBV is not specified also. The status block is followed by the number of error blocks specified by the n parameter. • Tape Error Block (TEB) by unit, TEB=n. • Error statistics by Tape Volume (ESTV), TEBV=(DASD,n) or TEBV=(SYSLOG,n). system Generation Guidelines • Error Volume Analysis (EVA), EVA=(r,w,n). The FOPT macro checks the options in the following order: TEB, TEBV, EVA. An invalid specification for any option (n is outside the range 0-254) results in NO being assumed for that option. If TEB has been validly specified, the TEBV n will take on the value of the TEB n. If either TEB or TEBV has been validly specified, the EVA n will take on the value of the previously set n. If any n does not have the same value as an earlier valid n, an MNOTE is issued. Anyone or any combination of these options may be selected. If more than one is included, the n must be the same for each. A TEB table is generated for the TEB option~ A TEBV table is generated for the ESTV and EVA options. Status information contained in these tables is shown in Figure 1.15 and 1.16. Figure 1.14 shows the I/O interrelationship. 58 DOS System Programmer's Guide NICL Sy.em BG F2 FI FICL ~ n ++- n n LUB JIB :1 ~.-y ~r- I ~ n = number of un its i = index displacement within LUB table ~~ ~r- r-r- /" FAVP L (~ II' TEBV '--'-h Y FOCL - -. PUB I I I I I I I I I I I I 1 111111111111 I I I I I I I I I I L.I J TEB L I I I II I l1li ~r'::: ;:...- L-:: ::::;? ~~r CHANQ !>. If' FLPTR " ... K~ r KEY. THFLPTR r 1 1 1 1 1 1 1 ( I 1 I 1 1 I 1 SAB TKHDTAB .. 1 I l LUB REQ 10 10 LUB TKREQ DSP 10 I h ~~~~ ~;:-- If' t.-::::;:;-- Jir=:? i.-:~ C NICL (Number in Class) The first byte contains the number of system class units. The second, third, and fourth bytes contain the number of programmer class units (BG, F2, Fl) (Figure 1.21). FICL (First in Class) The first byte points to the first system class unit in the LUB table. (Always the first LUB table entry.) The second byte points to the first programmer class unit in the LUB table BG area. The third points to the first programmer class unit in the LUB table F2 area. The fourth points to the first programmer class unit in the LUB table Fl area (Figure 1.21). LUB (Logical Unit Block) Table The first byte points to a PUB table entry (if the logical unit is assigned) or contains X'FF'. The second byte points to a JIB table entry or contains X'FF' (Figure 1.21). PUB (Physical Unit Block) Table The first two bytes contain the channel and unit address of the physical device; the third a CHANQ pointer; the fourth a TEB pointer; the fifth device type codes; the sixth a device characteristic code or a SAB pointer; the seventh the channel scheduler flag; and the eighth has the job control flag (Figure 1 .30). FOCL (First on Channel List) The first byte points to the first PUB (highest priority) on channel zero. The next byte points to the first PUB (highest priority) on channel one, etc. A hexadecimal FF indicates the associated channel is not supported. TEB (Tape Error Block by Unit) One TEB is built for each tape unit at supervisor generation time if tape error statistics by unit are required (Figure 1.15). TEBV (Tape Error Block by Volume) One TEBV is built for each tape unit at supervisor generation time if tape error statistics by volume or error volume analysis are required (Figure 1 .16). FAVP (First Available Pointer) A one - byte pointer to the next available JI B entry. JI B (Job Information Block) The first two bytes contain extent or LUB information. The third contains ownership and JIB flags. The fourth contains JIB chaining information (Figure 1.22). CHANQ (Channel Queue) Table The first byte contains the chain field (a pointer to the next in queue). The last three bytes contain the CCB address (Figure 1.29). LUBID (LUB Identification) A ane - byte pointer to the LUB making the I/O request. REQID (Requestor Identification) A one - byte pointer to the program containing the CCB (Figure 1.29). LUBDSP (LUB Displacement) A one - byte value equal to the absolute LUB number (CCB byte 7). FLPTR (Free List Pointer) A one - byte pointer to the next free entry in the channel queue (Figure 1.29). SAB (Seek Address Block) A four - byte (BCCH) address that is the current disk address of the device plus a fifth byte that contains a Track Hold Table pointer or X'FF'. If the Track Hold function is not supported, the fifth byte contains X'OO'. TKHDTAB (Track Hold Table) The first byte contains a pointer to the next available entry (or X'FF'); bytes 2 -4 have CCB address of the requesting task; bytes 5 - 10 have disk address (BBCCHH) of track being held; byte 11 has key of owning track; and byte 12 has two uses: bit 0 = 1 means a task is waiting for the track, and bits 4 - 7 count the number of holds on the track. Note that the number of holds is one greater than the value v~ bits 4-7 of the last byte. THFLPTR (Track Hold Free List Pointer) A one - byte pointer to the next free entry in the Track Hold Table. TKREQID (Track Requestor Identification) A one - byte pointer to the PI B of the task requesting I/O. Figure 1.1'1. I/O Table Interrelationship Section 1: Supervisor Planning Concepts 59 TEB Table TEBTAB TEB 1 TEB 2 TEB 4 Byte TEB 5 TEB 6 o- 1 2 3 4 5 - Error recovery retry count. Permanent read data check error count. Number of times the read data check error routine is entered. Number of times the write data check error routine is entered. Write skip (erase gap) count. Noise record count. One TEB is generated for each 2400 series or 3420 magnetic tape or 2495 Tape Cartridge Reader unit if the FOPT macro contains the TEB = n parameter. Job control resets each TEB at normal or abnormal End-of-Job. An unused TEB contains HEX'FFOOOOOOOOOO'. A TEB is referenced from byte 3 of a magnetic tape unit PUB. Bytes 70 and 71 (X'46'-'47') of the communications region contain the address of the TEB table entry. Label TEBTAB identifies the first byte of the table. Figure 1.15. 60 Tape Error Blpck DOS system Programmer's Guide Decimal Displacement Label Byte Length TEBVTAB Description Symbolic address of the TEBV Table (TEBV Status Block portion of TEBV Table - Note 1) o 1 r.--- 2 3 4 --- ---~--6 7 11 12 17 ------ TEBLEN TSBLEN EVARTH EVAWTH TEBsTAr - 1 1 1 1 -1".! _ Length of TEBV Error Block (for each Error Block generated) Length of TEBV Status Block (4, 6, or 22 bytes - see Note 1) EVA Read Error Threshold EVA Write Error Threshold -DASD ESTVFil;Stat;;s - - - - - - - - - - - - - - - - - - - - - - - - - - - - --- !..E~~C _ _ _ ~IY ~b~I"y~~e_C~~e!.. TEBDEV UPXTNT TEBRPT NXTESR Data Set Device Code Disk Address of Upper Extent of Data Set (cchh) Number of Records per Track Disk Address of Next Available Space for Data Record (cchhr) P~inter19 .E,.ST'yF.!:E la!?.elJ!l '{J~C ~c~rL _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 1 4 1 5 ~ST'y~B.!: _ _ 5 __ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ...., _ _ _ _ _ _ _ _ _ _ _ _ _ (TEBV Error Block Portion of TEBV Table - Note 2) 22 1 TEBV 23 1 24 1 1 1 25 26 27 28 1 1 29 30 1 31 32 34 1---------- 40 1 1 2 6 Status Indicator (giving status of posting and writing error conditions) Usage Indicator (X'OO'=TEBV Error Block in use; X'FF'=Error Block generated but not serving any tape unit) Retry Counter Permanent Read Errors Temporary Read Errors Temporary Write Errors Erase Gaps Noise Blocks Permanent Write Errors Clearer Actions Number of Start I/Os I-V~I~m~ S~~I Nu~b..:..r ~~~ JPl _______ _ - - --- - - - ------ (Begin repeating bytes 22 - 39 for second TEBV Error Block) I I I Note 1: The TEBV Table is composed of one Status Block and (n) Error Blocks and is addressed symbolically by TEBVTAB. The table is generated if EVA and/or ESTV are included in the system. The size of the TEBV Status Block is determined by supervisor options in the FOPT macro at generation time: • When EVA is chosen without ESTV, the TEBV Status Block is four bytes long (bytes 0-3), followed by TEBV Error Blocks, so that bytes 4 - 21 are omitted. • When ESTV output is on SYSLOG, the TEBV Status Block is six bytes long (bytes 0 - 5), followed by TEBV Error Blocks, so that bytes 6 - 21 are omitted. • When ESTV output is on DASD, the TEBV Status Block is 22 bytes long (bytes 0 - 21), followed by TEBV Error Blocks. Note 2: The number of TEBV Error Blocks generated corresponds to the (n) parameter in the FOPTmacro for TEB, TEBV, or EVA options. A TEBV Error Block always contains 18 bytes, as shown in bytes 22-39 of this figure. The TEBV Table, therefore, is composed of one TEBV Status Block (with the length dependent upon supervisor generation options as described in Note 1), followed by (n) number of 18 - byte TEBV Error Blocks. Figure 1.16. TEBV Table Showing Status Block and Error Blocks Section 1: Supervisor Planning Concepts 61 SEEK SEPARATE SUPPORT (SKSEP) When DASD devices are command chained, they monopolize the channel until channel end for the device associated with the last CCW in the chain is reached. This means that the channel is unavailable for use by other partitions requiring I/O operation of other DASD devices on the channel. The seek separation feature was designed to improve the performance of systems running under DOS. This feature enables the supervisor to separate a seek from its associated read or write so that the seek can be separately scheduled. This means that multiple seeks can be issued to devices on a channel, and the reads and writes scheduled as the seeks are completed. As this is a supervisor function, it automatically applies to programs written at any language level and/or operated in any of the three partitions. As the number of devices on a channel increases, the benefits derived from this feature increase. The implementation of this feature is such that when a seek has been issued to a device, the arm cannot again be shifted until the I/O operation that initiated the seek has been completed. In other words, arm stealing has been prevented. After seek is issued, the channel is available for scheduling any other I/O operations. In a multiprogramming environment, this feature is particularly important when the different partitions have a mix of input/output requests for a single channel with multiple direct access devices. The seek separation capability is provided by unchaining the user's seek and by posting the seek separation bit (X'10' of the 13th byte of the user's CCB) and the "Wait for Device End" bit in the user's CCB. When START I/O is performed on the new unchained seek, channel end is immediately sent back from the control unit, thereby freeing the channel for performing seeks to other units on the channel. When the device end interrupt occurs at the completion of a seek, the seek separation and ·Wait for Device End" bits are turned off, the seek is rechained to the remaining CCWs for the I/O request, and the device is not dequeued. A START I/O is now performed on this unit that has its arm already positioned at the correct cylinder. Specifying this feature generates a Seek Address Block (SAB) within the supervisor (refer to Figure 1.14). Each DASD device has an entry in the SAB containing the current disk address for that device. Each time the user performs a seek, his seek address is compared with the entry for that 62 DOS System programmer's Guide device in theSAB. If they are equal, no seek separation is performed. If they are not equal, the seek address replaces the current entry in theSAB, and seek separation is performed. Each user's DASD ccw chain must start with a long seek (X'07') in order to use this feature. System Generation Guidelines Specifying SKSEP=YES indicates support for all DASD devices specified by the DVCGEN macro at system generation time. N is the number of DASD devices to be supported and cannot be less than the number of DASD devices specified at system generation. PHYSICAL TRANSIENT OVERLAP SUPPORT (PTO) Physical Transient Overlap (PTO) support allows the system to: • Overlap I/O operations in the error recovery routines (ERP) with problem program processing. • Overlap I/O time required to fetch user programs and system transient routines into main storage with problem program processing. The PTO option allows other tasks to be selected when an I/O operation is being performed during one of the following: • Fetching a phase (SVC 1) • Fetching a logical ($$B) transient (SVC 2) • Fetching a physical ($$A) transient (SVC 3) • Loading a phase (SVC 4) • Loading a phase header (SVC 23) • Modifying the system communications region via MVCOM macro (SVC 5) • Fetching of the ATTN routine • performing ERP I/O operations For example, if an error occurs in the background partition while reading a tape record, an error recovery routine is called into the physical transient area to reread the record up to 100 times. Each reread operation requires time to read the record itself plus time to backspace the record before reading it again. Without PTO, the entire 100 rereads by the error recovery routine would not be overlapped with other processing and other tasks would not receive control during this interval. with PTO, I/O time is overlapped and available to the foreground partitions for processing until another error recovery routine or system transient routine is required. Another advantage of PTO involves fetch I/O time. Fetching requires one or more searches of the library directory on SYSRES, reading of the directory into the physical transient area, and searching for and reading one or more records of the program or transient into the proper area of main storage. This involves several disk I/O operations. PTO allows the fetch I/O time to be overlapped with processing by any partition requiring CPU time (in priority sequence) until another fetch or other use of the physical transient area is required. 2. Data chaining and command chaining are not used. 3. The CCB associated with the operations does not request any sense information (CCB+12 set to X'20') and/or does not have either "accept unrecoverable I/O error", "post at device end", or "user error routine" bits on (CCB+2 set to X'15' or any combination of these). In other words, no error checking is required. 4. The CCW must have either an X'Ol' or X'09 1 command code (i.e., only a WRITE operation). 5. For user messages, the CCW and the message must reside within the partition issuing the write operation. If these conditions are not met, the console operation is handled in a normal manner. CONSOLE BUFFERING SUPPORT (CBF) Previously, a system component could Qold up the system and degrade throughput performance whenever an I/O operation was issued to the console typewriter (1052), followed by a WAIT. The console buffering option (CBF) alleviates this situation by queuing write operations to a 1052, 3210, or 3215 and returning control immediately to the routine that issued the write with the WAIT bit posted. The user's WAIT is satisfied immediately, rather than at actual I/O completion. Each message is assigned a buffer containing the message itself and control blocks for I/O interrupt handling (Figure 1.17). The system writes the message from the buffer on the 1052, 3210, or 3215 as soon as possible while user-processing continues. The CBF facility is used only for write operations which require no user error handling. Only those messages that meet the following criteria are -buffered: 1. Messages cannot exceed 80 characters. You have the option of specifying the number of buffers required for queuing messages, but the total may not exceed 50. If a buffer is not available, your WAIT is not satisfied until a buffer is freed. At least one buffer should be specified for each partition or task issuing messages so that buffers are available and the task can continue processing while the message is being printed. Job control often issues several console messages in succession; therefore several additional buffers should be specified for partitions that use job control frequently. Another factor to be considered in the selection of the CBF option is extra channel usage. Specification of the CBF option and selection of the CBANQ default (6 channel queue entries), results in the number of buffers specified being added to the CHANQ default. However, when both the CBF and CHANQ options are specified, it is recommended that the number of CHANQ entries desired be increased by the number of buffers specified. Otherwise, the number of entries generated in the channel queue will be less than desired. ) Section 1: Supervisor Planning Concepts 63 CBTAB a xx CBINUSE 7 8 CBCCW ,,/" CBCCB 20 21 23 24 CBPREX 103 CBDATA 2 3 r---C-B-N-E-X-T.......( / Po i nts to next available buffer n CBTABND The Buffer Table is a 104 multiplied - by- n byte area of main storage, where n is 1 -50. Each buffer entry in the table is 104 bytes. CBNEXT is a halfword constant that points to the next available buffer entry. It is initialized with the address of CBTAB and is incremented by 104 every time a buffer is used, so that it points to the next entry. When its val ue becomes greater than CBTABND, it is reinitialized with the value CBTAB. CBINUSE is a one- byte counter that contains the number of entries currently in use. It is incremented whenever a buffer is used and is decremented at dequeue time when the buffer becomes free. Each buffer entry contains the fol lowing fields: Displacement: a CCW moved from requestor core. The data address portion of the CCW is modified to point to the data portion of the buffer. 8 CCB moved from requestor core. The CCW address in the CCB is modified to point to the CCW in the buffer. 21 Prefix. SYSLOG ID moved from problem program PIB. The prefix is printed with the data to identify BG, F1, or F2 partitions. 24 Data moved from requestor core. Figure 1.17. I INDEPENDENT Console Buffering Table and Work Areas DIRECTORY READ- IN AREA (IDRA) An independent directory read-in area (IDRA) can be included if the option is specified at system generation time. The funcion of this area is to enhance performance by reducing contention for the physical transient area (PTA) on fetches' from the core image library. During the time the physical transient area is busy, fetches from other partitions can be processed. system Generation Considerations The YES option causes generation of the IDRA area in the supervisor. IDRA requires MPS=YES or BJF, and PTO=YES. If IDRA=NO, the core image library directories are loaded and scanned in the 64 DOS System Programmer's Guide PTA. If IDRA=YES, the core image library directories are loaded and scanned in the IDRA. The IDRA is used for all supervisor calls that require reading of directories. COMMAND CHAINING SUPPORT (CCHAIN) Command chaining support (CCBAIN=YES) allows the DOS error routines to retry ~n I/O operation starting with the last ccw executed rather than at the beginning of the chain. Under normal error recovery procedures, the entire CCW chain is reexecuted. To utilize the CCHAIN support, you must indicate in the CCB macro instruction that you want the error procedures to retry the I/O operation starting with the CCW in error by setting byte 3, bit 7 on (third operand of CCB=X·0001'). In addition, bytes 8-11 of the CCB must be initialized with the address of the first CCW in the chain each time the chain is executed. See Figure 1.18 for an example using CCHAIN support. r------------------------------------------------------------------------------, BEGIN START 0 DO READCCB READ BALR 4,0 USING *,4 LA 1, READ ST 1,READCCB+8 EXCP READCCB WAIT READCCB • • • • BCT • • Initializes Bytes 8-11 of CCB with address of first CCW in chain each time chain is executed. 3,DO CCB SYS004,READ, X'0001 1 CCW 2,DATA,X'60',100 CCW 2,DATA+l00,X'60',100 Indicates Command Chain Retry. CCW 2,DATA+200,X'20',100 - - - -__________________________________________________________________________ J Figure 1.18. Example Using CCHAIN Support CCHAIN=YES must be specified if data or command chaining of IBM 2495 Tape Cartridge Reader input is performed. • DTFSD - updating without work files • DTFSD - other functions with work files • DTFDA - all functions TRACK HOLD SUPPORT (TRKHLD) The track hold feature allows tasks within the same partition or tasks outside of a partition to-share DASD data files when using the direct access method or the sequential method of file organization. This track protection facility can be used with or without multitasking to provide protection between partitions. By definition, track protection means a DASD track that is being modified by some task in main storage is prevented from being accessed by another task in that partition or in any other partition. Any programs using DTFSD/SDMODXX, DTFIS/ISMOD, or DTFDA/DAMOD can use the track protection macros when performing the following functions. • DTFIS - all functions except LOAD • DTFSD - updating with work files The actual holding of a track is a combination of supervisor (PIOCS) and data management (LIOCS). Track hold involves the actual request that a track be held and the request to free a track. The hold request is generated if you specify parameters in the DTFs and logic modules for the program(s) involved. Supervisor Considerations At system generation time, you must specify the number of unique tracks that can be held at anyone time (255 maximum and 10 minimum). A table for the number of entries specified is built into the supervisor for storing the necessary information required for track protection. The maximum number of holds (without intervening frees) that a task can issue for a given track is 16. If more than 16 holds are attempted, the task is canceled. Section 1: Supervisor Planning Concepts 65 If the DASD channel program does not start with a long seek, track hold is not implemented. If multiple track search operations are issued, only the first specified track is held but it is not necessarily the same track on which the search is satisfied. In this case, the track on which the search is satisfied is not protected. If a task requests a track already held by another task, the requesting task is placed in wait state (until the track becomes available). In addition, if the task requests a hold on the 256th unique track or exceeds the limit specified at system generation time, the requesting task is placed in wait state until a previously held track is freed. In either of these cases, especially in the first situation which has a greater chance of occurring than the latter, make sure that the following conditions do not occur. 1. 2. If more than one track is being held, it is possible for a task to put the entire system into wait state. This occurs if one task is waiting for a track that is already held by another task. In the first case, if task A holds track 1 on drive 1 and attempts to hold track 2 on drive 2 while task B is holding it, task A is placed in wait state until task B frees that track. Then, if task B attempts to hold track 1 on drive 1, it enters the wait state until task A frees that track. Because task A is already in wait state, neither task ever regains control. If they are the only two tasks running in the system, the entire system is in wait state. A similar situation can occur if two or more tasks attempt to hold more tracks than the maximum number allowed. For example, assume a maximum of 20 unique tracks can be held by the system. Task A issues 15 DASD I/O operations and task B issues 15 DASD I/O operations (altogether requiring track hold for 30 unique tracks). If both task A and task B are alternately issuing DASD I/O operations, then when each task issues its 11th track hold (at this point both task A and task B have held the maximum of 20 unique tracks), it is placed into wait state. Again, neither will regain control, and if they are the only two tasks running in the system, the entire system is in wait state. In both examples, if the operator is not aware of what has occurred, he may decide to cancel the tasks. If the lockout is 66 DOS System Programmer's Guide between two subtasks within a partition, the partition is canceled. If the lockout is between two partitions, one partition is canceled, its tracks are freed and the second partition is removed from wait state. When a task issues a free for a particular track, one of two conditions occurs: 1. If a task has more than one hold on the track (16 maximum), a counter associated with that track is decreased by one, the task retains its hold on the track and control is returned to the task issuing the free. 2. If the task has only one hold on the track, the track is'-freed by removing its entry from the supervisor table. Any tasks waiting for the track or an available entry in the table are removed from wait state. The task with the highest priority gains control of that track or puts a hold on another track. Track hold only occurs for DOS-supported DASDs. Otherwise, the I/O operation is issued, but no track-hold function is involved. (This is true for any device, including non-DASDs.) The following conditions cause cancelation of a task: 1. A free was issued to a non-DASD type or a nonsupported DASD, 2. Bolds were not issued to that track, 3. A task attempts to free a track held by another task. In the last case, when the main task detaches a subtask, any track held by that subtask is freed. LIOCS Considerations Track hold is only supported for DTFIS, DTFSD and DTFDA files. Support of the track hold feature requires specification of a HOLD parameter in both the DTFIS/DTFDA/DTFSD and the ISMOD/DAMOD/SDMOD macros. In addition, a FREE macro must be issued for all DTFDA or DTFIS files and for DTFSD work files without update. A maximum of 16 holds can be applied to one track. A free issued for a track with more than one hold decrements the track hold count, but does not release the track. A free issued for a track not held, terminates the task. The track hold functions can be used in five specific situations: 1. Using DTFSD for updating with work files (via the WRITE macro). 2. Using DTFSD for updating without work files (via the PUT macro). 3. Using DTFSD with work files, when no WRITE is issued for updating. 4. For all DTFDA files. 5. For all DTFIS files except for LOAD. information on the format and use of the STXIT macro. STXIT Macro Considerations In the first two situations, the tracks being held are freed automatically by the system. For the last three situations, the task must issue the FREE macro instruction for each hold placed on a track by the READ macro. It should be noted that for DTFDA, a FREE macro need not be given wben only WRITE macros are issued. If BOLD=YES and ERREXT=YES, you must issue tbe ERET macro to return to the ISAM module to free any held tracks. If an IT (Interval Timer) condition occurs while executing the OC (Operator Communication) or PC (program Check) routines, these routines should not use the same save area (see Figure 1.19). r-----------------------------------------,I r-------------~-----------------------,I IRoutine Being I Condition Occurring II I Processed r-----,._---~---,._- I I I AB I IT , OC I PC I ~------------+------+------+------+----~ .. I I I I lAB I I IT I , T S I 10C : I S L ____________ L-_____ IPC S I I I I I : I I I I I I I H : I B I I I I I IbEf: I I I H I I I H: I ______ H I ______ B I ____ T JI ~ ~ ~ System Generation Guidelines Ef - Error message issued in foreground program and control returns to interrupted OC routine. B - Condition honored. When processing of new routine completes, control returns to interrupted routine. I - Condition ignored for all partitions. - Interrupt ignored in a background partition. TRKBLD=n The maximum number of tracks that can be held at one time is 255. The default is 10 if n is an invalid parameter (nonnumeric or outside the range 1-255). MPS=YES or BJF must be specified if TRKHLD=n. If a task attempts to hold an additional track after the maximum has been reached, the task goes into the wait state until a previously held track has been freed. I b S - ABNORMAL TERMINATION SUPPORT (AB) Abnormal termination exits are available for main tasks and/or subtasks, allowing you to gain control before an abnormal condition removes the task from the system. For example, in the abnormal termination routine, you can close your files. This function is provided by the AB operand of the STXIT macro. See Supervisor and I/O Macros listed in the Preface for detailed Execution of the routine being processed is suspended and control is transferred to the AB routine. T - Job abnormally terminated. If AB routine is present and it has not been interrupted by itself, its exit is taken; otherwise, a system L--______________________________________ _ abnormal termination occurs. Figure 1.19. Processing of STXIT Conditions Section 1: Supervisor Planning Concepts 67 when the time elapses. The SETIME, STXIT, and EXIT macros are used for this. However, only the main task of the partition owning the timer can issue these instructions. When a supervisor is not generated to handle the requested facility, the task is abnormally terminated if a STXIT macro is used. This also applies to a program that requests the timer interrupt and has not been allocated the timer. If an AB or PC condition occurs and linkage has not been established for a main task abnormal termination routine, the partition is abnormally terminated. However, if the AB or PC condition occurs in a subtask without exit linkage established, only the subtask is terminated. Only one main task at a time can use the STXIT IT macro. The partition of the main task is specified at system generation time but can be changed by the operator with the TIMER command. There are two distinct methods for using the STXIT IT macro. Only ' one method can be used at a time. 1. 68 The first method allows the main task to set the timer and enter a routine DOS System Programmer's Guide 2. The second method allows a given routine to be performed at timed intervals. The time set is a real time interval, and is not stopped or adjusted when the task using the timer does not have control. The SETIME, TECB, and WAIT macros are used. However, if multitasking, only one task within the partition can use the method and the WAIT on the TECB must appear in that task. Consideration should be given to the priority of the task assigned to process interval timer interrupts. Subtasks can use this method. Figure 1.20 contains a coding example using STXIT support. PAGE LOC OBJECT CODE ADDR1 ADDR2 STMT SOURCE STATEMENT 1 STXEXAM 000000 000000 0520 000002 00005A 9263 2058 ~005A 00005E 41FO 2014 00016 23 21 33 39 43 49 50 51 52 FOOS CL 3-5 10130169 CHK START 0 BALR ?oIO USING .',2 PRINT NDGEN STXfT PC,PRGeK,PCSAVE STXIT OC,COMMUN,OCSAVE SETIME 10,TIMEBLK EXCP CCB1 WAIT CCB1 WAIT TIMEBLK EXCP tCB2 WAIT CCB2 MVI *,99 PRGCK B EXCP GOAGAIN CCB3 PRINT PROGRAM CHECK MESSAGE WAIT EXIT EXCP CCB3 PC CCB4 RETURN FROM PROGRAM CHECK ROUTINE PRINT EXTERNAL INTERRUPT MESSAGE WAIT STXIT STXIT EXIT EOJ OS OS TECB CCB CeB CCB CCB4 PC DC OC DEACTIVATE PROGRAM CHECK EXIT DEACTIVATE EXTERNAL INTERRUPT EXIT RETURN FROM EXTERNAL INTERRUPT RTN 2 3 4 5 11 17 GOAGAIN PRINT *LOOP 1 Acn,VATE US ERS PROG CHECK RTN ACTIVATE USERS OPER.COMM. RTN SET INTERVAL TIMER TO 10 SECONDS PRINT TIMER BEGINNING MESSAGE WAIT FOR TIMER INTERRUPT PRINT TIMEOUT MESS_GE THIS WILL CAUSE A PROG CHECK NEXT TIME THROUGH THIS RTN THE (See ~below) 56 62 65 COMMUN (See~ 69 15 80 85 88 91 92 93 96 107 118 129 140 141 142 143 144 00009C 0000E4 000110 000118 000180 000188 0900019000000064 090001F400000064 0900025800000064 090002BCOOOOO064 000190 E3C8C540E3C904C5 0001F4 E3C8 C9 E240 03C905 000258 E3C8C9E240D3C9D5 0002SC 000000 000320 000324 000328 00032C 000330 000334 000338 Cl E240C14009C5E2 0000009C 00000062 000000E4 00000018 OOOOOOOA 00012COO 0000012C below) -- ----- -- ---- - - -- - DONE PCSAVE OCSAVE TIMEBLK CCB1 CCB2 CCB3 CCB4 CCW1 CCW2 eCW3 CCW4 MSG1 cca CCW CCW CCW CCW DC 145 MSG2 DC 146 MSG3 DC 141 MSG4 DC 148 149 150 151 152 153 154 155 END CL12 CL 12 SYSOOO,CCW1 SYSOOO,CCW2 SYSOOO fCC W3 SYSOOO,CCW4 9,MSG1,X'00',100 9,MSG2,X·OQ',100 9,MSG3,X'00' ,100 9,MSG4,X~00',100 CL100'THE TIME HAS JUST BEEN SET TO A VALUE OF TEN SECONO DS,THIS LINE lS PRINTING WHILE THE TIMER IS RUNNING.' CL100'THIS LINE HAS PRINTED AS A RESULT OF A TIMER INTERX RUPT IE. THE TIMER VALUE HAS GONE THROUGH ZERO.' CL100'THIS LINE HAS PRINTED DUE TO THE FORCED PROGRAM CHX ECK AT LABEL *CHK*.' CllOO'AS A RESULT OF THE INTERR"UPT KEY. THIS PROGRAM HAS X GONE TO NORMAL END OF JOB;' STXEXAM =A IPCSAVE) =AIPRGCK) =A(OCSAVE) =A ICOMMUN) =A(lO) , sF '16800' =AITIMEBLK) - -= :::::=: -::-: ..::::: - - - - - - - - - - - - - - - - - - - - - -- - - - - - --- - -- - - - - - - - - - - -- ---;.. PAGE LOC 00033C 000340 000344 000348 OBJECT C(10E 00000130 00000140 00000150 00000160 [ AOOR1 ADDR2 ----- STMT SOURCE STATEMENT =A(CCB11 =AICCB2) =A(CCB31 =A(CCB4} 156 151 158 159 - 2 FOOS CL3-5 10130169 -- : :=;..- - J Note: If LlOCS or other CSECTS that might alter the base register are used, then' a base register must be establ ished as the first step in the interrupt routine. For example: BALR 3,0 USING *,3 Figure 1.20. STXIT Sample Program Section 1: Supervisor Planning Concepts 69 second most preferable event. The user may use this to his advantage in task synchronization. The system checks the ECBs in the order written in the WAITM macro. MULTIPLE WAIT SUPPORT (WAITM) The multiple wait facility allows a task to be put into the wait state until one of a number of events occur before proceeding. Control passes to a task when one of the ECBs specified in the WAITM macro has been posted. The multiple wait facility can be used without specifying AP=YES. However, AP=YES cannot be used without WAITM=YES being specified. An Event Control Block (ECB) is a task communications block written by the problem programmer (see Figure 1.11). When a subtask is successfully attached, byte 2 bits 0 and 1 are set to o. When the subtask terminates, the supervisor posts (sets a bit to 1) byte 2 bit 0 of the ECB after processing of the abnormal termination routine. In addition, byte 2 bit 1 is posted if the subtask abnormally terminates; that is, if task termination is not the result of issuing the CANCEL, DETACH, DUMP, or EOJ macro instructions. See supervisor and I/O Macros listed in the Preface for more detailed information. DASD FILE PROTECT SUPPORT (DASDFP) I The DASD file protect facility provides read/write file protection for DASDs. All seeks issued by a problem program are monitored by the supervisor to ensure that the seeks do not stray outside of limits that were validated at file open time. (This could occur during the loading of a direct access file.) DASDFP functions on a cylinder basis for the 2311, 2314, and 2319, and on a strip basis on the 2321. DASDFP routines are not executed when the current PSW has a storage protect key of zero. This occurs for supervisor, job control, and transient routines ($$A, $$B, $$R). Mode of Operation Multiple Wait Considerations When control passes to the waiting task, its register 1 points to the address of the ECB that had byte 2, bit 0 set. The user may use CCBs or TECBs in place of ECBs. This is possible because the posting of byte 2, bit 0 occurs upon their event completions. BTAM/QTAM ECBs, QTAM control blocks, and RCBs cannot be waited on because their format would never satisfy a WAITM, i.e., byte 2, bit 0 will never be posted. When waiting on only one ECB, the WAIT macro can be used. When using WAITM, a provision should be made for ultimate outlet if none of the events being waited on occur. For example, an abnormal ending of all the tasks on which a multiple wait was dependent would never allow the multiple wait to be satisfied. The user may specify a preferred event. Consider the f~llowin9 example: WAITM ECBA, ECBB, ECBC. ECBA is considered the preferred event because it appears first on the list. For the same reason, ECBB is considered the 70 DOS system Programmer's Guide Job control or the foreground initiator reads the DLBL/EXTENT (or VOL/DLAB/XTENT) control commands or statements from the input job stream. This information is reformatted and written on the label information cylinder on SYSRES as one or more DASD records. Each of these DASD records is preceded by a key created from the filename (DTF name) entry in the DLBL/VOL command or statement. When the problem program opens the file (DTF), the OPEN transient routine extracts an a-byte alphameric constant from the generated DTF table. This constant is called the filename, and is an exact replica of the DTF name. The OPEN transient routine searches the label information cylinder on SYSRES to find a key equal to this DTF filename constant. When it finds a match, it reads the data portion of this job control DASD record into the label save area in main storage. The extent information is extracted from this job control DASD record, and is stored in the JIB table. A 2311/2314/2319 extent requires one JIB entry; a 2321 extent requires two JIB entries (see Figures 1.21 and 1.22). ~ ~. IQ ~ (I) . I-' Number in Class List (NICL) LUB Table First Class List (FICL) LUB Table for any Partition --,- . II.) I-' \ SYSRDR b CDiSYSPCH ~. SYSLST (') S» ..... • • • • • • • • • • • 112 Main Storage Requirements • • 113 Modular/Tabular System • • • • • • • • 113 DTF (Define the File) Macros • • • • 113 MOD (Module Generation) Macros • • • 114 Reentrant Modules • • • • • • • • • 118 Interrelationships of the DTF and Module Macro Instructions • • 118 Imperative Macros • • • • • • • • • .119 Sequential File Organization. • .122 Card Files • • • • • • • • • • 122 Console Typewriter • • • • • • .122 Line Printers • • 122 Paper Tape Files • • • • • 122 Magnetic Tape Files • • 122 sequential Disk • • 123 Direct Access Method (DAM) File Organization • • • • • • • • .124 Random Addressing Techniques • • • • 124 • • .125 Random Addressing Formula Prime Number Division • .126 Synonym Records • • • • • • .127 DASD Address Specification For Read/Write Operations • • 128 Relative Track Addressing • • • 128 Indexed sequential File Management System (ISFMS) • • • • • • • • • • • .129 Loading an Indexed Sequential File .131 Adding Records to the File • • • • • 132 Random Retrieval • • • • • • • • • • 132 Sequential Retrieval • • • • • • • • 132 Choosing the Right File Organization and Retrieval Method • • • • • • • • • 133 Criteria. • • • • • • 133 Sample Files. • .136 Summary • • • • .138 Section 2: Da~a Management 91 Section Figures Figure 2.1. Fixed Length Unblocked Record Format • • • • • • • • • • • 94 Figure 2.2. Fixed Length Blocked Record Format • • • • • • 95 Figure 2.3. Variable Length Unblocked Record Format • • • • • • • • • • • • • 97 Figure 2.4. Variable Length Blocked Record Format • • • • • • • • • • • • • 98 Figure 2.5. I/O Operation Using PIOCS 101 Figure 2.6. Command Control Block (CCB) (Part 1 of 3) • • • • • • • 104 Figure 2.7. Format of the CCW .106 Figure 2.8. Flowchart for EXCP Coding Example • • • • • • • • • .109 Figure 2.9. Physical IOCS Sample Program • • • • • • • • • • • .110 Figure 2.10. Retrieving a Record Using Logical IOCS • • • • • • • • • • • 112 Figure 2.11. Generated Name Structure for Logic Modules (Part 1 of 2) .116 Figure 2.12. DOS Relocatable Library Module Name Prefixes .118 Figure 2.13. DTF and Module Macro Relationships • • • • .118 Figure 2.14. Coding Example of DTF and Module Relationship • • • • • • • • • • 119 Figure 2.15. Logical IOCS Imperative Macros and DTFs • • • • • • • • • • • • 120 Figure 2.16. Logical IOCS Imperative Macros and Devices • • • • • • • 121 Figure 2.17. Direct Access Address Chaining • • • • • • • • • • • • • • • • 127 Figure 2.18. DASD Address Formats • • • 128 Figure 2.19. Example of Track Index .130 Figure 2.20. Example of Track Index after Addition to File. • • • • • .131 Figure 2.21. File Organization on a Disk/Tape System • • • • • • • • • • • .135 Figure 2.22. Indexed Sequential Versus Sequential File Organization • .137 92 DOS System programmer's Guide Concepts of Data Management This section is written for the reader who seeks a general understanding of the functions and concepts of data structures and storage media. It explains the basic concepts of data organization and defines some of the terms that will be encountered in subsequent sections of this and other IBM publications. The experienced programmer may find this section of interest, but i t is written primarily for the reader whose experience with tape and disk files is limited. DATA FILES AND RECORDS Data files stored on such media as paper, cards, tapes, or disk storage devices, are encountered in practically every business activity. These files provide the basis for most manual, mechanical, and electronic data processing. Data files are composed of individual records ranging from a few records up to thousands or millions of records. A record can be defined as a collection of information comprised of alphameric and/or nonalphameric characters related to a common identifier. The common identifier is known as a record's control field or key. Usually one of the prime information elements (fields) present within a record is used to identify the record. For example, man number could be used as the key or identifier for a payroll record, and policy number could be the key of an insurance policy file. The size or length of records varies from file to file because the size can range from a single character up to thousands of characters. A data field is a sequence of one or more characters treated as a processing unit of information. A single record usually includes one or more logical data fields. An individual data field is normally identified by its location within a record. The logical structure of records and of fields within records has become increasingly important since the advent of computers and high-speed recording media such as magnetic tapes and disks. This logical structure is strongly affected by whether a record is fixed or variable length. Data records of an ASCII tape file may include a block prefix and/or padding characters. These options are in addition to the fields contained in data records written in EBCDIC mode. When present, the block prefix is the first field of a physical record, and it may be 0-99 bytes long. DOS can use this field to check the length of the physical record only with ASCII variable length records. For fixed length and undefined records, DOS ignores the block prefix on input and does not restore this field on output. The length of an ASCII physical record includes the block prefix field and the number of padding characters. Padding characters ensure that all blocks conform with the required length. DOS accepts these padding characters (corresponding to EBCDIC X'SF') on ASCII input but does not perform any padding operation on output. ) section 2: Data Management 93 Fixed lenqth,unblocked (Figure 2.1): Each logical record is the same length as the physical record. For ASCII fixed length, unblocked records, the block prefix and padding characters are optional. Regardless of the IRG = Inter-Record Gap presence of these optional fields. ASCII fixed length with only one logical record per physical record is considered to be unblocked. The number of padding characters must always be less than the size of the logical record. TAPE RECORDS Physical Record IRG = Inter-Record Gap BLPR = Block Prefix (optional) PADDI NG = Padding Characters (optional) G = Gap, ASCII TAPE RECORDS Data Area Data Area Data Area 1 2 3 Area Separator Data Record DISK RECORDS - WITH KEY AREA Data Record G = Gap, Area Separator Figure 2.1. Data Record Data Record 3 4 2 1 DISK RECORDS - WITHOUT KEY AREA Fixed Length Unblocked Record Format c 94 DOS System P~ogrammer's Guide Each physical record in ASCII fixed length, blocked format may contain a block prefix and/or padding characters. The number of padding characters must be less than the size of the logical record. Physical records are deblocked until the number of bytes remaining in the physical record is less than the specified logical record length. Fixed length, blocked (Figure 2.2): Blocked records are usually considered to be two or more logical records within one physical record. The number of records in each block (blocking.factor) is usually kept constant. For example, the illustrations show blocked records with a blocking factor of 3 meaning there are three logical records within each block (physical record). r logical Record 1 IRG 1~ Physical Record = Inter - logical Record 2 rPhysical Record 2~ logical Record logical Record logical Record logical Record 3 4 5 6 r-PhYSiCal Record 3 - - 1 logical Record 7 '""".1----- Physical Record l - - - - I..~I logical Record 1 logical Record 2 '"""1.~--PhYSiCal Record 2 - - - - 1..~1 logical Record logical Record logical Record logical Record 3 4 5 6 log i ca I Record Data Area 1 logical Record Data Area 2 Area Separator Figure 2.2. logical Record 11 logical Record 7 Logical Record logical Record 8 9 '"""14. . . . . - - - - - - Physical Record 2 ------~ .. I 3 logical Record Data Area log i ca I Record Data Area 4 5 DISK RECORDS- WITH KEY AREAS Area Separator log i ca I Record Data Area 1 = Gap, 9 logical Record Data Area Physical Record 1-------.....,~~ G 8 logical Record 10 ASCII TAPE RECORDS I'""". f - - - - - - - - - - Physical Record 1 - - - - - - - - - - - 1.... 11 = Gap, logical Record TAPE RECORDS Record Gap IRG = Inter- Record Gap BlPR = Block Prefix (optional) PADDING = Padding Characters (optional) G Logical Record logical Record Data Area 2 ,..I.f-----~---="-'---Physical Record 2-------~.1 logical Record Data Area Logical Record Data Area 3 4 log ica I Record Data Area 5 logical Record Data Area 6 DISK RECORDS- WITHOUT KEY AREAS Fixed Length Blocked Record Format ) Section 2: Data Management 95 Variable length, unblocked (Figure 2.3): Each physical reco~d contains one logical record that can vary in length. Each record must contain both a block length field (BL) and a record length field (RL) giving the size of the block and the size of the logical record respectively. The first two characters (XX) of the block length field (BL) specify the actual block length in 16-bit binary form. The la~t two characters (indicated by bb) are binary zero. For variable length unblocked records, BL specifies the logical record length plus 4 bytes (the size of BL) •. I The first four bytes following the block length field must contain the record length field (RL). The first two bytes (XX) specify the length of the logical record including the bytes used for RL field itself. The remaining two bytes (bb) are binary zero. I For ASCII variable length, unblocked records, each physical record may contain a block prefix. If the block prefix is four bytes long, it may contain the length of the physical record that DOS can use for checking purposes. Each logical record must contain a record length field (dddd) giving the size of the logical record in unpacked decimal format. If a padding character is found in the first position of a record length field, all remaining bytes in that block are bypassed, and the next logical record is retrieved from the next block. Variable length, blocked (Figure 2.4): One or more logical records are contained within each physical record. The first four bytes (block length field) of each physical record (block) specifies the total number of bytes in the block. The first two bytes (XX) specify the length of the block (including the four bytes for the block length field itself). The remaining two bytes (bb) are blank. The size of each logical record must be placed in a record length field (RL). The RL must be the first four bytes of the logical record. The first two bytes (XX) of RL specify the length of the logical record including the bytes used for the RL field. The remaining two bytes (bb) are binary zero. I For ASCII variable length, blocked records, each physical record may contain a block prefix. For checking purposes, the block prefix may contain the length of the physical record (in unpacked decimal format) if the block prefix is four bytes long. The length of each logical record, also in unpacked decimal format (dddd), must be placed in the first four bytes of the logical record. If a padding character is found in the first position of a record length field, all remaining bytes in the block are bypassed, and the next logical record is retrieved from the next block. Undefined: When file records do not conform to any of the four previous formats, they are classified as undefined. For example, any variable length record not conforming to IBM's variable length format is considered undefined. ~ , ASCII undefined records may include a block prefix and/or·padding characters. DOS will not attempt to distinguish padding characters from the physical record. The entire physical record is passed on to the user. ( 96 DOS System Programmer's Guide Ifr- Phys;col Record ~ Log ical Record ~ Data Data Record 1 Data 7 7 RL Record 3 Record 2 = 80 103 RL = 100 7 1 RL 1 = 50 53 11 I BL = Block Length } 'm b'mary ha Ifwo rd ( 16 b') It f ormat, p I us two bl an k bytes RL = Reco rd Lengt h IRG = Inter- Record Gap G = Gap TAPE RECORDS ~ I Physical R e c o r d - l 1"-- Logical Record-l I Data Data Record 1 Data Record 3 Record 2 IRG = Inter- Record Gap BLPR = Block Prefix (optional) PADDING = Padding Characters (optional) DDDD = length of the physical record if BLPR is 4 bytes long (unpacked decimal) dddd = length of logical record in unpacked decimal format RL = Record Length ASCII TAPE RECORDS r-- ---=I Physical Record Logical Record Data Data Record RL Data Record 2 = 80 RL = 100 Record 3 103 I I I 7 RL = 50 BL = Block Length } RL = Record Length in binary halfword (16 bit) format I plus two binary zero bytes IRG = Inter- Record Gap G = Gap DISK RECORDS Figure 2.3. Variable Length Unblocked Record Format section 2: Data Management 97 Logical Record Physical Record ---1 Data Data " Data RL RL Record 1 Record 2 Record 3 xxbb o 3 14 BL = 234: 7 Record 4 xxbb 83 :84 87 RL = 100 1 RL = 80 Data 1831184187 1 RL = 50 , , 233' 0 7 RL = 56 BL = Block Length }. • . RL = Record Length m bmary halfword (16 bit) format, plus two blank bytes. IR G = Inter-record gap G =Gap TAPE RECORDS . - - - - - - - - - - - - - - Physical Record ------------~ t - - - Log i co I Record Data Data RL Record 1 Data RL Record 2 dddd Record 3 dddd IRG = Inter-Record Gap BLPR = Block Prefix (optional) PADDING = Padding Characters (optional) DODD = Length of the physical record if BLPR is 4 bytes long (unpacked decimal) dddd = Length of logical record in unpacked decimal format Rl = Record Length ASCII TAPE RECORDS .-----------..,..---Ir Physical Record Logical Record-l Data RL = 80 --------------I·~I Data Data RL RL xxbb xxbb 83184 1 I 87 RL = 100 183 184 187 1 RL = 50 I BL -= R Block dlength ipb t L h }.m b'mary ha Ifword (16 b'It ) r format, us two 'mary zero b yes. RL - ecor engt IR G = Inter-record gap G =Gap DISK RECORDS Figure 2.4. 98 Variable Length Blocked Record Format DOS System Programmer's Guide , 233 1 1 BLOCKING RECORDS The length of individual data records varies with the type of data and the application requiring such data. The format design of a data record is very significant to the efficient use of the various storage media available on the system/360 and System/370. One important I element in the design of data records involves what is commonly called blocking and deblocking. Input/output units (storage media) are relatively inefficient when used to store short blocks of information. TO increase the efficiency of input/output units, data records are assembled into blocks of records with size convenient and efficient for processing. Each physical record on either tape or disk requires interrecord gaps. These gaps are blank areas that distinguish beginning and ending points of a record. If records are blocked before loading onto a tape or disk, many of these gaps can be eliminated. One of the most important advantages of blocked records is the increased channel/CPU processing time overlap. The average number of reads required to locate a record can usually be reduced by increasing the blocking factor (number of records per block). The greater the blocking factor, the greater the chance that the next record required will be in the same block. This is an important consideration when designing jobs that involve file searching either on tape or disk. It is particularly important when using disk storage techniques that develop overflow records. overflow records occur when there are more items' assigned to a disk track than can be stored on that track. Blocked records normally require more main storage than unblocked records because main storage has to contain the block of records being read or written on a storage device. Also, more main storage is required to hold blocking and deblocking program instructions. The LIOCS macro instructions are designed to handle the blocking and deblocking of records so that the user need only design the most efficient blocking factor for his particular data file and equipment specifications. LOGICAL FILE VS PHYSICAL UNIT A logical file consists of one record for each item of a group (i.e., an inventory file would contain one record for each inventory item). A physical unites) is used to store a logical file. For example, the IBM 2400 Magnetic Tape Unit, the IBM I I 3420 Magnetic Tape Unit, the IBM 2311/2314/2319/2321 Direct Access storage Devices (DASD) and the IBM 2540 Card Read Punch can be considered physical units when data records punched into cards are being read into the system. A logical file may be of such a size that it requires several reels of tape or disk packs to contain it. Such a file would be referred to as a multivolume file. (Each reel of tape, disk pack or each cell within the 2321 is considered to be a volume.) If a small file does not require an entire reel of tape or disk pack to contain it, the remaining space on the volume could be utilized by another complete or partial file. This volume would be referred to as a multifile volume. DATA MANIPULATION Data manipUlation with DOS is implemented at two distinct levels. The first level, physical IOCS requires extensive knowledge of System/360 and/or System/370 input/output devices, as well as a detailed understanding of the basic assembler language. The second level, logical IOCS, uses a series of IBM-supplied macros to construct and process data files. Logical IOCS requires a minimum knowledge of the hardware I/O devices and is easily implemented within the problem program by the coding of macros. This system is also used by most of the DOS high-level languages to control I/O operations. I Physical Input/Output Control System (PIOeS) Physical IOCS consists of input/output (I/O) routines that handle the actual transfer of data records between external storage devices (cards, tape, disk, etc.) and main storage. Program routines incorporated in the channel scheduler portion of the supervisor handle the following functions of PIOCS: • Building a schedule of I/O operations for all devices on the system (CHANQ table). • Starting the actual I/O operations on a device (SIO). • Scheduling the start of all I/O operations and monitoring all events assQciated with I/O. section 2: Data Management 99 • performing error recovery procedures (ERP) for all DOS supported devices, when necessary. A user's problem program normally uses logical IOCS for file processing. Logical IOCS, in turn, uses physical IOCS to perform actual data transfers. There are occasions, however, when a user may need to bypass the logical IOCS routines to perform a particular I/O operation. (Physical IOCS is implemented at the assembler language level.) Three macro instructions are provided to allow the user to communicate directly with physical Ioes. CCB This macro instruction creates a command control block. This is also considered an event control block (ECB). The CCB contains the user's information about special considerations and/or options that he has chosen for this I/O operation. It is comprised of constant statements (OS) that are used in two-way communications with the supervisor. EXCP This macro instruction is converted to the proper SVC instruction (SVC 0) to request execution of a channel program. It supplies the location of the corresponding CCB to the supervisor. The EXCP macro instruction provides more freedom in controlling devices than the logical IOCS macros, yet retains many of the operational advantages of the Disk Operating system. DOS provides scheduling and queuing of I/O requests, efficient use of channels and devices, data protection, interruption procedures, and error recognition and retry. To use physical IOCS, however, the programmer needs detailed knowledge of device control and system functions. He must supply his own channel programs, using the COW (channel command word) assembler instruction statement (See Channel Command Word section). WAIT 100 This macro instruction tests CCB byte 2, bit 0 (traffic bit) to determine when an I/O operation has been completed. If the operation is not completed, the supervisor gets control until physical IOCS within the supervisor sets the traffic bit to indicate completion of the DOS System Programmer's Guide operation. The WAIT macro should always be issued for each requested I/O operation. Whenever physical IOCS macro are used, the programmer must construct the channel command words (CCW) for his input/output operations. He uses the assembler COW statement to do this. See Channel Command Word for detailed information on the cow. Figure 2.5 and the following text shows how an I/O operation can be traced through physical IOCS. instruction~ A request is made to physical IOCS to start an I/O operation by means of the EXCP macro instruction in the problem program. From information in the CCB, physical IOCS determines the channel for which the request was made and places the request on a queue for that device. If the channel(s) or device is not busy, the I/O is started and control returns to the problem program. If the channel is busy, control returns to the problem program, but the I/O request waits in the channel queue. When the request reaches the top of the channel queue, the I/O is started. Control returns to the program requesting the I/O unless there was an error condition detected on the START I/O (SIO) instruction. The problem program normally continues processing until it requires that the requested I/O operation be complete (either the information being read into main storage is needed or the output area must be freed on an output operation). At this time, the WAIT macro should be issued. The WAIT macro causes the now waiting task to be removed from task selection until the proper interrupt is processed for this device by the supervisor. Any problem program that is running will be interrupted when the I/O operation is complete (all data transferred to or from main storage and the external device and no permanent errors have been detected). At this point, the request is removed from the channel queue and normal task selection resumes. If an error was detected that could not be corrected by the device error routines, the problem program or the computer operator would be notified via a message on SYSLOG. User error routines can be notified via the CCB to handle conditions such as wrong length record. Physical IOCS always attempts to perform its function so that the time for executing an I/O operation is overlapped with the I/O operations on other channels and also allows the I/O operations to be overlapped with processing. SUPERVISOR CHANNEL INTERFACE PROBLEM PROGRAM CHANNEL SCHEDULE ROUTINE •• . (" •• \ · / I / / I / I ·."-·· I . " \ START I/O \\ \ .',', \ • • \ ,~ " \ ....... , " , ", r·--- I TEST I I READCCB L-_ --~ · Figure 2.5. \ '. I/O INTERRUPT ROUTINE • , • ' ,,/', .-----, • / , . / , / C~B; SYSIPT, RDCCW ' 'I • • I CCW OS •• I' I .. - - - ---,~_~ ____ : RDCCW INAREA I '" ,\ WAIT READCCB' , I I/O DEVICE I/O REQUEST TABLE (CHANQ) ..J I 2,INAREA, X'20',80 Cl80 I/O Operation Using Ploes Section 2: Data Management 101 Command Control Block (CCB) error does exist. The only,additional information that the supervisor provides under this circumstance is the CSW status information posted in bytes 4 and 5 of the user CCB. If the user specifies the fourth operand (sense Address), the sense information is present in the sense area that the user has specified (if an error condition existed at the end of the I/O operation). The CCB establishes communication between the problem program and physical IOCS. The CCB is two doublewords in length with eight major fields, as shown in Figure 2.6. The optional 8 bytes are generated if the user requests that a sense operation be performed, on an I/O error. Data transferred from the device to main storage during a sense operation provides information concerning both unusual conditions detected in the last operation and the status of the device. All data in the CCB is in the hexadecimal format. The eight fields of the CCB are listed and described as follows: 1. 2. Count Field (Bytes 0,1): Contains the residual count from the channel status word (CSW), that is stored by PIOCS when the CCB is removed from the queue.. The residual count in conjunction with the original count specified in the last ccw used, indicates the number of bytes transferred to or from the area designated by the Ccw. When an input operation is terminated, the difference between the original count in the CCW and the CSW is equal to the number of bytes transferred to main storage. For an output operation, the difference is equal to the number of bytes transferred to the I/O device. 3. 4. Symbolic Unit Number (Bytes 6,7): Contains the 2-byte hexadecimal representation of SYSnnn (symbolic unit). This value represents the location of the logical unit in the LUB table (see Figure 1.19) and is placed in the CCB by the problem programmer's specification of the symbolic unit to be used for this I/O operation. The symbolic unit is converted to a 2-byte hexadecimal representation by the CCB macro. The first byte indicates the class of the symbolic unit (system class=X'OO', programmer class=X'Ol'). The second byte of the representation indicates the number of the unit within one of the previously mentioned classes. An example of such a conversion can be illustrated with the symbolic unit SYS007, which converts to X'0107'. 5. Byte 8: Contains the length of the block prefix. This length is X'00'-X'63' for ASCII input tapes and X'OO' or X'04' for ASCII output tapes. For EBCDIC tape files, this byte is always X'OO'. 6. CCW Address (Bytes 9-11): Contains the address of the CCW that is associated with this CCB. This address is placed in the CCB by the specification of the second operand of the CCB macro. In the case of chained Transmission Information (Bytes 2 and Used for two-way communication between the supervisor and the problem program. Each bit within these two bytes represents either a condition that was detected by the supervisor and posted to the user, or a user option to be communicated to the supervisor. Refer to Figure 2.6. The designation pr.pr. indicates those bits that the problem programmer may set and are not reset by the supervisor for each I/O request. PIOCS indicates those bits that the supervisor is capable of setting/resetting just before each I/O operation associated with this CCB. DOS System Programmer's Guide CSW Status Bits (Bytes 4,5): Contains the CSW status information that is stored by PIOCS before control returns to the problem program. Note: The particular bits that are turned on in bytes 2 through 5 indicate the conditions that were detected by PIOCS and/or the problem program by the specification of the third operand of the CCB macro. 1L: The user options may be initialized at assembly time by specifying the third operand of the CCB macro. (See supervisor and I/O Macro listed in the Preface for detailed information for coding the CCB). A third operand with a value X'OlOO' instructs PIOCS to return to the user after each I/O operation for this CCB whether or not any errors have occurred. It is then up to the user to handle all aspects of error recovery and/or retry, even to the point of determining if an 102 Note: Bytes 2 through 5 are ANDed off (mask setting is X'lF050000') by PIOCS when the CCB is placed in the queue. Communication bits that were set on by the problem program are left on because an AND instruction is used by PIOCS for resetting bytes 2 through 5. CCWs, this operand specifies the address of the first ccw. 7. Byte 12: Contains information used by physical IOCS that must not be modified by the user. 8. CCW Address in CSW (Bytes 13-15): Contains the CCW address from the CSW stored by PIOCS before control returns to the problem program. A CCB that has been queued by PIOCS to service a problem program I/O request cannot be used for a second problem program I/O request until the first request has been completed. 9. Optional Sense CCW (Bytes 16-23): Bytes 16-23 are appended to the CCB by the CCB macro expansion when the user wants sense information on unrecoverable I/O errors returned. If the user specifies a sense address by coding the fourth operand of the CCB, an 8-byte CCW for reading sense information is generated as t~e last field of the CCB. The name field (sense address) of the area that the user supplies must have an assigned length attribute of at least one byte. Physical IOCS uses this length attribute in the ccw to determine the number of bytes of sense information the user wants at this sense address. For more detailed information concerning this sense information see the Principles of Operation listed in the Preface. For detailed information regarding the actual coding of the physical IOCS macros refer to Supervisor and I/O Macros listed in the Preface. section 2: Data Management 103 ...-------r-------,r---------,-------r--------., - - - - - -_._, ~ ..... ~ 0 \Q &: s:: Bytes-.\Or. 5 Yes Yes No No Document feeding stopped. No Channel data check or Busout check. Yes No 1 User Error Routine Data check in DASD count Field. Data check - 1285, 1287, or 1288. MICR - SCU not operational. 3211 Print Check (equipment check). 1 X'80' I/O requested and not completed. I/O error passed back due to program option or operator option. 1017/1018 data checks. Return any DASD data checks. 51 Mask for Test Under Mask Instruc ti on Unrecoverable I/O Error 4 1 2671 data check. 3 I/O Completed. Normally set at Channel End. Set at Device End if bit 5 is ON. 0 On Values for Third Operand in CCB Macro X'80' No No No X'40' X'20' - Figure 2.6. command Control Block (CCB) (Part 2 of 3) Section 2: Data Management 105 Condition Indicated Bit Byte 3 3 4 Tape read data check (2400 - series or 2495); 2540 or 2520 punch equipment check; or any DASD data check. 1017/1018 data check. 1285, 1287, or 1288 equipment check. 3211 data check (print check). Operation was unsuccessful. Byte 2, bit 2 is also ON. Byte 3, bit 0 is OFF. Yes Yes Yes Questionable Condition. Card: Unusual command sequence (2540) . DASD: No record found. 1285/1287/1288: Document jam or torn tape. Yes Nonrecovery UCSB parity check (command retry). .. 5 No Set the questionable condition bit ON and return to user. 6 Verify error for DASD or Carriage Channel 9 overflow Yes. (Set ON when Channel 9 is reached only if Byte 2, bit 5 is ON). Yes No Yes No Retry begins at last CCW executed. Retry begins at first CCW of channel program. Command Chain Retry X'JO' X'08' Retry command if no record found condition occurs (disk) . 1 Mask for Test Under Mask Instruction No No No No record found condition 7 3 No 51 1287 document mode -late stacker select. 1288 End - of - Page (EOP). 2 o (OFF) 1 (ON) On Values for Third Operand in CCB Macro X '0004' X'04' X'02' No X'OOOI' X'OI' User Option Bits. Set in CCB macro. Physical 10CS sets the other bits OFF at EXCP time and ON when the condition specified occurs. I/O program check, command reject, or tape equipment check always termi nates the program. For System/360, the user must handle all error or exceptional conditions except Channel Control Check, Interface Control Check, I/O Program Check, and I/O Protection Check. For System/370, the user may handle Channel Control Checks and Interface Control Checks. The occurrence of a channel data check, unit check, or chaining check causes a byte 2, bit X'20' of the CCB to turn on, and completion posting and dequeuing to occur .1/0 program and protection checks always cause program termination. Incorrect length and unit exception are treated as normal conditions (posted with completion). Also, the user must request device end posting (CCB byte 2, bit X'04') in order to obtain errors after channel end. Error correction feature for 1018 is not supported by physicallOCS. When a 1018 data check occurs and CCB byte 2, bit X'02' is on, control returns directly to the user with CCB byte 3, bit X'10' turned on. A line position error can occur as a result of an equipment check, data check, or FCB parity check. Figure 2.6. Command Control Block (CCB) (Part 3 of 3) Channel Command Word (CCW) Command Code To aid the programmer in using physical IOCS, an assembler instruction statement, CCW (channel command word), is provided. This ccw assembler instruction statement is a convenient means to define and generate the a-byte channel command words needed for the channel program. See Figure 2.7 for the format of the CCW assembler instruction. The ccw command code (1 byte) may be expressed as a decimal number, hexadecimal representation, or as a symbol that has been equated to the proper hexadecimal or decimal value (e.g., 19, X'13', PR, where PR EQU 19 respectively). The assembler moves, or converts and moves, the command code to the first byte of the machine language CCW it is generating. Each I/O device has a specific set of commands to which it will respond; any other commands to that device are rejected. r------T---------~-----------------------, IName I Operation I Operand I ~------+---------+------------------------~ I Any ICCW IFour operands separated I I Symbol I Iby commas specifying the I lor Not I Icommand code, data ad- I ILUsed dress, flags, and count. I ______ I _________ I ______________________ ~ Figure 2.7. 106 ~ Format of the CCW DOS System Programmer's Guide ~-~ Data Address This field must contain a data address unless the CCW command is a control command (for example, skip to channel 1 for a printer). Normally this field is expressed as a symbol for ease of program relocation and reflects the address of the input/output area. The third field of the CCW mnemonic is used to communicate special considerations to the channel regarding this CCW. The value of the flag byte may be expressed as a decimal number, hexadecimal character or as a symbol that has been equated to the proper decimal or hexadecimal value. Although it is referred to as the flag byte, only the five high order bits (bits 32-36 of the resultant CCW) represent individual flags. The three low order bits must be zero in their final hexadecimal form. The function of each flag bit is as follows: Bit 32 (High Order Bit of the Flaq Field): This is the chain data (CD) flag. Chaining refers to a series of CCWs in contiguous (consecutive) doubleword storage locations that are linked to each other forming a chain. Data chaining permits the reading or writing of an I/O record from different areas of main storage. If the CD flag bit is set to on), the data address and count sequential CCW are also used in data record. Both CCWs pertain I/O record. 1 (CD flag in the next storing a to the same When data chaining, the command bytes of successive CCWs are ignored (unless it is a transfer in channel (TIC», but the field must contain a valid command. only the first CCW's command byte is used. It is important to note that data chaining pertains to only one I/O operation or data record. This could be one punch card or one tape record or one line of print and so forth. Example: TO read columns 1-30 of a punch card into storage beginning at location ONE and columns 31-S0 into storage beginning at location TWO, two CCWs could be used. The first CCW would have its CD flag bit set to 1 as shown: CCW1 CCW CCW 2,ONE,X'SO',30 2,TWO,X'00',50 CCW1 causes thirty bytes to be read into storage starting at location ONE. The second CCW causes the next fifty bytes of the card to be read into storage starting at location TWO. Note: The ability to data chain is dependent upon device and channel speeds. J &00 Q (oO o I) 10 r\ til'" Bit 33: Bit position 33 of the CCW is the command chaining (CC) flag. This bit when set to one causes the next sequential CCW to initiate another operation on the same I/O device. For example, i t is possible to read two cards into main storage as a result of one EXCP macro instruction. Two CCWs with the CC flag set in the first CCW are required. CCW1 CCW CCW 2,DATA,X'40',SO 2,DATA+SO,X'OO',SO In this example, CCWl initiates a read command. The first card is read into storage locations DATA through DATA+79. Because the CC flag bit in the first CCW is set to one, the second CCW is used to initiate another card read operation. The next card is read into storage locations DATA+80 through DATA+159. Note that when data chaining, only one I/O operation occurs. The data from the one I/O record is placed in main storage under control of two or more CCWs. When command chaining, each CCW controls a different I/O operation. The commands that are chained do not need to be the same. For instance, it is possible using one EXCP macro instruction to do a write-backspace-read combination with a magnetic tape unit by command chaining with three CCWs in one EXCP macro instruction. When command chaining, an I/O interrupt cannot occur at the end of each command, but can occur when the last command is executed. When command chaining, each command processes one physical record. If the byte count of the record does not agree with the count field of the CCW, an incorrect length indication results. Bit 34: Bit position 34 of the CCW is the suppress incorrect length indication (SLI) flag. The SLI bit may be turned on to prevent an indication to channel of an unequal compare between the byte count specified in the CCW and the actual bytes read from the record. Example of Incorrect Length: If you want to read columns 1-50 of a card into main storage starting at location BUFFER and bypass the remaining 30 columns, the following CCW can be used: CCW1 CCW 2,BUFFER,X'20',50 An incorrect length indication results because one CCW causes the device to process one complete record and the device section 2: Data Management 107 could not be stopped on the 51st byte. When an incorrect length indication occurs, the status bit in the CCB is set for testing by the programmer. If the SLI flag bit is on, it suppresses the incorrect length indication for each data record. For example, if you want to read columns 1-40 of a card into main storage starting at location BUFFER1 and columns 41-60 into main storage starting at location BUFFER2, the following two CCws could be used: CCW1 CCW2 CCW CCW 2,BUFFER1,X'SO',40 0,BUFFER2,X'20',20 CCW1 causes 40 bytes to be read into main storage starting at location BUFFER1. CCW2 causes the next 20 bytes of the card to be read into storage starting at location BUFFER2. A breakdown of the flag bytes would be: CCW1 Data Chaining CCW2 Suppress incorrect length indication Note that the SLI flag is not required for the first CCW. The incorrect length indication is relevant to an entire data record and not to a given ccw. The SLI flag is present in the second CCW because it is the last CCW for the record and the total value of the two CCW count fields does not equal the actual record length. Bit 35: Bit position 35 of the CCW is the SKIP flag. The SKIP flag suppresses the transfer of information into main storage. It can be used together with the data chaining feature to read selected portions of an I/O record into main storage. To do this, the CD flag is used along with bit 35 of the CCW. For example, if columns 51-SO of a punch card are to be read into locations DATA through DATA+29, the card reader reads all SO columns of information and attempts to transfer SO bytes of data into main storage. The channel needs 2 CCws. CCW1 CCW CCW 2,DATA,X'90',50 2,DATA,X'00',30 CCW1 has both the CD and the SKIP flag bits on. Because the skip flag bit is on, CCW1 is used to suppress the transfer of data into lOS DOS System Programmer's Guide main storage. The count field causes 50 bytes to be bypassed. Because the CD flag bit is on, the second CCW is fetched after the first 50 bytes have been skipped. The second CCW causes bytes 51 through SO to be read into storage starting at location DATA. Bit 36: Bit position 36 of the CCW is the program control interrupt (PCI) flag. CPU normally receives an I/O interrupt at the end of the I/O operation. However, bit position 36 of the CCW can be used to signal an I/O interrupt before the end of the operation. When a CCW is fetched that has its PCI flag bit on, CPU receives an I/O interrupt as soon as it can accept it. In this way, CPU is notified of the progress of an I/O operation. This notification could be used to initiate the processing of the data records that have been read into main storage by the preceding CCws in the chain. I/O interrupts normally occur at the end of the operation. An interrupt caused by PCI would not affect the I/O operation. The interrupt is taken by the CPU and the I/O operation continues in the same manner as if the interrupt had not occurred. The PCI-caused interrupt occurs as soon as possible after start of execution of the command containing the PCI flag. The occurrence of the interrupt may be delayed, depending on the model of system/360 and/or the particular device that it is operating. A more detailed explanation of the CCW flags can be found in Principles of Operation listed in the front of this manual. The count field gives the total number of bytes in the storage area (the physical size of the records being read or written). The count field specifies any number of bytes up to 65,535. Except for a CCW specifying a transfer in channel, the count field cannot contain the value zero. To illustrate the use of physical IOCS, Figures 2.S and 2.9 show a sample program with a related flowchart,. Figure 2.8. Flowchart for EXCP Coding Example Section 2: Data Management 109 PAGE LOC OBJECT CODE AOOR1 AOOR2 000000 OOOOOQ 000002 0'540 600002 4130 0006 00006 OOI'lOtA 0204 4002 410B 00002 0010B 1)0005C 00('1060 000064 000068 4361) 4166 4260 4630 4006 0001 4006 4034 00006 00001 00006 00034 00006F 0700 01)00110 1)001)81l I)OOOCO Doooe8 00':'01)(' 00(01)7 000(1)8 00001'0 O,,00E8 OOOOFO OOOOFIl 000100 00010('1 000101'1 OOr:'12C 0700000040000006 2900000760000004 0800ooB800000000 0600010020000050 00000000000000 E50503F1 0('100000000 0700000040000006 3100000260000005 080000E800000000 OE0001002000008C 1'101'11 A9 00000000000000 0001110 0900018C6000000C 000188 -1 0 00010020000050 LOC - 0001CO 0001C8 00011)0 000108 VTOCCCW CCW LONG SEEK ,SEEK,CC ,6 SEEK TO THE VTOC CYL INOER/HEAD SEARCHIO CCW SRCHIDE,SEEK+2,CC+SLI,5 SEARCH 10 EQUAL FOR VTOC RCD CCW TIC,SEARCHIO,O,O TIC BACK TO SEARCH CCW REAOKOTII,VTOCRCO,SLI,L'VTOCRCO READ KEY/OATil FROM VTOC VTOCRCO OS OC1140 VOLUME OS OCL80 KEY OS CL44 DATIl OS CL96 VOLHEAO OC C'VOLUME LABEL' KEYHEAO DC C'VTOC KEY' DATAHEAO OC C'VTOC DATA' ******************************************************************** * PRINT VOLUME HEADER AND SPACE ONE * PRINT VOLUME LABEL AND SPACE THREE * ******************************************************************** *. 090'1019860000008 190001006000002C 0900(11 A060000009 1900012C2(1(100060 (1)1)0~1 OOOO!'F 1)00009 01'1001 ° 000080 000040 OOOO:?O 0('0010 OOOOn.'! 000000 00000(170 0001)0090 (1)('(1')080 onn('Hl(' 40 STMT 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 15<1 16(1 SOURCE STIITEMENT 110 Physical Ioes - 0030 0020 00005 0070 0080 0090 0100 0110 0120 0140 0180 0190 0210 0220 0270 0330 0340 0350 03600370 0380 0390 - - - - - - - - - - - - - - - - PAGE - - - -2 FOOS CL3-5 10/31/69 * PRINT KEY OF VTOC RECORD * PRINT DATA HEADING * PR INT DATA POll TI ON OF VTOC RECORD * ******************************************************************** VTOCPCCW CCW PRINTSP1 ,KEYHEAO,CC+SLl ,L' KEYHEAD CCW PR I "lTSP3 ,KE Y,CC+S LI ,L' KEY CCW PRINTSP1,DATAHEAO,CC+SLI,L'OATAHEAO CCW PRINTSP3,OATA,SLl,L'OATA * ******************************************************************** * ,SAMPLE OASO CHANNH COMMAND EQUATES * ******************************************************************** LO"lGSEEK EQU 07 SRCHKEYE EQU 41 TIC EQU 08 REAOOATA EOU 06 SRCHIOE EQU 49 READKOTA EQU 14 * ******************************************************************** * SAMPLE 1403 OR 1443 PRINTER COMMAND EQUATES * ******************************************************************** PRINTSP1 EOU 09 PRINTSP3 EQU 25 * ******************************************************************** * FLAG OPEIIANOS * ** ADO SYMBOLS TOGETHER FOR COMBINATIONS SUCH AS CO+SL 1************* * ******************************************************************** CO EOU 128 CHAI N DATA CC EQU 64 COMMAND CHAIN SLI ~QU 32 SUPPRESS LENGTH INDICATION SKIP EQU 16 SKIP PORTIO"lS OF THE RECORD PCI EQU 8 PROGRAM CONTROLLED INTERRUPT ENOCCWS EOU 0 END ,OF CCW LI ST END =A (VOLREAOI =A (VOLPRT) =A(VTOCREAOI =AIVTnCPRT) [ Figure 2.9. 0010 120 VOLPTCCW CCW PRINTSP1,VOLHEAO,CC+SLI ,L'VOLHEIID 121 CCW PRINTSP3,VOLUME,SLl ,L'VOLUME 122 * ****************************************.**************************** 123 * PRINT VTnc KEY HEIIOING AOOR1 AOOR2 000007 1'100029 001'(01)8 0000')6 01)1)11'(1 oonlE4 OnC11'8 (\''''11'r STAR T 0 PR I NT NOGEN BALR 4,0 U5I-NG ~,4 .lA 3,6 EXCP VOLREAO READ THE VOLUME LABEL WAIT VOLREAO WAIT FOR THE. READ TO COMPLETE MVC SEEK+2(51,VOLUME+ll SET UP SEEK/SEARCH ARGUMENT EXCP VOLPRT PRINT THE VOLUME LABEL 21 WAIT VOLPRT WAIT FOR PRINT TO COMPLETE 27 REAOVTOC EXCP VTOCREAD READ THE VTOC 31 WAIT VTOCREAO WAIT FOR THE READ TO COMPLETE 37 PRTVTOC EXCP VTOCPRT PRINT A VTOC RECORD, KEY AND DATA 41 WAIT VTOCPRT WAIT FOR PRINT TO COMPLETE 47 IC 6,SEEK+6 UPDATE THE RECORD COUNT IN THE 48 LA 6,1(61 SEEK/SEARCH ARGUMENT 49 STC 6,SEEK+6 STORE UPDATED 10 INTO SEEK/SEARCH ARG. 50 BCT 3,REAOVTOC 51 EOJ EOJ 54 CNOP 0,4 SYS004,VOLCCW 55 VOLREAO CCB 66 VTOCREAO CCB SYS004, VTOCCCW SYS006, VOLPTCCW 77 VOLPRT CCB 88 VTOCPRT CCB SY S006, VTOC PCCW LONGSEEK,SEEK,CC,6 SEEK TO CYLINDER 0, .HEAO 0 99 VOLCCW CCW SRCHKEYE ,KEYSCH,CC+SLl ,4 SEARCH KEY EQUAL (VOL11 100 SEARCHKY CCW 101 CCW TIC,SEARCHKY,O,O TIC BACK TO SEARCH REAOOATII,VOLUME,SLl ,L'VOLUME REIID VOL LABEL DATA FIELD 102 CCW 103 SEEK DC X' 00000000000000' 104 KEYSCH DC CL4'VOLl' - - - - -- - - - -- - - - - - - - - - - - OBJt=CT CODE FOOS CL3-5 10/31/69 SOURCE STATEMENT 1 01 SKR EAO 2 3 4 5 6 REAOVOL 10 16 17 PRTVOL 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 ')onll~C E506D3E404C54003 00019A E5E306C34002C5EI! 0"01 AO E5E31l6040 C4C1 E3 -- - - - - - - - SHIT 1 Sample Program DOS System Programmer's Guide 0460 - Logical Input/Output Control System (LIOCS) LOGICAL IOCS PROCESSING METHODS Logical Ioes (LIOCS) provides data management functions required to locate and access logical records in a file (just as the problem programmer would). LIOCS uses physical IOCS to accomplish actual data transfer and device control. The data management functions include: The IBM Disk Operating System provides logical IOCS routines to process records in sequential order, in random order by the Direct Access Method (DAM), or randomly and sequentially by the Indexed Sequential File Management System (ISFMS). Sequential processing applies to all files on serial I/O devices (such as card reader, tape, printer, etc), and to records on IBM 2311, 2314, and 2319 disk or 2321 data cell devices when they are processed serially. The types of processing performed by DAM and ISFMS apply only to files of Direct Access storage Device (DASD) records. • Organization (blocking and deblocking) of logical records. • Control (switching) of I/O areas when more than one area is used. • Handling of the open and close requirements, and end-of-file and end-of-volume conditions. • Resolving symbolic references to physical I/O devices. • Translating data in the I/O areas from ASCII to EBCDIC (on input) and from EBCDIC to ASCII (on output). with IBM-supplied macro instructions, logical IOCS eliminates the repetitive detail coding required for standardized input and output routines. These logical IOCS macros, referred to as imperative macros, supply the facilities for reading, writing, blocking and deblocking records, file labeling, and error checking. To make use of these facilities, logical IOCS imposes certain requirements that must be handled by the problem programmer. These include descriptive entries in other IBM-supplied macros, called declarative macros, to specify the characteristics of a file that is to be processed by logical IOCS. The IBM assembler program uses the descriptive information when processing the macro statements to tailor the logical IOCS routines for the specific application. Logical IOCS handles data transferred to or from I/O devices as logical files of data. When logical IOCS determines that an I/O area contains no logical record (or records, in the case of blocked records) needing processing, it issues a physical IOCS macro to execute the actual data transfer. Figure 2.10 shows the relationship between logical and physical IOCS for a logical IOCS imperative GET macro issued to an input file when one I/O area is used. Logical IOCS is a generative system that uses the capabilities of a macro language. It is this generative nature that provides the problem programmer with the ability to include only those routines needed for a specific job or job step. Logical disk files can be data set secured. A data-secured file cannot be accessed accidentally by problem programs. The data set security function provides a record on the system log each time a data-secured file is opened. It is the user's responsibility to insure data security. In addition, logical disk files can have the track hold option. When track hold is specified in the DTF, a track that is being modified by a task in one partition cannot be concurrently accessed by a task or subtask in the same or another partition provided that all programs competing for a track specify the track hold option. Any program that does not use the track hold option will not be denied access to a track, and can modify a track that is being held by another program. Therefore, all programs accessing the same file should have the track hold option. Sequential Processing Sequential processing reads, writes and processes successive records in a logical file. For example, card records are processed in the order the cards are fed. Tape records are processed starting with the first record after a header label and continuing through the records to the trailer label. DASD records are processed starting with a beginning DASD address and continuing in order through the records on successive tracks and cylinders to the ending address. A sequential file on DASD is contained within one or more sets of limits called extents that are specified by the user in job control EXTENT/XTENT statements or commands. If the logical file consists of more than one set of limits, logical IOCS automatically processes each set as required by the user. The records within Section 2: Data Management 111 Problem Program Partition Supervisor I Problem Program Logical lacs I I Physical lacs (Channel Scheduler) I/o Device I Issue GET Provide record (deblock) and return to the Problem Program, I or If I/O required, issue EXCP macro I I I I I I I Determine channel and: and a) If channel is not WAIT mtcro t Return to the Problem Program when I/O is comple~e, or, if an Next instruction after GET macro expansion Figure 2.10. ASCII input file, translate data to EBCDIC in I/O area and return to problem. program. ~busy, start I/O b) If channel is busy, place in channel queue and return to LlOCS. I Start Device 1 I/O Complete I When I/O'is complete, return to LlOCS via Jnterrupt Rou ti ne • I Retrieving a Record Using Logical IOCS each set must be adjacent and contained within one volume (disk pack or data cell). The sets are not required to be adjacent or on the same volume. sequential processing of a DASD file written by the Direct Access Method can be performed if the physical structure of a sequential file is present. record key, if records contain key areas, or the record identifier (ID) that is in the count area of each DASD record. Logical IOCS seeks the specified track and searches for the record on that track, or on the succeeding tracks in the cylinder. Direct Access Method (DAM) Indexed Sequential File Management System (ISFMS) The Direct Access Method (DAM) processes records contained on IBM 2311, 2314, 2319, or 2321 DASD devices that are usually organized in a random manner. Logical IOCS locates a DASD record for processing by referring to a record location reference supplied by the problem program. The location reference consists of two parts: a track reference and a record reference. The track reference specifies the track (or the first of multiple tracks) to be searched for the record. The record reference may be the 112 DOS system Programmer's Guide DASD records contained within an indexed sequential file can be processed in a random order or in sequential order by control information. Both orders use the control information of the records (such as employee number, part number, etc), that is available in the key area of each DASD record. Any record stored at any location in the logical file can be processed by the random me~hod. The user supplies ISFMS with the key (control information) of the desired record. ISFMS searches for the record and makes it available for processing. In sequential processing, ISFMS makes a series of records available. The records are available one after the other in order by the control information (key) in the records. The user specifies the first record to be processed. ISFMS retrieves the succeeding records (on demand) from the logical file, in key order, until the problem program terminates the operation. ISFMS creates an organized file and then adds to, reads from, and updates records in that file. The file is organized from records that are presorted by control information. As the DASD records are loaded, ISFMS constructs indexes for the logical files. The indexes permit individual records to be found in subsequent processing operations. The indexes are created in such a way that records can be retrieved randomly or sequentially. If records are added to the file at a later date, ISFMS updates the indexes to reflect the new records. MAIN STORAGE REQUIREMENTS Logical IOCS routines are generated as part of the problem program. Imperative macro expansions, that serve as linkages to the logical or physical IOCS routines, are generated in-line at the point the macro is used in the problem program. The open, close, EOF/EOV, and other special purpose routines are called into the B-transient (logical transient) area as required. The physical IOCS routines used by logical IOCS are generated as part of the supervisor program. MODULAR/TABULAR SYSTEM The terms modular and tabular mean that the system uses tables in conjunction with data handling modules to implement its functions. The modular/tabular system has the following advantages: • Saves assembly time by allowing the data handling modules to be generated separately and stored in the relocatable library for subsequent use. • Uses one module for many files if the device types are the same and the files are similar. The major advantage is the ability to use one logical IOCS module with many different files. It not only saves a large portion of main storage but also makes the system more versatile. The modular/tabular combination for a specific file is generated by two macros: the file definition macro in the form DTFxx, and the module generation macro in the form xxMOD. The file definition macros describe the logical file, indicate the type of processing to be used for the file, and specify main storage areas (work area, I/O area, etc.) for the file,. A number of file definition macros define the files processed by logical IOCS, and one defines files processed by physical IOCS (DTFPB). The file to be processed determines the type of file definition macro to use. The module generation macros generate the data handling logic modules. These modules contain generalized routines needed to perform the functions of the logical. IOCS imperative macros. The generalized routines in the logic modules are altered and made more specific through various parameters (specified by the problem programmer) included in the xxMOD macro statements. It is possible, therefore, to generate many variations of a particular type of logic module, each specifically suited to the need of the problem progranuner. DTF (Define the File) Ma.cros Whenever logical IOCS imperative macro instructions are used in a problem program to control the transfer of records in a file, that file must be defined by a declarative DTF macro instruction. The DTF macro instruction describes (through various parameters specified by the problem programmer) the characteristics of the logical file, indicates the type of processing for the file, and specifies the main storage areas and routines. Detailed descriptions of the logical IOCS file definition (DTF) macros and their parameters appear in Supervisor and I/O Macros listed in the Preface. In general, the IBM-supplied file definition (DTF) macros are device oriented. In addition, three macros, DTFSR, DTFBG and DTFEN are supported by the Disk Operating system to provide upward compatibility from the IBM System/360 Basic Operating System (SK system). A brief description follows for each of the DTF macros available to users of the IBM Disk Operating system. Section 2: Data Management 113 DTFCD: Define The File for a Card Device. To define a file associated with the records on a card unit. I DTFCN: Define The File for a CoNsole. To define a file associated with the console (1052, 3210, 3215) printer. DTFDA: Define The File for Direct Access To define a file when DASD (Direct Access Storage Device) records are to be processed by the Direct Access Method. I method. DTFDI: Define The File for Device Independent system files. To define files assigned to the device independent system logical units SYSRDR, SYSIPT, SYSPCH, and SYSLST. DTFIS: Define The File for Indexed sequential file management system. To define a file organized and processed by the indexed sequential file management system. DTFMR: Define The File for Magnetic Recognition. To define a file associated with a magnetic ink character recognition (MICR) device. DTFMT: Define The File for Magnetic Tape. To define a file associated with a magnetic tape device. When a DTFPH macroinstruction is encountered at assembly time, the assembler builds a DTF table that includes only the parameters needed for the OPEN, CLOSE(R), FEOV, and FEOVD routines. The OPEN, CLOSE(R), FEOV, andFEOVD macro expansions call the open and close routines into the supervisor B-transient area at object time. DTFPR: Define The File for a PRinter. To define a file associated with a printer device. DTFPT: Define The File for Paper Tape. To define a file associated with a paper tape device. DTFSD: Define The File for Sequential DASD. To define sequential files on a direct access storage device (DASD). DTFSR: Define The File in a SeRial type file device. To define a file for sequential processing of records on any IOCS supported I/O device. The DOS DTFSR macro definition accepts either the BOS or BPS DTFSR macro as valid input. After determining the device type reqUired, the DOS DTFSR macro calls the appropriate DOS DTF macro from the source statement library. The DTF macro called by the DOS DTFSR then sets up a DTF t~ble in the usual manner. DTFOR: Define The File for an Optical Reader. To define a file associated with an optical character reader device. The DOS DTFSR macro definition only allows upward compatibility and should not be used as a statement in the user's DOS source deck. DTFPH: Define The File for processing by PHysical IOCS. To define a magnetic tape or DASD file with standard labels that is to be processed by physical IOCS when the OPEN and CLOSE macros are used for label processing. DTFPH parameters define the magnetic tape and DASD files. No other files processed by physical IOCS require definition. DTFBG: Define The File for BeGin-definition. Must be punched with DTFBG in the operation field and DISK in the operand field. The name field is left blank. DTFBG is included in DOS to provide compatibility with the BOS DTFSR macro instruction. Only the following logical loeS functions can be performed for files defined by a DTFPH macro: DTFEN: Define The Field ENd. To show there are no more DTF source statements to process. The DOS DTFEN macro definition allows upward compatibility for BOS and BPS users. • Check the header labels on input files, and close these files when requested. MOD (Module Generation) Macros • For ASCII tape files only: Translate labels to EBCDIC for input files and check them. Create labels and translate them to ASCII for output files. • Create header labels on output files, and create trailer labels when the file is closed. • Force end-of-volume on an output file when requested. 114 DOS System Programmer's Guide Each DTF (except DTFCN, DTFPH andDTFSR) is linked to a logical IOCS module generated by an xxMOD macro instruction. These modules provide the necessary instructions to perform the input/output functions required by the problem program. For example, the module can read or write data, test for unusual input/output conditions, block or deblock records, or place logical records in a work area. Some of the module functions are provided on a selective basis, according to the parameters specified in the xxMOD macro instruction. The problem programmer has the option of selecting (or omitting) some of these functions according to the requirements of his program. Omitting some of these functions results in smaller maip storage requirements for a particular module. There are two options for MOD macros. The user can: 1. Insert the MOD macro instruction with its file parameters in the problem program source deck. In this case, the logic module is assembled in-line with the problem program. 2. Choose at system generation time to generate the logic modules needed for his file formats and system configuration. To do this, source decks using macro parameters to describe the file attributes are punched for each MOD macro statement. The logic module macro definition generates its own unique name, or the user can name the module in the name field of the MOD macro statement. The user name overrides the name the macro definition normally generates. For each type of xxMOD macro, the problem programmer can generate many logic modules by issuing the macro with varying parameters for each required module. The logic modules can be cataloged in the relocatable library. The CATALR control cards are automatically generated when the module is assembled. At assembly time, the assembler produces an EXTRN (External Symbol) card for every V-type constant (or EXTRN statement), in the user program. The assembler expansion of the DTF statement produces an EXTRN card with the name of the logic module needed to support the parameters that were specified in the DTF macro. The IBM-generated module names indicate the type of file and the support that each is capable of supplying for the DTF. Refer to Figure 2.11 for ~ breakdown of these names. Because of the descriptive nature of the IBM standard names, the programmer should be careful when specifying his own names for the logic modules or overriding the IBM standard names. At the time this program is link-edited, the linkage editor resolves these EXTRN symbols (AUTOLINK). If the program is not to be executed immediately, the linkage editor catalogs the program into the core image library. Figure 2.12 gives the module name prefixes used in the IBM-supplied programs. Figure 2.13 shows the relationship of the DTFxx and the xxMOD macros. The DTFCN macro is unique in that it generates its own logic module and combines it with the DTF table. The logic module for DTFCN is always punched in the object deck, along with the DTF table (A of Figure 2.13). Section 2: Data Management 115 Logic Module Prefix CDMOD IJC PRMOD IJD IJE PTMOD MTMOD (GET/ PUT) IJF MTMOD (Work Files) IJE 4th Character 7th Character 6th Character 8th Character F RECFORM=FIXUN B V RECFORM=VARUNB U RECFORM=UNDEF A Y C Z CTLCHR=ASA CTLCHR=YES CONTROL=YES Neither CTLCHR nor CONTROL specified B RDONL Y=YES and TYPEFLE=CMBN 0 C TYPEFLE=CM8ND H RDONL Y=YES and TYPEFLE=lNPUT I TYPEFLE=INPUT N RDONLY=YES and TYPEFLE=0UTPUT o TYPEFLE=0UTPUT Z Neither WORKA nor IOAREA2 specified W WORKA=YES I IOAREA2=YES 8 80th WORKA=YES and IOAREA2=YES Z WORKA=YES not specified (CM8ND file only) F RECFORM=FIXUN 8 V RECFORM=VARUN 8 U RECFORM=UN DEF A Y C S Z CTLCHR=ASA CTLCHR=YES CONTROL=YES STLlST=YES Neither CTLCHR nor CONTROL nor STLIST specified C = 8 if ERROPT=YES (ERROPT=name in DTFPR) and PRINTOV=YES = P if PRINTOV=YES and ERROPT is not specified (ERROPT= RETRY or is omitted in DTFPR) = E if ERROPT=YES (ERROPT=name in DTFPR) = Z if neither ERROPT (ERROPT=RETRY or is omitted in DTFPR) nor PRINTOV is specified I IOAREA2=YES V RDON LY=YES and Z IOAREA2 not specified WORKA=YES W WORKA=YES Y RDONL Y=YES Z Neither RDONLY nor WORK A specified S SCAN=YES Z SCAN not specified T TRANS=YES and SCAN not specified Z TRANS not specified F RECFORM=FIXUNB and SCAN=YES U RECFORM=UNDEF and SCAN=YES Z SCAN not specified and/or DEVICE=I 018 I DEVICE=1017 2 DEVICE=IOJ8 Z DEVICE=2671 or not specified Z 8 READ=8ACK F RECFORM=F.IXUN8 or FIX8LK Z READ =FORWARD or N RECFORM=UNDEF not specified (ASCII files) V RECFORM=VARUN8 or VAR8LK (E8CDIC mode) U RECFORM=UNDEF (E8CDIC mode) X RECFORM=FIXUNB or FIXBLK (ASCII files) R RECFORM=VARUN8 or VAR8LK (ASCII mode) S RECFORM=SPN UN 8 or SPN8LK (spanned records) C CKPTREC=YES Z CKPTREC not specified W WORKA=YES Z WORKA not specified M ERREXT=YES and RDONLY=YES N ERREXT=YES Y RDONLY=YES Z Neither ERREXT' nor RDONLY specified W TYPEFLE=WORK N NOTEPNT=YES S NOTEPNT=POINTS Z NOTEPNT not specified Z M ERREXT=YES and RDONLY=YES N ERREXT=YES Y RDONL Y=YES Z Neither ERREXT nor RDONLY specified Figure 2.11. 116 5th Character E ERROPT=YES Z ERROPT not specified DEVICE=2540 DEVICE=1442 DEVICE=2520 DEVICE=2501 DEVICE=2540 and CRDERR=RETRY 5 DEVICE=2520 and CRDERR=RETRY 0 I 2 3 4 IJC IJD IJE Generated Name Structure for Logic Modules (Part 1 of 2) DOS System Programmer's Guide Subsetting/ Supersetting + Permitted * Not Permitted IJF *** * * FA880 VYC I I U+HW2 CIZ3 ZN 4 0 5 * *+* * F AB I V VYEZ W US+ Y + P Z CZ Z * * * * ZZZZZ ZTZZ S ZF Z SZUZ ZZZI Z TZ I S ZF I S ZU I S ZZ 2 ZT Z2 * + ++ + F 8 C WM NZZZY + R N U X Z + S V + + + IJF WE N Z M ZS Y + Z N Z Logic Module 4th Character Prefix SDMOD (GET/ PUT) IJG SDMOD (Work Files) IJG ISMOD IJH 6th Character 5th Character 7th Choracter 8th Character U SDMODxU I SDMODxl SDMODxO C ERROPT=YES and ERREXT=YES E ERROPT=YES Z Neither ERROPT nor ERREXT specified M TRUNCS=YES and FEOVD=YES T TRUNCS=YES W FEOVD=YES Z Neither TRUNCS nor FEOVD specified B CONTROL=YES and RDONLY=YES C CONTROL=YES Y RDONLY=YES Z Neither RDONLY nor CONTROL specified + * + * + IJG C U C T B FIE Z Y +OZ + R C U Z + P Q V + P 5 V T HOLD=YES W HOLD=YES not specified C ERROPT=YES and ERREXT=YES E ERROPT=YES Z Neither ERROPT nor ERREXT specified N NOTEPNT=YES R NOTEPNT=POINTRW Z NOTEPNT not specified C CONTROL=YES Z CONTROL not specified T RDONLY=YES and UPDATE=YES U UPDATE=YES Y RDONLY=YES Z Neither RDONLY nor UPDATE specified + + + + + IJG T C NC T WERZY + ZZ U Z A RECFORM=BOTH and IOROUT=ADD or ADDRTR B RECFORM=FIXBLK and IOROUT=ADD or ADDRTR U RECFORM=FIXUNB and IOROUT=ADD or ADDRTR Z RECFORM not specified (lOROUT specifies LOAD or RETRVE) A I L R IOROUT=ADDRTR IOROUT=ADD IOROUT=LOAD IOROUT=RETRVE B TYPEFLE=RANSEQ G IOAREA2=YES and TYPEFLE=SEQNTL or IOROUT=LOAD R TYPEFLE=RAN DOM 5 TYPEFLE=SEQNTL Z Neither TYPEFLE nor IOAREA2 specified (IOROUT=ADD or LOAD) B CORINDX=YES and HOLD=YES C DORINDX=YES HOLD=YES Z Neither CORINDX nor HOLD is specified F CORDAT A=YES, ERREXT=YES and RDONLY=YES G CORDAT A=YES and ERREXT=YES 0 CORDAT A=YES and RDONLY=YES P CORDATA=YES 5 ERREXT=YES and RDONLY=YES T ERREXT=YES Y RDONLY=YES Z Neither CORDATA nor RDONLY nor ERREXT specified + + + + + IJH AABBF B I ROO Z + + + + + ABC 5 A R 5 Z Y + U * + ZLG G 5 P + + T G Z Z I IDLOC=YES E IDLOC=YES and FEOVD=YES R FEOVD=YES Z Neither FEOVD nor IDLOC specified H ERREXT=YES and RELTRK=YES P ERREXT=YES R RELTRK=YES Z Neither ERREXT nor RELTRK specified W HOLD=YES and RDONLY=YES X HOLD=YES Y RDONLY=YES Z Neither HOLD nor RDONLY specified +++++ IJI BAEHW F ZIP X + ZZZ +++ 5 EHW V R RY ZZZ B TYPEFLE=OUTPUT I IOAREA2=YES Z IOAREA2 not specified C RDONLY=YES D RDONLY not specified + + * IJJ FCBI C IZD C SDMODFx specifies HOLD=YES F SDMODFx does not specify HOLD=YES R SDMODUx specifies HOLD=YES U SDMODUx does not specify HOLD=YES P SDMODVx specifies HOLD=YES (spanned records) Q SDMODVx does not specify HOLD=YES (spanned records) 5 SDMODVx specifies HOLD=YES V SDMODVx does not specify HOLD=YES o o DAMOD IJI F RECFORM=FIXUNB B RECFORM=U NDEF (handles both UNDEF and FIXUNB) 5 RECFORM=SPNUNB V RECFORM=V ARUN B A AFTER=YES Z AFTER not specified DIMOD IJJ F Fixed unblocked record format C ASA and System/360 control character support for printers and punches F X U D C CONTROL=YES Z CONTROL not specified I IOAREA2=YES W WORKA=YES B IOAREA2=YES and WORKA=YES Z Neither IOAREA2 nor WORKA specified T Device is in tope mode D Device is in document mode Z Z Z Z Z ORMOD MRMOD IJM IJU Subsetting/ Supersetting + Permitted * Not Permitted RECFORM=FIXUNB RECFORM=FIXBLK RECFORM=UNDEF RECFORM=UNDEF and BLKFAC=YES 5 5 ing Ie address adopter D Duo I address adapter Figure 2.11. I TYPEFLE=INPUT * + * * IJM DCBDZ F ZIT W U X Z * IJU DZZZZ S Generated Name Structure for Logic Modules (Part 2 of 2) section 2: Data Management 117 Interrelationships of the DTF and Module Macro Instructions IHD { :~~ IJD IJE DATA IJF MANAGEMENT IJG IJH IJI IJJ IJK DATA IJL MANAGEMENT -IJM IJN IJO IJP IJQ IJR IJS DATA IJT MANAGEMENT -IJU IJV IJW IJX IJY IJZ IKL ILA ILB ILC ILF ILH I Figure 2.12. S/360 COBOL processing subroutines System Service and System Control Card logic Printer logic Paper tape logic Magnetic tape logic Sequential DASD logic Indexed Sequential DASD logic Direct Access DASD logic Device independent logic PL/I processing subroutines Teleprocessing routines Optical Reader logic Audio Response Vocabulary File Utility Disk Sort/Merge Tape Sort/Merge D-Ievel Assembler RPG compiler S/360 COBOL compiler Basic FORTRAN, and FORTRAN subroutines Magnetic Readers logic Autotest Utilities PL/I compiler F-Ievel Assembler OLTEP COBOL LCP ANS COBOL compiler ANS COBOL processing subroutines CE Serviceability Programs F-Ievel FORTRAN IV and FORTRAN IV subroutines Tape and Disk Sort/Merge The DTFCD, DTFDA, DTFDI, DTFIS, DTFMR, DTFMT, DTFOR, DTFPR, DTFPT, and DTFSD declarative macros are similar in that they each generate a DTF table that references an IOCS logic module (refer to B of Figure 2.13). The first 20 bytes of each table have the same format, that is, a command control block (CCB) and a logic module address. The remainder of each table is tailored to the particular device and file type. The description that follows is general and includes all of the DTF types included in B of Figure 2.13. DTF Table and Logic Module DOS Relocatable Library Module Name Prefixes Reentrant Modules A reentrant module is a logic module that can be used asynchronously, or shared by more than one file. The RDONLY=YES parameter in the module generation macro generates a reentrant logic module. The RDONLY (read only) parameter implies that the generated logic module is never mOdified in any way regardless of the processing requirements of any file(s) using the module. To provide this feature, unique save areas external to the logic module are established, one for each task using the module. Each save area must be 72 bytes and doubleword aligned. Before a logic module is entered or an imperative macro is issued to the file, the task must provide the address of its unique save area in register 13. Partial DTF Table 118 DOS System Programmer's Guide CDMOD DTFDA DAMOD DTFDI DIMOD DTFIS ISMOD DTFMR MRMOD DTFMT MTMOD DTFOR ORMOD DTFPR PRMOD DTFPT PTMOD DTFSD SDMOD I I DTF Tables Logic Modules DTFEN DTFSR DTFBG I 8K BOS Compatibility Figure 2.13. Reentrant modules include: CDMOD, DAMOD, DIMOD, ISMOD, MTMOD, and SDMOD. DTFCD DTF and Module Macro Relationships When one of these DTF macro instructions is encountered at assembly time, the assembler builds a DTF table tailored to the DTF parameters. The table contains: DISK DTFDA • Device CCB (Figure 2.6). DC V(IJIFZIZZ) • A V-type statement used by the Linkage Editor to resolve the linkage to the logic module associated with this DTF. • Logic indicators, that is, one I/O area, two I/O areas, device type, etc. • Addresses of all of the areas and controls used by this device (except work files). Regardless of the method of assembling logic modules and DTF tables (with the main program or separately), a symbolic linkage results between the DTF table and the logic module. The Linkage Editor resolves these linkages at edit time. To accomplish the linkage between the DTF table and the logic module, the assembler generates a V-type address constant in the DTF of a named CSECT in the logic module. To resolve this linkage, the linkage symbols (module names) must be identical. Figure 2.14 shows the relationship of the program, the DTF and the logic module. It also shows a DTFDA macro with a filename of DISK. The assumed parameters have generated a request for a DAMOD named IJIFZIZZ. Based on this name, the linkage editor was able to locate the module. The read statement generated coding to load the address of the DTF table into register 1. This gives the program access to the DAMOD address, and the program branches to the required routine within the module. IJIFZIZZ CSECT READ DISK, KEY *L 1,=A(DISK) *L 15,16(1) *BAL 14,24(15) Get DTF table address. Get logic module address located 16 bytes from start of DTF table. Branch to read routine in logic module. * Macro generated coding Figure 2.14. Coding Example of DTF and Module Relationship generates an in-line expansion that links the instruction to the DTF table (thus the logic module) for the specified file. For an operand, the imperative macro instruction must always contain the filename in the DTFxx macro describing the file. IMPERATIVE MACROS The problem programmer issues imperative logical IOCS macro instructions to initiate such functions as opening a file, making records available for processing, writing records that have been processed, controlling physical device operations, etc. Figure 2.15 summarizes the macro instructions provided by IBM for logical IOCS. Figure 2.16 further defines the general function of each of the macro instructions and indicates the devices with which they are used. The Supervisor and I/O Macros listed in the Preface gives a detailed explanation of each of the imperative macros. For each imperative macro issued by the problem programmer, the assembler program Section 2: Data Management 119 MACROS CHECK CLOSE(R) CNTRL DISEN DSPLY ENDFL ERET EXETL FEOV FREE GET LBRET LITE NOTE OPEN(R) POINTR POINTS POINTW PRTOV PUT RDLNE READ RELSE RESCN SEOV SETFL SETL TRUNC WAITF WRITE DTFCD DTFCN DTFDA DTFDI X X X X DTFIS X X DTFMR DTFMT X X X X X X DTFOR DTFPH X X X X DTFPT X DTFSD X X X DTFSR X X X X X X X X X Xl X X X X X X X X X X X X X X X X X X X X X X X X X X X X X Xl Xl Xl X X Figure 2.15. X X X X X X X X Xl Xl Xl X X X X X X X X X X X X X X X X X X X X X X X X X X X 1. Work files only. 120 X DTFPR Logical Ioes Imperative Macros and DTFs DOS System Programmer's Guide X TYPE OF PROCESSING WITH LOGICAL IOCS Indexed Sequential File Management System Sequential Macro Instruction "0 "0 ]~ ~ a. Q) ... c a.. 0 N...o >.. l/"') o Q) ~~ Initial ize Process Set Mode Non Data Operations Work Files for DASD and Magnetic Tape Complete Notes: -- ~ l/"') I .... OPEN(R) LBRET 1 GET PUT READ WRITE CHECK RELSE 5 TRUNC" WAITF RDLNE RESCN DSPLY SETFL ENDFL SETL ESETL CNTRL CHNG 7 PRTOV DISEN LITE ERET READ WRITE CHECK NOTE POINTR POINTW POINTS CLOSE(R) FEOV FEOVD FREE LBRET 1 SEOV u Q) l/"')"'O co N C Q) ~~ x ~....c: Q) N Q) ~~ x x X x X x X (") X x X X x X X x x X X X X X X X 3 x x x x x X X x x x X x x x x > '" :G U U « ~ u.. "'0 g -l ~a.. N x X x x c a......c: co U ~ c: o ::> N ~a.. X x U ~ § C Qj a. c C o l/"') 1'-."'0 co N U N o . . o ... x x x ~ o .~ Q) Q) x x x '" ~ o U ~ ~ E Q) ~ "'0 "'0 « o "'0 c: ~ x X X X x X X x x X X x x X X X X X X X x x X x X X X X X X X x X X X x X X x X X X X X X X X X X X X X X X x X X X x X X X Section 2: Data Management 121 X X X X X X X X X X X X x X X X X X XB X X x 1. Applies only if DTFSR, DTFMT, DTFDA, or DTF PH LABADDR or XTNTXIT is specified. 2. In the 2520 or 2540, GET normally reads cards in the read feed. If TYPEFLE =CMBND is specified, GET reads cards at the punch - feed - read station. 3. PUT rewrites on input DASD record if UPDATE is specified. 4. In the 1442, 2520, or 2540, PUT punches an input card with additional information if TYPEFLE = CMBND is specified. 5. Applies only to blocked input records. 6. Applies only to blocked output records. 7. Provided only for upward compatibility for BPS and BOS. 8. Workfi les on Iy • 9. Applicable to 1419 and 1275 with the Pocket Light Feature. Figure 2.16. Logical IOCS Imperative Macros and Devices SEQUENTIAL FILE ORGANIZATION Line Printers Card Files The DTFPR/PRMOD access method provides the ability to print a record by issuing a PUT macro instruction. The record to be printed can be presented to the access method via a work area (WORKA) or can be placed in the buffer area. Two buffer areas (IOAREA1 and IOAREA2) can be specified to allow overlap processing. In this case, a work area or a general register must be used to indicate the proper buffer area. Three types of printer-form control are provided by the access method: The DTFCD/CDMOD macros provide the user with the ability to read (GET) a record from a card reader or punch (PUT) a record on a card punch (up to 80 characters in both cases). The user has the option of specifying one or two I/O areas (IOAREA1 and IOAREA2), also called buffer areas, to hold the data transferred to main storage from the device, or vice versa. The second buffer area allows the user to overlap processing while the following record is read or the previous record is punched. The user can process the data read (or data to be punched) in the buffer area if only one area is specified. If two buffer areas are specified, a register (IOREG) can be specified to point to the start of the data field (leftmost position) in the current buffer area, or the data can be placed into a work area (WORKA) for processing (or punching). In the latter case, DTFCD/CDMOD transfers the record from the buffer area to the work area or vice versa. The capability for reading a card record and punching information into the same card (CMBND) is also provided if the user has an IBM 1442, and IBM 2520, or an IBM 2540 with the punch-feed-read (PFR) feature. Many data processing installations use the stacker selection capabilities made available by the following three methods: 1. The user may issue a CNTRL macro instruction after a GET or before a PUT to select the desired stacker, 2. First character control (CTLCHR) may be used, where the first character of a record may be an ASA (American standard Association) or System/360 control character for stacker selection, and 3. The selection for a given file may be specified (SSELECT) when the DTF table is generated. • CNTRL macro instruction for line spacing or page skipping. • PRTOV (printer overflow) macro instruction for page skipping or exiting to a user-supplied routine (indicated in the macro instruction) that can perform certain end-of-page and/or start-of-page functions. • First character control (CTLCHR) that can be used where the first character of a record may be an ASA or system/360 control character for line spacing or page skipping. Paper Tape Files I The DTFPT/PTMOD access method provides the ability to retrieve a data record from a supported Paper Tape device. Two buffer areas (IOAREA1 and IOAREA2) can be used for overlap processing. In this case, a general register must be specified to point to the record in the buffer area currently being used. This access method also handles shifted code for figure shift (FTRANS and SCAN) and/or letter shift (LTRANS and SCAN), or nonshifted code to be translated into system/360 and System/370 code (TRANS). The user must supply the various translation tables needed. Console Typewriter Magnetic Tape Files The DTFCN macro allows reading and writing of a record from or to an IBM 1052 Printer-Keyboard or an IBM 3210 or 3215 Console Printer-Keyboard by issuing a GET or PUT macro instruction. The record may be processed in the buffer area or in a work area (WORKA). Only one buffer area can be used.with this access method. This file does not require the use of OPEN and CLOSE routines. The DTFMT/MTMOD access method provides the ability to create or retrieve magnetic tape records in sequential order. The file is created by indicating via the DTFMT parameters that it is an output file (TYPEFLE) and then issuing PUT macro instructions. If the records are to be retrieved, an input file (TYPEFLE) is indicated and a GET macro instruction is issued. In either case, the records may be 122 DOS System Programmer's Guide processed in a work area (WORKA) or in the buffer area by using a general register (IOREG). When an input file is to be processed, the access method can also support the read-backward feature for magnetic tape units. Sequential Disk Records can be created or retrieved and updated from a direct access device by using the DTFSD/SDMOD access method. The file can be created by specifying an output file (TYPEFLE) and issuing PUT macro instructions. If the records are to be retrieved, an input file is indicated (TYPEFLE) and GET macro instructions are issued. It is also possible to update those records in the same location on DASD that were retrieved by a GET macro instruction. In this case, a PUT macro instruction must be issued for the file after the GET for the record to be updated and preceding the GET for the next record. The access method also provides double buffering (IOAREA1 and IOAREA2) ability for overlap processing. The user can either process the record in a work area (WORKA) or use a general register to point to the record in the current buffer area. Another macro instruction allows the user to skip the remaining records in an input block (RELSE). This can be useful if records are grouped by specific categories. An inverse function of RELSE, allows the programmer to truncate or write short blocks of records (TRUNC) for an output file. The CNTRL macro instruction may also be used to seek the track address of the next record to be processed. In the case of a data cell, CNTRL can restore a strip if the user knows that processing on it has been completed. When an ASCII file is to be processed, each record read into the I/O area is translated from ASCII to EBCDIC. When an ASCII file is to be created, the record in the output area is translated from EBCDIC to ASCII just before i t is written on the tape. Other optional features that greatly enhance the DTFMT/MTMOD access method are: • Specifying two buffer areas for overlap processing capabilities (IOAREA1 and IOAREA2). • Alternate tape switching between two tape units. • Bypassing of checkpoint records on input files (CKPTREC). An ASCII file must not contain checkpoint records. Other macro instructions allow the user to rewind, rewind and unload, execute various other magnetic tape device functions (CNTRL), or release (SKIP) the remaining records in an input block (RELSE). This can be useful if records are grouped by specific categories. An inverse function of RELSE allows the programmer to truncate or write short blocks of records (TRUNC) for an output file. In addition to GET/PUT functions, DTFMT/MTMOD provides the highly useful feature of issuing READ/WRITE macro instructions ~o create a file or retrieve records from a work file (WORK). OVerlap processing can take place while the I/O operation is being performed. The user awaits the READ/WRITE operation by issuing a CHECK macro instruction that ensures completion of the operation. The particular features that enhance this facility are the NOTE and POINT macro instructions. By issuing a NOTE macro instruction, the location of the data block in the file can then be obtained. POINT macro instructions provide the ability to reposition to a given block in the file. POINTR can position the tape to the block indicated, POINTW can position the tape after the block indicated, and POINTS can position the tape to the beginning of the file. I DTFSD/SDMOD also provides the READIWRITE, CHECK, NOTE, and POINT macro instructions described earlier under magnetic tape files, although an IBM 2311/2314/2319/2321 DASD is used as an I/O device in this case. NOTE/POINT uses cylinder, track, and record identification for noting and locating blocks in the file. Also, if a NOTE follows a WRITE, the unused space on a track can be returned when the file is being created or when records are to be written in the count, key, and data format of DASD. If a POINTR or POINTW is issued before a READ or WRITE (UPDATE), the READ or WRITE macro instruction processes the block indicated. If a formatting WRITE (write count, key, and data) is issued, the WRITE macro instruction writes a new record after the block indicated. Another feature available with this access method that can be used in either of the two mentioned processing modes, is the split cylinder mode. This mode allows two or more files to share the same cylinder. Each file occupies the same track positions through the range of assigned cylinders. The technique has the advantage of minimizing access-arm movement when cross referencing among two or more files that perform similar functions. The use of this Section 2: Data Management 123 facility is indicated in one of the job control statements (XTEN'I'/EXTENT) needed at execution time of the user's program. See System Control and system service listed in the Preface for detailed information on the job control statements. whether the I/O operation was successful to the problem program in the field specified by DTFDA ERRBYTE. Three other options, enhancing the capabilities of the access method, are: 1. The ability to utilize the multiple track search facility of a DASD (SRCHM). 2. The ability to return the record location (the first five bytes of the record identification, namely CCHHR) when retrieving a record by its key (IDLOC). These features facilitate skip-sequential processing. For example, by issuing a READ (KEY) macro instruction and starting at the beginning of the file, the direct access device searches multiple tracks until the record is found. The record location is returned and is used as a reference point in starting the search for the next record to be retrieved. In this manner of processing, only the required records are read, whereas in the normal sequential mode of processing, all records are read even if they are not all processed. 3. The ability to seek ahead by issuing a CNTRL macro instruction (or restore a strip to an IBM 2321 Data Cell) and then continue normal processing or issue other I/O device macro instructions. DIRECT ACCESS METHOD (DAM) FILE ORGANIZATION Great flexibility in reading or writing a record from or to a direct access device is achieved by the DTFDA/DAMOD access method. with the WRITE (AFTER) macro instruction, the user may create a file in any manner desired. For example, a part number or control field can be converted to a DASD address using a randomizing algorithm, and the record can be written at that disk address. Also, the user can create a sequential file with keys (control fields) to be processed later in a skip-sequential fashion. In skip-sequential processing, a file that has been sorted on a key control information field is created in a sequential manner. Records are retrieved by scanning or searching the file using the key of each record desired. In this way, only these records are retrieved and the job throughput is improved when a large percentage of the file is processed. Record retrieval is accomplished by issuing a READ macro instruction. Two types of READ macro instructions may be issued for record retrieval. The user may read the record by simply supplying the track and record location (ID), or by supplying the track location along with the record key (KEY) to be used for record retrieval. Record updating is performed by two corresponding WRITE macro instructions (ID and KEY). They work in the same way as the READ macro instructions. In addition to the READ/WRITE macro instructions, there is a WAITF macro instruction. This macro instruction is issued after each READ/WRITE. The WAITF macro instruction serves a two-fold purpose: 1. It allows overlap processing or issuing of another I/O device macro instruction (within the limitations of the system configuration) while the present I/O operation is taking place, and 2. It communicates termination of the READ/WRITE operation with which it was associated, and returns any error/status information indicating 124 DOS System Programmer's Guide When creating a file using the WRITE (AFTER) macro instruction, the access method automatically maintains the amount of space available on each track on which the records are stored along with the address of the last record on each track (provided the DASD has been properly initialized). This access method does not provide blocking and deblocking facilities. They must be performed by the user. Random Addressing Techniques In addition to the specification of the DTFDA and DAMOD macros, the problem programmer must supply the DASD address of the record to be read or written before issuing each READ/WRITE imperative macro. The following discussion presents various methods for determining a DASD address from a record control field. File addressing involves the file of records that must be stored and retrieved in a data processing system, and the direct access storage device itself. The data records that must be stored in a direct c Random Addressing Formula access storage device are usually identified by a control field, such as part number, and employee number. Normally, the numbers or characters in the control field are unevenly distributed. For example, a seven-positioned control field may be used to identify 25,000 items in a parts master file. However, with a seven-position number, it is possible to identify ten million items. In this example, only 0.25% of the available numbers are used. The direct access storage devices, on the other hand, are usually composed of physical locations that are identified by an evenly distributed set of numbers. The addressing problem converts an unevenly distributed set of numbers to an evenly distributed sequential set of numbers within the address limits of the direct access device. Many addressing techniques have been developed to accomplish this task. In choosing a technique for address conversion, it is important to remember that an ideal distribution of control fields is a completely uniform one. Uniform distribution means that the difference between any pair of successive control fields taken in ascending order is constant. The worst distribution of control fields is a random one. There is no way to transfer from random keys to addresses with better than random distribution. In practice, purely random control field sets and completely uniform ones are rare. A data file is likely to have control fields that distribute in groups or clusters of irregular length and separation. This kind of grouping of numbers introduces a degree of uniformity. The irregular length and separation of the number groups implies a degree of randomness. A well chosen conversion technique produces an address set that reflects both elements and has a distribution intermediate between random and uniform. TO be ideal for use in direct access storage devices, the conversion technique should produce a unique storage address for every record in a file. This is seldom possible. Most control-field conversion routines result in assigning some address to more than one record. These duplicate addresses are sometimes referred to as synonyms. The selected conversion routine should convert the control fields (keys) of the records in a data file to a series of addresses with a minimum number of synonyms and within the desired storage address range. The following sections discuss briefly the most successful conversion routine, followed by a discussion of synonym handling. I The simplest method of file organization is that in which a unique DASD address is obtained from the control data of each record. This is referred to as the random addressing method. If the control numbers of a set of data records in a file are consecutive numbers without gaps, they may be converted to DASD addresses by simple arithmetic. For example, if the account numbers for a customer file run from 10000 to 17563 (7564 account numbers), and ten account records can be stored on each disk track, 757 tracks are needed. By subtracting 10,000 from an account number and then dividing by 10, a numeric address in the range 000 to 756 is obtained. To place this file on a 2311/2314/2319 disk drive, starting at track address 1200 (cylinder 120 head 0), a constant 1200 is added to the quotient and a constant (1) is added to the remainder. This constant (1) is required because record zero (RO) of each track is reserved to facilitate the handling of defective recording areas that may occur during the life of the disk pack. Using this approach, a record containing the data for account number 16349 would be stored at track reference 1834 in record-reference ten, calculated as follows: 16349 - 10000 6349 • 10 = 634 + 1200 = 6349 634 with remainder 9 = 1834 = track 9 (remainder + 1) reference = 10 = record reference When processing this file randomly, any record can be found with a single seek. When it is possible to process sequentially, only one seek is needed per cylinder. Record retrieval time is thus at a minimum. This is an optimum situation, and it rarely occurs in actual practice. Normally, the control data of a file of records can seldom be used directly as DASD addresses. If a file does not have control fields that can be used directly as DASD addresses, it is sometimes possible to preassign addresses. For example. the item number 513XP could become 513XP-13472, that could then be converted to a track and record reference. Section 2: Data Management 125 Prime Number Division If the control fields of a file of records are not consecutive or contain numerous unused numbers, as is usually the case, the random addressing technique under the topic Random Addressing Formula makes inefficient use of storage locations. All possible numbers are assigned locations, and those numbers not used leave empty record areas in the storage unit. Files established with control numbers composed of coded information usually have a much higher potential range of items than is required for storage. To handle this situation, initial conversion is made on the control numbers to reduce the range to a practical size. This conversion is often referred to as randomizing. Randomizing generally refers to the techniques developed to convert a set of control numbers with numerous unused numbers to a tightly packed set, to result in very few unused storage areas. There are many techniques used for this conversion of numbers, a few being: folding, extracting, squaring, and radix transformation. One method, sometimes called prime number division* or divide remainder, is adaptable and usually satisfactory for converting a file of numbers. To illustrate the prime number division technique, suppose the customer file in the example under the topic Random Addressing Formula used a coded control number of ten digits. The first three could be a geographical code (branch office number), the next two could describe the nature of the business, the next one could be a size-of-customer code, and the final four could be sequentially assigned within class. Thus, account number 139 457 0307 would be the 307th account assigned branch office 139. It would belong to a customer-of-size code 7 in industry class 45. Because this ten-digit number cannot be used efficiently to describe 7564 accounts, it is converted by dividing by the closest prime number to the number of storage locations available. Assume 10,000 locations available, then divide by 9973. The remainder serves as the control number and a technique similar to the example under the topic Random Addressing Formula calculates a track and record reference. * A prime number is a number divisible only by itself, or one. 126 DOS System Programmer's Guide 1394570307 of 5825. 9973 = 139834 with a remainder This remainder is operated on as in the example, under the topic Random Addressing Formula, assuming 10 records per track. 5825 10 582 with a remainder of 5. To load the file starting at track address 1100, add 1100 to 582 for a sum of 1682. The track reference for this record is 1682, and the record is the sixth record on the track (remainder of 5 + 1 = 6). TO summarize prime number division: 1. Select a divisor equal to or greater than the number of records to be stored (10 to 20% greater is recommended). The best divisors are primes. Even numbers or multiples of five should never be used - divisors must end in 1, 3, 7, or 9. The divisor is called the range. 2. Divide the control number by the range and use the remainder to generate the track address. Prime number division always works; that is, it always converts control numbers into the desired range because in division, the remainder is always less than the divisor and the highest valued remainder is the divisor-I. Dividing any number, no matter what size, by a desired range, always produces remainders in the desired range. Using a prime number as the divisor usually results in relatively few duplicate remainders, and therefore relatively few address synonyms. A prime number is not always the best choice of divisor for a given set of keys. Also, i t is not necessarily true that all primes produce equally good results. However, primes avoid serious maldistribution and may be safely used with little analysis of the control field set of the data files. Synonym Records The transformation of record control fields to direct access storage device addresses usually produces some synonym records. The file organization used with a data file employing indirect addressing (addresses converted by a random addressing formula) must be able to accommodate the synonyms or duplicate addresses. The first consideration in organizing the file is sometimes called the packing factor. The number of synonyms produced by a random addressing conversion routine can be reduced by assigning more DASD storage space than is actually required by the file. The percentage of the file area actually used for record is called the packing factor. The packing factor for an efficiently organized file can vary from 65% to 95~. A packing factor of 80% usually proves to be a good starting point. After all efforts have been made to design a file conversion technique with few synonyms, an approach to handling the remaining synonyms must be chosen. and another read command is issued using this address. The process is repeated until the desired record is found. Record Reference Overflow Address Field CC HH R 73 06 1 CC HH R 74 02 3 74 02 3 74 09 2 74 09 2 69 06 4 69 06 4 I 74 35 6 74 35 6 I Blank CC = cylinder HH = head R = record One such technique is often referred to as the chaining method. As each record is read into the computer for loading into a direct storage access device, its control field or key is converted to a physical address. These converted addresses are called home addresses. Figure 2.17. Note: The home addresses discussed here are-not directly related to the track home address used to control the "physical operation of the DASD. These home addresses are related to the record identifier (ID) associated with DAM. Two other techniques that solve the synonym problem are similar in concept to the chaining method but do not require a chaining field to be present in each record. The first record converted to a particular address is stored in the home address location. The additional records converted to this address are stored in synonym locations. The address of the first synonym location is stored in the home address location. The address of the second synonym location is stored in the first synonym location, etc. Chaining requires that in the home address and all synonym locations, space be reserved for the address of the next location or link in the chain (Figure 2.17). Retrieval of records is accomplished by converting the control information (record key) to the home address. The record in the home address location is read into main storage, and its control information is compared to that of the record being sought. If the control fields are not equal, the address of the first overflow record is extracted from the home record, Direct Access Address Chaining 1. Preassigned tracks synonym technique. When there is not room to store a record in its home location, a specific preassigned synonym track is used. The synonym track(s) should be defined to be in the same cylinder containing the home location to reduce the number of seeks required to locate a record. 2. Consecutive spill synonym technique. When a synonym occurs, a sequential search is made starting at the next record within the cylinder until an empty record storage location is found. If the last track in a given cylinder overflows, a return is made to the first track. This technique does not require the use of a chaining field, nor is a seek required to locate the synonym record (must be on same cylinder). Section 2: Data Management 127 DASD Address Specification For Read/Write Operations The direct access method requires DASD addresses for all read/write operations. These addresses may be supplied in one of two ways: as an actual physical address (MBBCCHHR) or as a relative track address (see Relative Track Addressing). The actual physical address can be specified as an 8-byte binary address (see Figure 2.18) in the form MBBCCHHR. These 8-byte addresses are used either as the starting point for a search on record key or as the actual address for a READ or WRITE ID. When searching for a record key, the programmer may specify that the search be only within the specified track, or from track to track, starting at the address given and continuing either until the record is found or until the end of the cylinder is reached. ---, Volume Number (M) Bytes_ May __ Contain I I 1 0 0-221 : 1 0 1 0 0 1 0-221 I t : 0 Address Specified by SEEKADR=Name Figure 2.18. 3 1 r I 1 5 4 I 0 : 0-199 1 0 I I I I I 1 1 1 0-9 10-19. 1 0-9 I 0-4 10-19 10-2551 2321 1 I I 1 r I r 1 I 10 - 19 10 - 255 1 2314 I 0 10-1991 0 0 1 J 1 I I 0-221 : 2 1 Record: (R) r I 1 1 6 7 I ---I 1 1 0-9 10- 255 1 2311 1 I Head (HH) Cylinder (CC) Cell (BB) , , , DASD Address Formats DOS System Programmer's Guide Relative Track Addressing The required DASD addresses may also be given as a relative address. This address is then converted by IOCS to the actual physical address (see Figure 2.18). Relative track addressing is more convenient to use than the actual physical address for the following reasons: 1. The data in the file appears to be one logically-continuous area, although it may be physically noncontiguous. 2. The user needs to know only the relative position of the data within the file; its actual physical address is not required. .t ReqUired for Record Reference by I D For certain types of operations, the system can be requested to return the ID (CCHHR) of the record read or written or of the next record following the one read or written. The programmer can place these in the 8-byte address field to either READ or WRITE a new record or to update the one read. For example, to delete a record from a random file with keys, the programmer can randomize the record key to a starting location, search on key to read the record, and then use the ID returned to write a blank or zeroed record (key and data) back into the same location. The descriptions of the READ and WRITE macro instructions explain when the ID can be returned and whether the ID returned is that of the same or of the next record. See Data Management Concepts listed in the Preface for a description of these macros. 128 I When the ID returned is that of the next record, the system obtains the ID by chaining to a read-count command. This command skips to the next track if the record read or written was the last currently on the track. The system does not read the next ID if the end of a cylinder is reached. In this case, it adds one to the CC portion of the previous ID, forces the HH portion to 0, and forces R to 1 for a 2311, 2314, or 2319 file. For a 2321 file, it adds one to the high order H, forces the low order H to zero, and forces R to one. An overflow from the high order H increases the low order C by one, forces both Hs to zero, and forces R to one. Subsequent overflows of address locations cause increases in the next higher positions of the addresses. (It is the user's responsibility to check the validity of the address returned in IDLOC.) The relative address may be specified by the user in either of two/ formats: hexadecimal (in the form TTTR), or zoned decimal (in the form TTTTTTTTRR). In both the hexadecimal and zoned decimal format, the Ts represent the track number relative to the start of the data file, and the Rs represent the record number on that track. The hexadecimal format requires 4 bytes, while the zoned decimal format require~ 10 bytes. Relative track addressing is implemented through the DTFDA macro. Parameters in this macro . specify the number of extents in the file. the form of relative addressing used (hexadecimal or zoned decimal), and other required information. For specific information on the implementation of relative track addressing, see the Supervisor and I/O macros listed in the Preface. INDEXED SEQUENTIAL FILE MANAGEMENT SYSTEM (ISFMS) The DTFIS/ISMOD facility is both an access method and a DASD file organization technique. Facilities are provided for you to create a file, add new records in any order to a previously created file, and retrieve all records in the file either randomiy or sequentially. The track hold facility is also provided for protecting DASD tracks that are currently being processed. Track hold prevents two or more programs from updating the same record at the same time provided all the programs use the facility. The file is created in ascending sequential order from the input that has been previously sorted on the record keys. As the file is created, an index hierarchy is developed. The ~owest level is called the track index and occupies the first track (in the case of an IBM 2321, one or possibly more tracks) of each cylinder that is contained in the file area called the prime data area. This index includes a pair of index entries for each track of the cylinder containing the user's data records. The first entry of each pair indexes the highest record key on the appropriate track being referenced. The second entry locates overflow records that can occur from that track when new records (additions> are added to the file. The second level of index, called a cylinder index, is generated on a DASD area separate from the prime data area. An entry is made in the cylinder index for the highest record key of each cylinder in the prime data area, and each entry points to the track index on the appropriate cylinder. A third, optional level of index, the master index, is generated in the same area as the cylinder index and precedes it. The master index has an entry for the highest key on each track within the cylinder index area. For a small file, this level of index is generally not needed because searching a cylinder index of two or three tracks is as fast as searching the master index and then the cylinder index. An index entry is composed of a key and an address. The track index is composed of two types of entries, a normal entry and overflow entry for each prime data track within that cylinder. In the example illustrated in Figure 2.19, the normal entry indicates that the highest key on track 1 is 8, and the address is at the beginning of track 1. The overflow entry indicates the same key after loading as the normal entry. The address of hexadecimal Fs indicates no entries for this track in the overflow area. Note: If the track index does not occupy all of track 0, track 0 also contains data records. Section 2: Data Management 129 IHighest Key on Cylinder I Cylinder Index Only First Entry Shown ( Track Index Entries for Only Track 1 Shown Track Index Address 32 Data _-----N-O-R-M-~'-E-N-T-R-Y----____.,~ I 'I 1 r, Highest Key on Track 8 Address of First Record on Track Track 1 Record a OVERFLOW_EN_TR_Y_ _ _ _ __ H.ighest Key Associated . . With Track 8 1 Address of Lowest Recor I . in Overflow Chain . FF ~-------------------------------------V ----------------------------------) Figure 2.19. Example of Track Index If record 7 is added to the file as illustrated in Figure 2.20, record 8 would be forced into the overflow area, and record 7 would be the highest record on track 1. In this case, the key of normal entry is changed to 7, and the address of the overflow entry indicates the location of record 8, which is on track 8 record 1. No other changes to the indexes are required. The cylinder overflow control record (COCR), that is maintained in the data portion of record zero, would indicate that no records were in the cylinder overflow area after loading. After the addition of record 7, it would be updated to indicate that the last record in the cylinder overflow area was on track 8, record 1. The cylinder index indicates that record 32 is the highest key on the cylinder, and its address points to the track index. The cylinder index has its own extents that must be defined at job control time. These 130 DOS System Programmer's Guide extents must be outside the limits of any data extents. (Note that at least two sets of extent information must be defined at job control time. These would define a data extent and a cylinder index extent.) If the file exceeds one disk pack, additional data extents are provided, and at the user's option, an independent overflow area extent may be defined. The cylinder index extent must be on-line when the file is processed. It may be on the same pack as the data file, or it may be on a separate pack. Because the file is sequential with a hierarchy of indexes, it is called an indexed sequential file. The indexes provide direct reference to records, allowing their random retrieval with a minimum of search time. The sequential order of the data records, coupled with the ability to reference overflow records in sequence via the track index, provides sequential retrieval capability. The indexed sequential method consists of four Cylinder Index IHighest Key on Cyl inder , Track Index Address 32 Data Points to Track Index NORMAL ENTRY ( OVERFLOW ENTRY r--------------~'-------------_ Address of First \ _____T_r_ac_k_ln_d_e_x_---" I Highest Key on Track I Points to Data Track 7 Record on Track ----------------~~----------------Address of Lowest Recor~ (Highest Key Associated with Track I I Track 1 Record 0 8 Iin Overflow Chain I Track 8 Record 1 ~----------------------------------y ---------------------------------) o 1 2 Prime Data 7 8 Cylinder Overflow 9 Figure 2.20. Example of Track Index after Addition to File basic functions that provide capabilities for creating a file, adding new records to it, and retrieving the records. A description of each function follows. (IOAREAL) and then written in the prime data area. The appropriate index entries are also made. After the user has presented all the data records needed to create the file, an ENDFL macro instruction (end file load mode) is issued to terminate the load. Loading an Indexed Sequential File A file and its associated indexes are created by the load function. In addition to the DTFIS macro instruction specifying IOROUT=LOAD, there are three other macro instructions used to create the file. The first one to be issued is a SETFL macro instruction (set file load mode) that does the initializing needed for file creation. When the WRITE (NEWKEY) macro instruction is issued, the key and data record placed by the user in a work area (WORKL) are moved to an output block in the buffer area Facility is provided for protecting DASD tracks that are currently being accessed. For ISAM. the hold applies to both data records and index records. Because track hold cannot be performed on a LOAD file, BOLD=YES cannot be specified when IOROUT=LOAD. Facility is also provided to extend the file by adding new records higher in collating sequence than the current last (high) record in the file. Using the same user program, this can be done by specifying ISE in the DLBL/DLAB job control Section 2: Data Management 131 statement (required at execution time of the user's program) to indicate a file extension is to take place. The same macro instructions that load a file originally can be used to extend the file. If it is necessary to increase the size of the file to contain records with keys higher than the last key on the original file, the records can be loaded at the end of the file. A job control XTENT/EXTENT statement extends the upper limit of the prime data area of the file so that the new records can be loaded into the file. (Overflow area is not required because the file is merely extended further on the DASD.) Adding Records to the File The add function provides the ability to insert new records in the file. In addition to the DTFIS macro instruction specifying IOROUT=ADD, there are two other macros used for adding records to a file. The first is a WRITE (NEWKEY), that initiates the addition process (searching the indexes, etc.) and returns control to the user to allow overlap processing. To complete the addition operation, a WAITF macro instruction must be issued. This not only ensures that all necessary I/O operations have been completed but also returns status conditions indicating any abnormal operation. When additions are made to the file, the user presents the key and data record to be added in a work area (WORKL). A search is made through the index structure to determine where the record is to be inserted in the file. The record is either inserted in key sequence in the prime data area, or placed in the overflow area by use of a chaining technique that maintains the proper sequence of the file. Two overflow area options that may be used in any combination are provided. One option allows the user to specify that one or more tracks be reserved at the end of each cylinder to store overflow records (CYLOFL). The second option allows an independent overflow area separate from the prime data area to be reserved for storing overflow records. The first option has the advantage of reducing access time for the retrieval of overflow records associated with a given cylinder~ The second option has the advantage of utilizing DASD space more efficiently. 132 DOS System Programmer's Guide Random Retrieval The random retrieval function is used for random retrieval and updating of records. In addition to the DTFIS macro specifying either IOROUT=RETRVE or IOROUT=ADDRTR and TYPEFLE=RANDOM, there are three other macros for randomly retrieving and updating records. The first of three macro instructions to be issued for this purpose is a READ (KEY). The READ macro instruction performs a search of the indexes, using the key of the requested record (KEYARG) provided by the user as the search argument. While the I/O operations that perform this function are taking place, control returns to the user to allow overlap processing. To complete the READ function and receive the record, the user must issue a WAITF macro instruction. If the operation is completed successfully, this macro instruction either places the record into a work area (WORKR) or points to the starting location (leftmost position) of the record within the buffer area by using a general register (IOREG). If the operation was not successful, indications of the resulting abnormal conditions are given in the filenameC status byte in the DTF. If the user wants to update and return the record to the file, he must issue a WRITE (KEY) macro instruction. The WRITE follows the READ of the record to be updated and precedes the READ for the next record. Again, processing can overlap execution of the WRITE instruction. To complete the operation, the user must issue a WAITF macro instruction. Sequential Retrieval The sequential retrieval function makes it possible to sequentially retrieve and update records. In addition to the DTFIS macro instruction specifying either IOROUT=RETRVE or IOROUT=ADDRTR and TYPEFLE=SEQNTL, there are four other macros for sequentially retrieving and updating records. The first of four macro instructions to be issued for this purpose is the SETL (set lower limit), that locates the starting point where retrieval begins. This macro instruction provides four methods of starting retrieval: • From the beginning of the file (BOF) • At any record location in the prime data area (ID) • with any record in the file by supplying the key of the desired starting record (KEY) • With the first record of a group of records in the same class by supplying the generic key for that class; a class being any group of records that contains identical control information in the first few high-order bytes of the record keys (GKEY, a key equal to or lower than the first record of the desired group) After the SETL has been successfully executed, the user can issue GET macro instructions to retrieve each record in the file in key sequence. The record can be placed in a work area (WORKS), or a general register can be used to point to the starting location of the record in the buffer area. If the user wants to update the record and return i t to the file, he must issue a PUT macro instruction. This POT must follow the GET of the record to be updated and precede the GET of the next record. After all of the desired records have been processed, the sequential retrieval function is terminated by issuing an ESETL macro instruction. This process of issuing the SETL. GET. PUT, and ESETL macro instructions can be repeated as many times as desired. By combining the macro instructions of the sequential retrieval and load functions, the file can be reorganized. The user can retrieve the current file in its proper sequence (both prime data area records and the associated overflow records) and recreate the file in a new prime data area. CHOOSING THE RIGHT FILE ORGANIZATION AND RETRIEVAL METHOD The flexibility of a disk system lends itself to several different file organization and processing methods. It is important, therefore, to analyze each file and the program(s) that process i t to ensUre that the chosen method constitutes the optimum solution with respect to the data processing requirements of the installation. In ma~y cases, the type of organization and processing best suited to a file is immediately evident. However, some applications may require additional study, because of their complexity, their unusual processing requirements, or because of the wide range of processing programs that use a file. This is an important aspect of planning for a data processing system. Decisions in this area may affect system configuration requirements and should be made before programming begins. The general level of efficiency of the data processing installation may be affected. There are no absolute rules for the resolution of an uncertain situation regarding the organization and retrieval alternatives. However, there are several criteria that may provide an indication of the optimum solution. Criteria The following items form a basis for a decision concerning the organization of a file. File Activity: Activity refers to the number of records in a file for which there are transactions. This is usually expressed as a percentage. For example. 10% activity in an inventory file means that, during some specific period, there are transactions to be posted to 10% of the records contained in the inventory file. As the activity increases, sequential processing becomes more efficient. Sequential processing implies either sequential or indexed sequential organization. Activity implies batch processing. This means that. transactions do not need to be posted the moment they occur. In fact, the time that may lag between the occurrence and the post may vary from a few hours to weeks or even months. depending on the application. Although the activity of a file is measured over time, there are applications where transactions cannot be batched. An example would be an on-line inventory file where the transactions would have to be handled as they occur. Low activity may justify random instead of sequential retrieval. Another important consideration involves the level of activity when sequential processing becomes more efficient than random processing. In order to make this evaluation, you must know: • the record length and the blocking factor • the average number of additions to the file • whether the input is sorted. If the Indexed sequential File Management System is being evaluated for random or sequential processing, you must also know: • the average time required for access to the cylinder index. Section 2: Data Management 133 • which overflow options were chosen. • if the resident cylinder index facility has been selected, and if so, what percentage of the cylinder index can be main storage resident. During random processing with ISFMS i t is advantageous to presort the transactions if the resident cylinder index facility has been implemented. File Volatility: Volatility refers to the number of additions to and deletions from a file. First, consider the effect of making additions to or deletions from a sequentially organized file. Two files must be defined, and the operation must be handled as i t would be with tape, reading from the input file and writing to the output file. With high volatility (that is, many additions and deletions), indexed sequential organization provides a practical solution. One of the advantages of an indexed sequential file is that additions and deletions can be handled without copying the file. However, as the number of additions increases, the efficiency of processing an indexed sequential file decreases. Additions cause records to be placed in overflow areas. Retrieval of·these records in the collating sequence of the file requires more time than simply retrieving the records from contiguous tracks of the original file in their physical sequence. This is due to the additional access-arm movement required to read from the separate overflow area(s) and additional reads even when cylinder overflow is used. With relatively few additions, the decrease in efficiency is minimal. However, there is a point at which it becomes advisable to reorganize the file. Reorganization means building a new indexed sequential file from the old one and, in the process, physically excluding all records that are tagged for deletion. In the same operation, all records in the overflow area are merged into the main file. At this point, the cycle begins again. Processing with the reorganized file is highly efficient. As additions and deletions occur, this high level of efficiency gradually diminishes, until we reach a point where reorganization again becomes advisable. Additions to a direct access file do not necessitate the creation of a new file as they do for sequential organization. However, as the DA file extents fill up, the randomizing algorithm and its corresponding synonym processor is more heavily taxed. 134 DOS System Programmer's Guide Therefore, the following considerations should be made: • At what point is it most advantageous to reorganize an indexed sequential file? • What level of volatility excludes indexed sequential organization as a practical method of file organization? • What are the operational considerations for each method of organization? Many variables must be considered to answer these questions. It is impossible to provide direct answers except in terms of a specific file and a well defined application. File Size: The user must consider the fact that his on-line capacity is limited. Three important file organization considerations are affected by the size of a file: 1. An indexed sequential file must be entirely on-line for any type of processing. 2. A sequential file on disk may be written on any number of packs, that are then mounted and processed consecutively. Each disk pack may be mounted as needed but the manual intervention that is required is time consuming. 3. A direct access file must be entirely on-line for.any type of processing. The fact that an indexed sequential or direct access file must be entirely on-line whenever i t is to be processed imposes obvious physical restrictions on maximum file size. We have talked about the necessity of periodically reorganizing an indexed-sequential file. The user must also consider how this requirement affects file size. For the purpose of file reorganization, two files must be defined: the file to be reorganized and the newly created file. If the user's installation does not include tape units, and if the user does not want to punch his entire file into cards, the on-line disk capacity must be sufficient to accommodate both these files. If the installation includes tape units, the reorganization can be accomplished in two steps. The first program sequentially retrieves records from the indexed sequential file that is to be reorganized and creates an output file of these records on tape. The second program uses this tape file as input and writes the reorganized (output) file on disk. Thus, the maximum size of an indexed sequential file can be doubled by using magnetic tape as an intermediate storage medium. (An alternative would be a series of disk volumes forming a sequential disk file and sequentially sharing the same drive.) Figure 2.21 illustrates organization on a disk-tape system. FILEl FILE 2 ORIGINAL INDEXED SEQUENTIAL FILE First consider a DOS system with two disk drives. In this case, a sequential file may be contained on any number of packs. When a processing program reaches the record with the highest control information of the disk packs on-line, it stops. The operator can then mount the next pack on the same drive and the operation can be resumed. When a multivolume file is assigned to a disk drive, all subsequent volumes (disk packs) of the file must be mounted on the same drive. Most sequential files are altered periodically by additions and deletions. In this case, two drives should be used with multivolume files; one for the input file volumes and one for the output file volumes. Each time the end of the available capacity of a pack on either drive is reached, the system issues a message on the console to alert the operator that it is time to change disk packs. SEQUENTIAL RETRIEVAL RUN 1 INDEXED SEQUENTIAL LOAD PROGRAM RUN 2 REORGANIZED INDEXED SEQUENTIAL FILE Figure 2.21. sequential organization it can be organized sequentially. File Organization on a Disk/Tape system It is possible and frequently desirable to divide a large indexed sequential file into several smaller files. Although this approach reduces the flexibility of processing the records, it provides many significant advantages for applications with a low activity rate. In many cases, if a disk file exceeds the size limitations imposed by indexed consider the one-drive system. In this environment, multivolume sequential files, that are retrieved only, or retrieved and updated, can be processed on the single drive. If records are to be added and deleted, two files are involved: one input and one output file. Both files must be completely contained in one volume and the area available to each of the two files must be large enough to accommodate any net increase in file size brought about by subsequent additions and deletions. The single-drive system does not readily accommodate multivolume sequential files to which additions and deletions must be made. This limitation can be circumvented by dividing a large-file into smaller segments, each of which can be defined as a complete file and accommodated within the available portion of a single pack. This area is less than half a pack. The user must treat these segments consistently as separate files, going through the normal cycle of job-to-job transition and program retrieval as each volume is mounted. This approach, while solving one problem, may create others. If totals or statistics must be computed when processing the entire file, a means must be devised for carrying results forward from one volume (file segment) and one program to the next. This can be accomplished but it introduces an additional programming complexity with which the user of the two-drive system need not be concerned. section 2: Data Management 135 Response Time: One of the important advantages of a computer system with a direct access storage device is the ability to answer inquiries. Not all applications require the use of an inquiry capability. In some data processing installations, there are no inquiry applications at all. Where it is required, response time to an inquiry is a critical consideration. The less critical the response time, the greater the choice of organization and retrieval options. The example for the sequential file is a typical procedure for sequential processing equipment. If this job were run frequently, the system design considerations would probably preclude the use of a sequential file organization. The considerations previously proposed establish criteria for choosing the organization and retrieval method for a file. In the subsequent paragraphs, these criteria are applied to a number of sample files. The user should consider the following: • Can the answer to an inquiry wait until the next batched, sequential updating of the relevant file? If it can, then inquiries become an additional transaction type and are processed sequentially with all other transactions against the file. File organization, in this case, could be either sequential or indexed sequential. If the response provided by this method is not fast enough, random access is required. • Can the answer wait until the end of the present computer run? If so, the relevant file is mounted at the completion of the current job; the inquiry program is loaded; and the file is processed to produce the required answers. Obviously, the time delay involved here varies considerably depending on the job that is in progress when the inquiry arrives. Random Retrieval Consideration: Many files that could be organized sequentially are organized as indexed sequential files to facilitate system design. It is often possible to reduce the number of peripheral operations by using random retrieval from an indexed sequential file. This is true, for example, of files that have fields which are used in several jobs. As an example, assume that invoice summary cards are to be listed in the sequence of invoices. Further assume that the cards do not contain customer names, but that these names are required in the listing. Customer names may be obtained from the customer master file by random retrieval (if that file is organized as an indexed sequential file) or by sequential retrieval. Note that, in the latter case, the invoice summary cards must first be sorted into customer number sequence. Figure 2.22 illustrates the two solutions and shows the additional steps required if the customer master file is organized sequentially. 136 DOS System Programmer's Guide Sample Files This part illustrates the choosing of file organization and retrieval methods for some typical sample files. The characteristics of the sample file are chosen arbitrarily. Different characteristics could be attributed to files of similar functions. The examples are furnished to demonstrate the application of the criteria we have just discussed to certain specific file characteristics; and to show, under these circumstances, the optimum organization and retrieval methods. Example 1 File: table file Characteristics: the file is stable and requires few changes and infrequent additions and deletions. When alterations are required, the source card file is altered and the file is reloaded onto disk. Normal processing involves retrieval only. Organization: sequential Example 2 File: payroll file Characteristics: the file has generally low volatility; and a relatively low level of additions and deletions. However, there is a high activity rate. Processing for each pay period involves updating of a high percentage of the year-to-date master payroll information. Batching of transactions, (time cards, changes, etc.) is normal. Fast response to inquiries is not required. Organization: sequential RUN 1 RANDOM RETRIEVAL RUN 1 SORT CARDS BY CUSTOMER NO. RUN 2 SEQUENTIAL RETRIEVAL RUN 3 SORT INVOICES TO ORIGINAL SEQUENCE RUN 4 PRINT REPORT Figure 2.22. Indexed Sequential Versus Sequential File Organization Section 2: Data Management 137 Example 3 File: wholesale inventory file Characteristics: the file has moderate volatility and moderate activity. Normal transactions may be batched for posting once or twice a day. Recurring stock status, activity, and reorder reports are sequential. Response to inquiries concerning availability and stock level is required within one hour. Organization: indexed sequential Example 4 File: upon many factors. These factors must be analyzed for each file in anyone particular application. Often, more than one organization scheme can be considered for the same file. In one application, records could be processed purely at random; in another, the same records could be processed in sequence by various control fields. For example, records within a file might be processed at random during an updating run and sequentially within certain groups such as branch office or due date when producing reports or billing. A file such as this would be analyzed to determine whether it should be organized: 1. Randomly, thus keeping process time at a minimum during one run but destroying the advantage of the sequential nature of the other. 2. Sequentially, thus minimizing the time required to produce reports but increasing updating time. 3. Randomly for updating, and then sorted into sequence for reports. on-line inventory, parts Characteristics: the file has a low volatility but a high activity. Transactions are processed as they are received. Responses to inquiries concerning availability and stock level is required within 2 minutes. Recurring stock status, activity, and reorder reports are sequential but are only produced bimonthly. organization: random The decision would depend on the nature of the file. other considerations might be: Example 5 1. Characteristics: the file has low volatility and low activity. Transactions are combined in batches for daily posting. Billing is cyclic. statements are written throughout the month by sequentially retrieving records from the file between specific limits. Inquiries are processed twice daily. Can transactions be batched and sorted before processing, or must they be processed as they occur? 2. Is the activity distributed throughout the file in such a manner as to warrant passing the entire file when updating? Organization: 3. Would the processing time saved by sorting warrant the time and effort required? File: accounts receivable file indexed sequential summary The method of organization best suited to a particular file of disk records depends 138 DOS System Programmer's Guide Questions of this kind apply to each file in an installation. In choosing organization methods, the over-all processing objectives of the system must be kept in mind at all times. Section 3: Program Design Section Outline Link Editing • • • • • • • • • • .141 System Flow • • • • • • .141 Symbolic Units Required • • • • .143 Linkage Editor Control Statements • • 143 ACTION Statement • • • • • • .143 PHASE Statement • • • • 144 INCLUDE statement • • • • • • • • • 145 ENTRY Statement • • • • • .146 LBLTYP Job Control Statement • .146 Summary of Considerations for LINK and CATAL Options • • • • • • • • • • 146 Linkage Editor Program Considerations 147 Program Overlay Structures. • .147 Overlay Tree Structure • • • • • • • 147 Overlay Tree Design .147 Overlay Communication • • • .149 Self-Relocating Programs • • • • • • • • 149 Rules for Writing Self-Relocating Programs. • • • • • • • • • • • .149 Advantages of Self-Relocating Programs • • • • • • • • • • • • .150 Disadvantages of Self-Relocating Programs • • • • • • • • • • • • .150 Programming Techniques • • • • • .150 Linkage Editor Examples • • • • • .154 Link Edit-and-Execute-Example • • • • 154 Explanation for Link Edit and Execute • • • • • • • • • • • • 154 Catalog to Core Image Library Example 156 Explanation for Catalog to Core Image Library • • • • • • • .156 Execute Linkage Editor in Foreground and Catalog to Private Core Image Library Example • • • • • • • • • • • 158 Explanation for Catalog to Private Core Image Library • • • • • • • • • 158 compile and Execute Example • • • • • 160 Explanation for Compile and Execute 160 Catalog for Phase Overlay Example • • 162 Explanation for Catalog for Phase Overlay • • • • • • • • • • • .162 Submodular Structure Example • • • • • 163 Explanation for Submodular structure • • • • • • • • • • .163 self-Relocating and Multiple Link Edits Example • • • • • • • • • • • • 165 Explanation for self-Relocating and Multiple Link Edits • • • • • .165 Checkpoint/Restart. • • • • • • • .166 Problem Program Responsibilities .166 Use of CHKPT Macro. • • • • • .166 CHKPT Macro • • • • • • .167 Notes For DASD and MICR Files .168 Checkpoint File • • • • .168 Checkpoints On Tape • • • • • 168 Checkpoints On Disk • • • • • 168 Repositioning I/O Files • • 170 Repositioning Magnetic Tape .170 DASD Operator Verification Table • • 171 Bypassing Embedded Checkpoint Records on Tape with Physical IOCS • • 172 Bypassing Checkpoint Records on Tape with Logical IOCS • • • • • • • .172 Restarting Checkpointed Programs .173 RSTRT Statement .173 IBM 3211 Printer support. • • .173 System Considerations .173 Error Recovery Techniques .174 Macro Writing • • • • • • • • • • • 175 Macro Instruction • • • • • • .176 Macro Definition. • • • • • • .177 Elements of the Macro Definition • • 178 Attributes. • • .178 Sublist Notation. • • • • • • • • 179 Variable Symbols. • • • • • 179 Symbolic Parameter .179 SET Symbols • • • • 180 system Variables. • • • • • • • 181 Concatenation • • • • • • • 181 Sequence symbols • • • • • • • • 182 Conditional Assembly Instructions • • 182 AIF--Conditional Branch • • • • • • 182 AGO--Unconditional Branch • • • • • 183 ACTR--Conditional Assembly Loop • • 183 Counter • • • • • • • • • • .183 ANOP--Assembly No Operation Extended Capabilities • • • • • • • • 183 .183 MEXIT -- Macro Definition Exit MNOTE Statement • • • • • • • • • • 184 Section 3: Program Design 139 Section Figures Figure 3.1. Linkage Editor System Flow 142 Figure 3.2. Module Dependency • • • • • 148 Figure 3.3. Overlay Tree Structure •• 148 Figure 3.4. Relocating Address Constants in a Calling List .151 Figure 3.5. self-Relocating Sample Program • • • • • • • • • • • 153 Figure 3.6. Using Checkpoint Facility on Disk • • • • • • • • • • • • • .169 Figure 3.7. Procedure for Building Tape Repositioning Tables • • • • • • • 170 Figure 3.8. Procedure for Building .172 DASD Operator Verification Table Figure 3.9. Format of the Checkpoint Header/Trailer Records •••• .172 Figure 3.10. 3211 Error Status Indicator Bits in the CCB •• 175 Figure 3.11. Operand Field Formats •• 176 Figure 3.12. Keyword Macro Instruction • • • • • • • • • • .176 Figure 3.13. positional Macro Instruction • • • • • • • • • • • • • • 177 Figure 3.14. Macro Instruction with Prototype • • • • • • • • • • • • • • • 177 Figure 3.15. Mixed Macro Instruction .177 Figure 3.-16. Mixed-Mode Definition • .177 Figure 3.17. Sublist Illustration •• 179 Figure 3.18. Format of Globals and .180 Locals • • • • • • • • Figure 3.19. Format of SETA .180 Instruction • • • • • • • • Figure 3.20. Format of SETB • • • .180 Instruction • • • • • • • • Figure 3.21. Format of SETC Instruction • • • • • • • • .181 Figure 3.22. Concatenation and .182 Generated Coding ••••••• Figure 3.23. Conditional Branch Instruction • • • • • • • • • • • • • • 182 Figure 3.24. Unconditional Branch Instruction • • • • • • • • • • • • • • 183 Figure 3.25. Assembly No Operation Instruction • • • • • • • • • • .183 Figure 3.26. Macro Definition Exit .184 Instruction • • • • • • • • • • • •• 184 Figure 3.27. MNOTE Instruction Figure 3.28. Sample MNOTE .184 Figure 3.29. Sample MSG Macro .185 .186 Figure 3.30. Sample MSG Coding 140 DOS system Programmer's Guide The following are included in this section which presents techniques for the effective use of some DOS facilities: • Link Editing. Includes the linkage editor control statements and overlay structures, design and communication. In addition, examples illustrating module dependency and overlay tree structure are included. • self-Relocating Program. Explains how to write a self-relocating program. It presents the rules, advantages, disadvantages, and techniques for writing self-relocating code. • Checkpoint/Restart. Includes the programmer's responsibilities when a checkpoint is taken during problem program execution. This also explains the CHKPT macro for checkpointing a program and describes checkpoint considerations for tape and disk, as well as for repositioning of files and restarting checkpointed programs. of the control program. On the other hand, if a program is edited and executed immediately without cataloging, the linkage editor is required again the next time the program is to be executed. Cataloging is a system design decision based on such factors as frequency of use and space available in the core image library. In a system having a minimum of 32K positions of main storage, batched-job foreground multiprogramming, and private core image library support, the linkage editor can execute in any partition. A private core image library must be assigned when executing the linkage editor in a foreground partition. When executing the linkage editor in the background partition, if a private core image library is not assigned, the default is to the system core image library. Without the two options specified the linkage editor can execute in the background partition only. SYSTEM FLOW • IBM 3211 Printer support. Includes the error recovery techniques. • Macro Writing. Includes the macro language and its effective use. Also included are examples illustrating how to write and use macros. Link Editing Link editing provides the user with the capability of combining separately assembled or compiled program sections or subprograms. To make this possible, the output of the language translators must be processed. At first, the separate program sections are in relocatable form; that is, the address constants are identified for later modification to absolute execution time values. The linkage editor (LNKEDT) links and relocates separate program sections into a single phase that can be loaded by the control program and then executed. Every relocatable program must be processed by the linkage editor before it can be executed. Once a program is edited, it can be executed immediately, cataloged as a permanent entry in the core image library, or both cataloged and executed immediately. When a program is cataloged in the core image library, the linkage editor is no longer required for that program, because it can be loaded directly from the resident pack by the system loader Figure 3.1 shows the system flow for the linkage editor program. Before the linkage editor program is executed, job control must perform these functions: • Process the OPTION statement. OPTION LINK or CATAL turns on the control program switches which cause job control to open the SYSLNK file. Unless these switches are on, the linkage editor control statements are invalid. • Copy the linkage editor control statements onto SYSLNK. The linkage editor control statements are ACTION, PHASE, INCLUDE, and ENTRY. The ACTION, PHASE, and ENTRY statements are copied directly on SYSLNK. There are two forms of the INCLUDE statement. INCLUDE statements with no operand are not copied but cause the data (object module) on SYSIPT to be written until the end-of-data (/*) occurs. If the object module to be linkage edited is cataloged in the relocatable library, the INCLUDE statement must have the name of the module as an operand. The format of the INCLUDE statement is copied, but the module is not. • Write an ENTRY statement with a blank operand if the job stream does not already contain one. When the EXEC LNKEDT statement is encountered, an ENTRY statement is created to ensure termination of the link edit input. Section 3: Program Design 141 / SYSRD~ ~ II EXEC 1-------' LNKEDT CD 8) Object module blNCLUDE and/or bPHASE //OPTION CATAL (or LINK) ~ / / JOB CD System loader brings in job control. o Job control reads and interprets job control statements. 0) l l SYSRES Core Image Library CD Job control 8) Linkage editor ® Program phase Relocatable Library Job control causes linkage editor (LE) control statements and relocatable object modules to be placed on SYSLNKi object modules may be either on SYSIPT or in the relocatable library. Object Module ~ When job control reads EXEC LNKEDT, it causes the system loader to bring in the I inkage editor program. + Using SYSLNK (input) and SYSOOl (work file) the linkage editor develops executable program • • If OPTION CATAL is specified, linkage editor output is placed permanently in the core image library (the core image directory is updated). If OPTION LINK is specified, linkage editor output is placed temporari Iy in the core image I ibrary (the core image directory is not updated), and the next linkage editor output overlays the last temporarily placed linkage editor output. Note: If a private core image library is assigned, output is placed in the private I ibrary rather than in the system core image library on SYSRES. Output can be placed in the system core image library only when executing the linkage editor in the background partition. o 00 Linkage editor statements Object modules SYSOOl ~ If a program just link-edited is to be executed, the EXEC statement causes the system loader to fetch it from core image I ibrary and begin execution. Figure 3.1. 142 SYSLNK Linkage Editor System Flow DOS System Programmer's Guide Work file • Inform the system loader to load the linkage editor program. The linkage editor program uses the data on SYSLNK as input. "It handles the relocatable modules as directed by the PHASE and INCLUDE statements to develop executable program phases. Some of the linkage editor program functions are: 1. 2. 3. SYMBOLIC UNITS REQUIRED The symbolic units required by the linkage editor are basically a subset of those needed by the language translators: SYSIPT Module input Extracting the modules named in INCLUDE statements from the relocatable library. If, in extracting a module, another INCLUDE statement occurs, this module is also retrieved. The nesting of modules is possible up to a depth of five (a level of six). SYSLST Programmer messages and listings SYSLOG Operator messages SYSRDR Control statement input (via job control) SYSLNK Input to the linkage editor Constructing composite dictionaries for ESD and RLD data, to resolve all linkages between different control sections. SYSOOl Work file Relocating each control section as necessary within a phase. 4. Assigning the entire phase to a contiguous area in main storage. 5. Modifying all relocatable address constants to contain the relocated value of their symbols. 6. Searching the relocatable library for a cataloged object module with the same name as each unresolved external reference. The automatic library lookup feature (AUTOLINK) is particularly useful for retrieving IOCS modules. It may be suppressed. Note that SYSRDR and SYSIPT may contain input for the linkage editor. This input is written on SYSLNK by job control. If output from the linkage editor is to be placed in a private core image library, the following symbolic unit is required: SYSCLB 7. Building the core image directory phase headers and cataloging to the core image library, if CATAL is specified. If a phase by the same name was cataloged previously, the old phase is deleted and the new one is cataloged. Deletion removes the item from the directory, but it does not release the space in the library until a condense function occurs. If a private core image library is assigned, the linkage editor output is placed in the private rather than the system core image library, permanently if OPTION CATAL is specified or temporarily if OPTION LINK is specified (see Figure 3.1, pOint 6). In this case, the library need not .be on SYSRES as shown in Figure 3.1. Output may be placed in the system core image library (either permanently or temporarily) only when executing the linkage editor in the background partition. the private core image library may be assigned anywhere in the job stream but must be before the // EXEC LNKEDT statement. LINKAGE EDITOR CONTROL STATEMENTS Position 1 must be blank on linkage editor control statements. Otherwise, they follow the same format as job control commands. Refer to DOS system Control and System Service listed in the Preface for a detailed explanation of the control statements. ACTION Statement ACTION CLEAR MAP NOMAP NOAUTO CANCEL BG Fl F2 This statement specifies linkage editor options. It is not required, but if used, i t must appear as the first linkage editor statement in the input stream. If multiple operands are required, they may be placed on separate ACTION statements or on one section 3: Program DeSign 143 I ACTION statement separated by·commas. The ACTION statement is effective only for the next linkage editor execution. The parameters have the following meanings: CLEAR set the unused area of the core image library to binary zeros. The linkage editor clears from the next available entry (taken from the core image directory) to the end of the core image library. Because this is time-consuming, use i t only if the areas defined by DS statements must be filled with zeros. operands are used in a non-MPS environment, they are ignored. If none of these operands is present, the program will be linkedited to execute in the partition in which the link edit function is taking place, unless otherwise specified on the PHASE statement. An example of the use of the ACTION F1 statement follows. Assume a 64K machine with: 8K supervisor 24K background area MAP Write main storage map and error diagnostics on SYSLST. Whenever SYSLST is assigned, MAP is automatic unless NOMAP is specified. NOMAP Nullify MAP action. NOAUTO Suppress AUTOLINK function for the entire program, not just one phase. CANCEL Cancel the job if the content of the linkage editor input is in error. See messages 21001 to 21701 in the DOS Messages listed in the Preface. BG F1 F2 Causes the end of supervisor address used in linkage editor calculations to be set to the beginning of the partition specified, plus the length of the label area and of the save area. The end of supervisor address in the communications region is not changed. The BG, Fl and F2 operands provide the capability of link editing a program to execute in a partition other than that in which the link edit function is taking place. Programs that have a phase origin of S (or * for the first phase of a program) can be origined to the specified partition by use of the operands. Use of the ACTION BG statement is possible only in a system supporting the batched-job foreground and private core image library options when the linkage editor is executing in a foreground partition. . Use of the ACTION F1 (or F2) statement in a mUltiprogramming environment requires that the partition be allocated. If these 144 DOS System Programmer's Guide 16K foreground 2 area 16K foreground 1 area. When executing the linkage editor in the background the statement PHASE PHASE1,S causes PHASE1 to be origined at 8K (the end of the supervisor area). The sequence ACTION F1 PHASE PHASE1,S causes PHASE1 to be origined at 48K (the beginning of the foreground 1 area) plus the length of the foreground save area. When executing the linkage editor in foreground 2, the statement PHASE PHASE1,S causes PHASE1 to be origined at 32K (the beginning of the foreground 2 area) plus the length of the foreground save area. The sequence ACTION BG PHASE PHASE1,S causes PHASE1 to be origined at the end of the supervisor area. PHASE Statement PHASE name,origin[,NOAUTOl A program phase is the section of a program that is loaded by the system loader as a single overlay with a single FETCH or LOAD. The input for building a single phase consists of the text from one or more complete control sections. Therefore, programs may consist of many phases, or a phase may consist of many subprograms or control sections. The PHASE statement provides the linkage editor with the phase name and an origin point for the phase. The phase name catalogs the phase in the core image library and retrieves it for execution. Job control uses the phase name to construct a single track phase directory before each job step is executed. This phase directory is built for all background program executions. If executing in the foreground, this phase directory is built under link, edit, and go conditions. The entries to this directory are taken from the core image directory for any phase where the first four characters of the name are identical to those in the name specified in the EXEC statement. The directory entry contains such information as loading address, entry point, and starting disk address in the core image library. The separate phase directory permits faster retrieval of the phases. partition is allocated, ACTION F1 or F2 has the same effect as F+address. symbolic name of the phase, consisting of 1 to 8 alphameric characters. The first 4 characters of a multi phase program should be the same to achieve maximum retrieval efficiency. origin Specification of the load address of the phase. The load address can be one of six forms: *[~relocation]. This is the most frequently used format and specifies an origin point for a phase at the next available· core location. 6. symbol [(phase)] [±relocationJ. This format specifies an origin point for a phase at the same point as previously defined symbol (for overlays). A detailed explanation of the origin parameter is given in the DOS System Control and system Service listed in the Preface. Also refer to Link Editing Examples. The entries in the operand field represent the following: name 5. NOAUTO Suppress the AUTOLINK function for this phase only. INCLUDE Statement 1. 2. S [+relocationJ. If link editing in the background, the origin point is at the end of the supervisor, the save areas, and the area assigned to the COMMON pool, if any. If link editing in the foreground, the beginning address of the partition is substituted for the end of supervisor address. ROOT. This phase is designated as the root phase, which remains in main storage throughout execution. Its location is the same as with format s. 3. +displacement. The origin point is set at a specified location; +0 must be used for any self-relocating program. 4. F+address. This format is used to begin the program at the start of a foreground partition when link editing in the background and the foreground partition is not allocated. If the foreground INCLUDE [modulenamel [,enamelist)] This statement specifies that an object module is to be included for editing by the linkage editor. The system assumes the location of the module as follows: 1. Both operands missing. The object module is on SYSIPT; it is copied onto SYSLNK. 2. Modulename given. The object module is cataloged in the relocatable library under the same name. 3. Second operand only given. The object module is in the input stream on SYSLNK. The parameters represent the following: modulename Use this parameter only if the module is cataloged in the relocatable library. It consists of 1 to 8 alphameric characters and must be the same as the name used when the module was cataloged. (namelist) This parameter provides the ability to select particular control sections from a given module. It is expressed as (csname1, csname2, ••• ). Section 3: Program Design 145 labeled tapes are processed. This same area is used by nonsequential DASD files with fewer extents, and by labeled tape files. ENTRY statement ENTRY [entrypoint1 The ENTRY statement signals the end of program input to the linkage editor. The entrypoint operand indicates the transfer address for the first phase as follows: 1. 2. If omitted, the first significant address in an END record encountered during the generation of the first phase is used; or, if no such operand is found, the load address of the first phase is used. If given, it must be the name of a CSECT or a label definition defined in the first phase. The ENTRY statement can be completely omitted because job control automatically writes an ENTRY statement with a blank operand when it encounters the EXEC LNKEDT statement. The LBLTYP statement is not required if only unlabeled tape files and/or sequential DASD files are being processed. Only one LBLTYP statement is submitted. The placement of the statement in the job stream varies as shown: • Non-self-relocating (background/foreground). Immediately preceding the EXEC LNKEDT statement at linkage editor time. • self-relocating (background/foreground). EXEC for the program. Ahead of the Examples of various linkage editor functions follow. SUMMARY OF CONSIDERATIONS FOR LINK AND CATAL OPTIONS LBLTYP Job Control Statement / / LBLTYP SYSLNK must be assigned, or LINK and CATAL options are ignored (switches are not set). If executing the linkage editor in a foreground partition, a private core image library (SYSCLB) must be assigned. This is possible only in a system supporting the batched-job foreground and private core image library options. 2. Unless the switches are set by the LINK or CATAL option, the linkage editor control statements are ignored. 3. The CATAL option sets the LINK and CATAL switches. 4. When the LINK switches are set, the output of the language tr;anslators is placed on SYSLNK. 5. LINK and CATAL switches are turned off by: {TAPE (nn)} NSD (nn) The label storage records for standard labeled tape files and nonsequential DASD files (direct access, indexed sequential, or DTFPH with all packs mounted) are brought into the label save area of the partition containing the processing program. Therefore, main storage must be reserved by the user whenever such files are processed. Because this area is used during OPEN for one file at a time, the total area needed is that required by the largest file. Main storage reservation is accomplished by the LBLTYP statement. The amount of main storage reserved is governed by the operand TAPE or NSD as follows: • TAPE reserves 80 bytes of main storage. This format is used when standard labeled tape files and n2 nonsequential DASD files are processed. nn is ignored by job control. This same 80-byte area is used by all labeled tape files. • NSD reserves 84 bytes plus 20 bytes per extent. The number of extents is specified in the nn parameter for the nonsequential file that has the largest number of extents. This format is used when nonsequential DASD files are processed, regardless of whether 146 1. DOS System Programmer's Guide a. /& or JOB statement b. An error during compilation. 6. Completion of cataloging (update of transient, library routine, and foreground program directories, and system status report) occurs when the /& statement is read by job control. 7. If a successful link edit has not occurred, cataloging does not take place. 8. If multiple linkage editor job steps are set up as one job, keep these points in mind: a. b. c. It is not possible to CATAL into the core image library with // OPTION CATAL and then have another linkage editor job step with // OPTION LINK in the same job. Operator message lSlnD (STATEMENT OUT OF SEQUENCE) results. If a compilation is being performed, the link switches may be turned off by an error. When cataloging to the core image library, therefore, it is advisable to handle multiple job steps as separate jobs (each with /i) to be sure that the cataloging operation is finished on the /&. SYSLNK extents are reset each time before Job Control writes a new series of link edit control statements onto SYSLNK. Core image library directory and subdirectory are updated at /& if the CATAL option is included. Overlay Tree Structure To place a program in an overlay structure, the programmer should be familiar with the following terms: Phase: A phase is the smallest functional unit (one or more control sections) that can be loaded as one logical entity during the execution of the program. A phase can contain up to 524,288 bytes of text. The root phase (first phase) remains in main storage throughout execution. Tree: A tree is the graphic representation that shows how phases can use main storage at different times. It does not imply the order of execution, although the root phase is the first to receive control. The design of an overlay program requires the organization of the control sections of the program in an overlay tree structure. The tree structure is developed considering: 1. The amount of available main storage. 2. The frequency of use of each control section. LINKAGE EDITOR PROGRAM CONSIDERATIONS 3. The dependencies between control sections. The linkage editor program consists of eight phases. The efficiency of link editing programs into the core image library depends upon the amount of main storage allocated to the partition where the linkage editor is executing. If a minimum of 14K of main storage is available several phases of the linkage editor program are contained within main storage during linkage editor processing. If less than 14K is available, only one linkage editor processing phase may be resident in the partition at one time. Some time is lost fetching the additional phases as they are needed. 4. The manner in which control should pass within a path, from one path to another, and from one region to another. PROGRAM OVERLAY STRUCTURES Overlay is a programming technique that minimizes the main storage requirements of a program. To use overlay, the programmer should be familiar with two related techniques: 1. Organizing the program as an overlay structure. 2. Communicating with the control program during execution through FETCH and LOAD macros. When the overlay tree structure for a program is determined, PHASE statements are prepared which segment the program in that manner. Overlay Tree Design To begin constructing an overlay tree, the programmer should select those modules that receive control at the beginning of execution plus those that should always remain in main storage; these form the root phase. The rest of the tree can be developed by determining the dependency of the remaining phases and how they can use the same main storage locations at different times during execution. Module dependency is determined by the requirements of a control section or module for a given routine in another control section. A module depends upon a control section to which it branches or whose data i t must process. The required control section must be in main storage before Section 3: Program Design 147 execution can continue beyond a given point in the program. Figure 3.2 illustrates how modules depend on each other, and the paths that result from these dependencies. The module containing control sections A and B can be used to form the root phase. The module containing control sections C and 0 can use the same main storage as the module containing control sections J and K. Phases that use the same main storage area can overlay each other during execution. The module containing control section E can use the same main storage as the module containing control sections F and G. The module containing control section H can use the same main storage as the module containing control section I. The module containing control section L can use the same main storage as the module containing control sections M and N. determined by 0, plus the length of all phases in the path. For example, the origin of phases 3 and 4 is equal to 0 + 5,000 (the length of phase 2) + 6,000 (the length of the root phase). Root Phase 1 (6000) .. .. Phase 2 :' A (5000)!S·· ..Ic ,.,.,.,.....,.,.................,.,.,.,.,.,.,.,.,.,...,.".,.....,....... P~;~;O~ 10 .' ,.,.,.,.".,.,.,.,............... " ;, .: E P~~~~O~ ,·e IIGF Phase 7 (6000) ..... '" ................................,.,.,.,.,.,.,.,.,.,.,.,..".",..".".,.,.,.,.,.,.".".,•..,.,.,., iJ P~~~~O~ li"K' P~;~~O~ """""'.,.,."'., ,.,.,.,.,.,. .,.,.,. . ,\.,"""""""',. .,.,.,.,.,.,.,.,. . .,.,.,.• Phase 5 Ph 6 . . : (7000) ,,, ..,.. t,,..,, ..mw.' L •. I , . . . . . : (;~~O)i H Path 1 Path 2 Path 3 Path 4 Path 5 liM t [t. . . . .. Longest Path (Phases 1, 2, 4, 5) =21,000 bytes A B Figure 3.3. Overlay Tree Structure J K M N Note: A through N are Control Sections. Figure 3.2. Module Dependency Figure 3.3 shows the resulting overlay tree structure. The longest path in this structure is formed by phases 1, 2, 4, and 5, because the program requires 21,000 bytes when they are in main storage. Thus, the minimum main storage requirement for the program is 21,000 bytes. The program would require 46,000 bytes ·if not put in an overlay structure. The linkage editor assigns the relocatable origin of the root phase (the origin of the program) at O. The relative origin of each phase is 148 DOS System Programmer's Guide When a phase is in main storage, all phases in its path are in main storage. (Each time a phase is loaded, all phases in its path are also loaded if they are not already in main storage.) In Figure 3.3, when phase 4 is in main storage, phases 1 and 2 are also in main storage. This does not imply that phase 5 or 6 is in main storage because neither phase is in the path of segment 4. The position of the phases in an overlay tree structure does not necessarily imply the order in which they are executed. A phase can be loaded and overlaid as many times as required by the logic of the program. If a phase is modified during execution, that modification remains only until the phase is overlaid. However, a phase cannot be overlaid by itself. Phases that can be in main storage simultaneously are considered to be inclusive. Phases not in the same path are considered to be exclusive: they cannot be in main storage simultaneously. Phases on which two or more exclusive phases are dependent are called common phases. A phase common to two other phases is part of each. In Figure 3.3, phase 1 is common to phases 8 and 9, but not to phase 2. overlay Communication The programmer must know how his program can communicate with the control program during execution. Two ways in which he can overlay phases in his program are: 1. By a LOAD macro instruction, that loads the named phase into main storage and returns control to the calling phase. 2. By a FETCH macro instruction, that loads the specified phase into main storage and passes control to the entry address of the fetched phase. Some of the advantages are: 1. The LOAD macro allows the programmer to load his phases in violation of the tree structure that was defined at linkage editor time. 2. The LOAD macro allows the programmer to load phases from other programs. However, these responsibilities are associated with the use of these macros: 1. The programmer must keep track of which phases are in main storage. 2. The programmer must be aware of overlay structure and he must know tne phase names at compilation or assembly time. This causes the linkage editor to assume that the program is loaded at core location zero, and to compute all absolute addresses from the beginning of the phase. The job control EXEC function recognizes a zero phase address and adjusts the origin address to compensate for the current partition boundary save area and label area (if any). It then gives control to the updated entry address of the phase. RULES FOR WRITING SELF-RELOCATING PROGRAMS In general, if a problem program is written to be self-relocating, the following rules must be adhered to: 1. The supervisor must support multiprogramming (that is, MPS=YES or BJF must be specified as a parameter in the SUPVR macro at system generation time). 2. The PHASE card must specify an origin of +0. 3. The program must relocate all address constants used in the program. Whenever possible, use the LA instruction to load an address in a register instead of using an A-type address constant. For example, Instead of using: USING BALR phase that is loaded into main storage by the FETCH macro is always relocated unless the self-relocating option was specified at linkage editor time. A phase that is loaded into main storage by the LOAD macro is relocated relative to the same structure as when it was linkage edited; i.e., LOADs can be made outside the defined tree, but it is ·not possible for the system to ensure that references outside the tree will be valid. A Self-Relocating Programs A system supporting multiprogramming has the capability of executing self-relocating programs. A self-relocating program is one that can be executed at any location in main storage. Writing a self-relocating program is an efficient coding technique because self-relocating programs are link edited only once for execution in any partition. When linkage editing, use OPTION CATAL and a PHASE card such as: PHASE Phasename,+O LA BCTR BCTR LA ST • • L EOF • • EOJ AEOF • DC *,12 12,0 12,0(12) 12,0 12,0 1,EOF 1,AEOF 10,AEOF • A (EOF) Use: USING BALR LA BCTR BCTR • • LA • EOF *,12 12,0 12,0(12) 12,0 12,0 10,EOF • EOJ Section 3: Program Design 149 4. If logical IOCS is used, the program must use the OPENR and CLOSER macros to open and close files. 5. If physical IOCS is used, the program must relocate all CCW address fields. 6. Register notation must be used when issuing an imperative macro (I/O, I/O control, and supervisor communication). Register notation utilizes less main storage and permits faster execution. The following rules apply to multimodule programs. 7. The relocation factor should be calculated and stored in a register for future use. For register economy, the base register can hold the relocation factor. 9. The calling program is responsible for relocating all address constants in the calling list(s). See Figure 3.4 for an example of calling program relocating the address constants in a calling list. ADVANTAGES OF SELF-RELOCATING PROGRAMS self-relocating programs have the ability to run in anyone of the three problem program partitions without needing linkage editing again. The program can also be loaded anywhere within a partition. The restriction of specific partition allocations need not be adhered to with a self-relocating program because it relocates itself. For example: USING BALR LA BCTR BCTR *,12 12,0 12,0(12) 12,0 12,0 Register 12 now contains the relocation factor and the program base. 8. DISADVANTAGES OF SELF-RELOCATING PROGRAMS self-relocating programs are slightly more time consuming to write and they usually require slightly more main storage. When branching to an external address, use one of the following techniques: PROGRAMMING TECHNIQUES a. L BAL 15,=V(EXTERNAL) 14,0(12,15) L 15,=V(EXTERNAL) 15,12 14,15 b. AR BALR where register 12 is the base register containing the relocation factor. 150 DOS System Programmer's Guide A self-relocating program is capable of proper execution, regardless of where it is loaded. DTFDI should be used to resolve device differences between partitions. A self-relocating program must also adjust all of its own absolute addresses to point to the proper address. This must be done after the program is loaded, and before the absolute addresses are used. r------------------------------------------------------------------------------, // JOB A // OPTION LINK / / EXEC ASSEMBLY CSECTl START 0 USING *,12 BALR 12,0 LA 12,0(12) BCTR 12,0 BCTR 12,0 • • LA LA LA LA STM LA L AA CALL EQU EOJ SAVEAREA DC LIST Use load point value as the base to find the load point value. 1,A 2,B 3,C Modify the CALL address constant list. 4,D 1,4,LIST 13, SAVEAREA 15,=V(EXTERNAL) 15,12 Adjust CALL address by relocation factor. (15),(A,B,C,D) *-16 For address constants (4 bytes each). 9D'0' END /* * / / EXEC. ASSEMBLY CSECT2 START 0 ENTRY EXTERNAL EXTERNAL SAVE (14,12) USING *,12 BALR 12,0 Establish new base • • RETURN(14,12) END /* * _ IL/_____________________________________________________________________________ / EXEC LNKEDT Figure 3.4. Relocating Address Constants in a Calling List Within these self-relocating programs, some macros generate self-relocating code. For example, the MPS utility macros are self-relocating (that is, they modify all of their own address constants to their proper values before using them). OPENR and CLOSER macros are designed to be used in self-relocating programs. OPENR and CLOSER can be used in place of OPEN and CLOSE, and adjust all of the address constants in the DTFs opened and closed. OPENR and CLOSER can be used in any program because the OPENR macro computes the amount of relocation. If relocation is 0, the standard open is executed. In addition, all of the module generation (xxMOD) macros are self-relocating. The addresses of all address constants containing relocatable values are listed in the relocation dictionary in the assembly listing. This dictionary includes both those address constants that are modified by self-relocating macros, and those that are not. The address constants not mOdified by self~relocating macros must be modified by some other technique. After the program has been linkage edited with a phase origin of +0, the contents of each address constant is the displacement from the beginning of the phase to the address pointed to by that address constant. The following techniques place relocated absolute addresses in address constants. These techniques are required only when the LA instruction 'cannot be used. Technique 1 Named A-type address constants: • LA ST • ADCON • DC 4,ADCONAME 4,ADCON A (ADCONAME) Section 3: Program Design 151 B. Technique 2 If CCW list is static during program execution: A-type address constants in the literal pool: • LA LA ST • • • ST MVI 4, IOAREA 4,TAPECCW TAPECCW,l CCW 1,IOAREA,X'20',100 LA 3,=A(ADCONAME) 4, ADCONAME 4,0(3) TAPECCW LTORG =A(ADCONAME) • • • • DS CLI00 Technique 3 A-type address constants with a specified length of three bytes, and a nonzero value in the adjacent left byte (as in CCWs): Technique 4 Named V-type or A-type address constants: A. If CCW list dynamically changes during program execution: 1. • TAPECCW IOAREA 2. S IC LA ST STC 3,TAPECCW 4,IOAREA 4,TAPECCW 3,TAPECCW ccw 1,IOAREA,X'20',100 • • • DS ,CLI00 • USING *,12 BALR 12,0 12,0(12) LA BCTR 12,0 BCTR 12,0 Reg. 12 contains relocation factor • L ALR ST • • TAPECCW CCW IOAREA DS 152 • LA 11,TAPECCW 11,12 11,TAPECCW 1,IOAREA,X'20',100 CLI00 DOS System Programmer's Guide • • L AR ST • • ADCONAST DC ADCON DC 3,ADCONAST 3,ADCONAST Determine Relocation factor 4,ADCON 4,3 Add Relocation factor 4,ADCON A(*) V(NAME) Note that the load point of the phase is not synonymous with the relocation factor as developed in register 3 (technique 4). If the load point of the phase is taken from register 0 (or calculated by a BALR and subtracting 2) immediately after the phase is loaded, it may be added to address constants with varying results. If the phase was linkage edited with an origin of +0, the correct results are obtained. If the phase was linkage edited with an origin of * or S, incorrect results are obtained because, both the linkage editor and the program itself have added the load point to all address constants. See Figure 3.5 for an example of a self-relocating program. SOURCE STATEMENTS REPRO +0 ORIGIN IMPLIES SELF-RELOCATION PHASE EXAMPLE,+O PRINT NOGEN PROGRAM START 0 BALR 12,0 US I NG ~~, 12 ROUTINE TO RELOCATE ADDRESS CONSTANTS LA 1,PRINTCCW RELOCATE CCW ADDRESS ST 1,PRINTCCB+8 IN CCB FOR PRINTER LA 1,TAPECCW RELOCATE CCW ADDRESS ST 1,TAPECCB+8 IN CCB FOR INPUT TAPE IC 2,PRINTCCW SAVE PRINT CCW OP CODE LA 1,OUTAREA RELOCATE OUTPUT AREA ADDRESS ST 1,PRINTCCW IN PRINTER CCW RESTORE PRINT CCW OP CODE STC 2,PRINTCCW RELOCATE INPUT AREA ADDRESS LA 1,.INAREA IN TAPE CCW ST 1,TAPECCW MVI TAPECCW,READ SET TAPE CCW OP CODE TO READ ~ MAIN ROUTINE ... READ TAPE AND PRINT RECORDS GET CCB ADDRESS READTAPE LA 1,TAPECCB EXCP (1) READ ONE RECORD FROM TAPE WAIT (1) WAIT FOR I/O COMPLETION GET ADDRESS OF TAPE EOF ROUTINE LA 10,EOFTAPE BAL 14,CHECK GO TO UNIT EXCEPTION SUBROUTINE MVC OUTAREA(10),INAREA EDIT RECORD MVC OUTAREA+15(70),INAREA+10 IN MVC OUTAREA+90(20),INAREA+80 OUTPUT AREA GET CCB ADDRESS LA 1,PRINTCCB EXCP (1) PRINT EDITED RECORD WAIT (1) WAIT FOR I/O COMPLETION LA 10, CHA12 GET ADDRESS OF CHAN 12 ROUTINE BAL 14,CHECK GO TO UNIT EXCEPTION SUBROUTINE B READTAPE TM 4(1),1 CHECK CHECK FOR UNIT EXEC. IN CCB BCR 1,10 YES-GO TO PROPER ROUTINE BR 14 NO-RETURN TO MAINLINE CHA12 MVI PRINTCCW,SKIPT01 SET SEEK TO CHAN 1 OP CODE EXCP (1) SEEK TO CHAN 1 IMMEDIATELY WAIT (1) WAIT FOR I/O COMPLETION MVI PRINTCCW,PRINT SET PRINTER OP CODE TO WRITE BR 14 RETURN TO MAINLINE EOFTAPE EOJ END OF JOB CNOP 0,4 ALIGN CCB'S TO FULL WORD PRINTCCB CCB SYS004,PRINTCCW,X'0400' TAPECCB CCB SYS001,TAPECCW PRINTCCW TAPECCW OUTAREA INAREA SLI READ PRINT SKIPT01 Figure 3.5. CCW CCW DC DC EQU EQU EQU EQU END PRINT,OUTAREA,SLI,L'OUTAREA READ,INAREA,SLI,L'INAREA CL110" CL100" X'20' 2 9 X'8B' PROGRAM Self-Relocating Sample Program ) Section 3: Program Design 153 Linkage Editor Examples LINK EDIT-AND-EXECUTE-EXAMPLE / / JOB LINKEXEC 1. 2. 3. LINK EDIT AND EXECUTE IN BACKGROUND. SINGLE PHASE, SINGLE OBJECT MODULE RELOCATABLE MODULE NOT CATALOGED, BACKGROUND PROGRAM NONSEQUENTIAL DASD & LABELED TAPE FILES TO BE PROCESSED ASSGN SYSLNK,X'190' / / OPTION LINK PHASE PROGA, * INCLUDE * * * // 4. 5. 6. Relocatable object deck /* / / LBLTYP NSD(2) / / EXEC LNKEDT Any job statements required for execution such as ASSGN or label statements. 7. 8. / / EXEC Data input as required. /* /& * * * * * 1. 2. 3. TO CATALOG AND EXECUTE, CHANGE STATEMENT 2 TO // OPTION CATAL. TO CATALOG ONLY, CHANGE STATEMENT 2 TO / / OPTION CATAL AND REMOVE ALL STATEMENTS FOLLOWING LNKEDT EXCEPT /& TO USE MODULE FROM RELOCATABLE LIBRARY, CHANGE STATEMENT 3 TO INCLUDE MODULES AND REMOVE ALL STATEMENTS UP TO / / LBLTYP. Explanation for Link Edit and Execute This example illustrates the basic concept of linkage editing and executing by using a single phase that is constructed from a single relocatable object deck contained in punched cards. The program is executed in the background partition. Labeled tape and nonsequential DASD files are to be processed when the phase is executed. No more than two extents are used by any DASD file. Statement 1: No assignments are necessary, because the system units required for linkage editing are in the assumed configuration. However, an ASSGN for SYSLNK is included to illustrate its position relative to the OPTION statement in case assignment is required. statement 2: The OPTION LINK statement sets switches to indicate that a linkage editor operation is to be performed. If SYSLNK has not been assigned, the statement is ignored. Linkage editor control statements are not accepted unless the 154 DOS System Programmer's Guide I OPTION statement is processed. Because option is LINK, not CATAL, only link editing is performed; cataloging to the core image library does not occur. Statement 3.: The PHASE statement is copied on SYSLNK, because position 1 is blank and the LINK switch is on. The operands are not examined until SYSLNK becomes input to the linkage editor program. When the PHASE statement is processed by the linkage editor, only one phase is constructed, because only one PHASE statement is submitted for the entire LNKEDT. The name of this phase is PROGA, as specified in the first operand. The second operand indicates the origin point for the phase. Because an has been used, the phase begins in the next main storage location available, with forced doubleword alignment. Because this is the first and only phase, it is located at the end of the supervisor plus length of the label save area (reserved by LBLTYP) plus length of any area assigned to the COMMON pool (as designated by a CM entry in the relocatable module). * A relocation factor, either plus or minus, is used with the *, such as *+1024. This causes the origin point of the phase to be set relative to the * by the amount of the relocation term. This term can be expressed as: X'hhhhhh' dddddddd nK 1 to 6 hexadecimal digits 1 to e decimal digits where K = 1024 *+1024 uses the second format and adds 1024 bytes to the origin location. +lK or +X'400' gives the same result as +1024. Statement 4: The INCLUDE statement has no operands, so the system reads the records from SYSIPT and writes them on SYSLNK until SYSIPT has an end-of-data (/*) record. The data on SYSIPT is expected to be the object module in card image format that is used in this linkage editor operation. If the output of the language translator (SYSPCH) is placed on 2311/2314/2319 instead of cards, it cannot be used directly as SYSIPT in a linkage editor operation because the records contain a stacker select code in position 1. SYSPCH must be converted to an SO-position card image record. Statement 5: The LBLTYP statement causes a computation of the number of bytes that are required for label storage data in the program to be linkage edited. In this example, 124 bytes are reserved (S4 + [2x20]). The calculation is saved by job control and passed on first to the linkage editor and later to LIOCS. Statement 6: The EXEC LNKEDT writes an ENTRY statement with no operand on SYSLNK and causes the system loader to bring in the linkage editor program. Using the data just placed on SYSLNK as input, the linkage editor develops executable code. The output is placed in the next available space of the core image library (immediately after the last cataloged phase). This is true regardless of whether the program is cataloged or not. Cataloging causes the updating of the directory to reflect a new ending point for the library. If cataloging does not occur, the next program that is linkage edited overlays it. For this reason, a linkage edited program that is not cataloged is said to be placed in the temporary area of the core image library. Also, a program that is linkage edited without cataloging must be linkage edited whenever i t is used. No ACTION options are specified. Therefore, in resolving the external references, the system makes use of the AUTOLINK feature. Error diagnostics and a main storage map are written on SYSLST, because SYSLST is assigned. Statement 7: Because the program is not cataloged, it must be executed immediately. Any pertinent job control statements are entered at this point. Statement S: An EXEC statement with no operand indicates that the phase to be executed was just linkage edited. Therefore, no search of the core image directory is required, and the system loader brings the program into main storage from the temporary area and transfers control to its entry point. In this example, the entry point is either the address specified in the END record, or the phase load address if the END address is omitted, because the automatic ENTRY statement is in effect. This example can be modified to illustrate the following: 1. Catalog and execute. To cause this phase to be cataloged rather than merely linkage edited, change the OPTION (statement 2) from LINK to CATAL. The core image library directory still refers to the old version of the program. It is not updated until /& has been read. 2. Catalog only. To catalog only, change the OPTION (statement 2) from LINK to CATAL and remOve all data following the EXEC LNKEDT (statement 6) up to the /& statement. 3. Catalog Object module in relocatable library. The name to catalog the object module into the relocatable library must be added to the INCLUDE statement. If the name is RELOCA, the statement becomes INCLUDE RELOCA. The relocatable object deck and /* statement are removed. This form of the INCLUDE statement is written on SYSLNK when it is read by job control. The linkage editor retrieves the object module when it encounters the INCLUDE statement because it uses SYSLNK for input. Section 3: Program Design 155 CATALOG TO CORE IMAGE LIBRARY EXAMPLE / / JOB CATALCIL 1. 2. 3. 4. LINK EDIT AND CATALOG TO CORE IMAGE LIBRARY SINGLE PHASE, MULTIPLE OBJECT MODULES, FOREGROUND PROGRAM MIXTURE OF CATALOGED AND UNCATALOGED RELOCATABLE MODULES LABELED TAPE FILES AND SEQUENTIAL DASD FILES TO BE PROCESSED / / ASSGN SYSLNK,X'190' / / OPTION CATAL PHASE PROGB,F+32168 INCLUDE * * * * Relocatable object deck /* INCLUDE SUBRX INCLUDE SUBRY INCLUDE Relocatable object deck /* 5. 6. 7. // LBLTYP TAPE // EXEC LNKEDT /& Explanation for Catalog to Core Image Library This example illustrates the cataloging of a single phase composed of multiple relocatable object modules. These modules are located in the input stream and in the relocatable library. Labeled tape files and sequential DASD files are processed when the phase is executed. The program is executed in a foreground partition. Assume that the foreground partition begins at location 32168. Statement 1: The SYSLNK assignment indicates the relationship to the OPTION statement, although it is not required because of the assumed configuration. phase, F plus the location address in the foreground partition must be specified. A program may be linkage edited to any address that 7 falls within a foreground partition. The load address does not have to coincide with the partition address. However, the program must be of such a size that it can reside in the available core defined from the load address to the end of the partition. The address may be expressed in one of three forms: X'hhhhhh' dddddddd nnnnK A hexadecimal number of 4 to 6 digits A decimal number of 5 to 8 digits Where K 1024 and n is 2 to 4 digits = statement 2: The OPTION CATAL statement sets the LINK switches, as well as a CATAL switch. If SYSLNK is not assigned, the statement is ignored. The linkage editor control statements are not accepted unless the OPTION statement is processed. Linkage editing and cataloging to the core image library will occur. +X'8000', +32168, and +32K are equivalent. The actual origin point of the phase is adjusted upward from the address. specification to allow for the partition save area, and the label information CLBLTYP statement reservation>. Statement 3: Only one PHASE is constructed. It is cataloged to the core image library and retrieved by the name PROGB. Because this is to be a foreground Statement 4: Four modules make up this phase. The first and last are not cataloged in the relocatable library; therefore the object decks must be on 156 DOS System Programmer's Guide SYSIPT, and each must be followed by the end-ef-data recerd (/*>. SUBRX and SUBRY are cataloged previously to' the relocatable library by these names. Jeb centrel puts the uncataloged modules on SYSLNK in place ef their INCLUDE statements. Jeb control copies the INCLUDE statements for the cataloged modules. Statement 5: The LBLTYP statement has the operand TAPE, rather than NSD because labeled tapes and sequential DASD files are precessed when the phase is executed. Eighty bytes are reserved ahead of the actual phase for label infermatien. LBLTYP NSD is also. satisfactory because it generates a minimum of 104 bytes and tapes require only 80. Statement 6: The EXEC LNKEDT statement causes the system loader to' bring in the linkage editor program. SYSLNK new becemes input to' the linkage editer. It centains the fellewing: PHASE PROGB,F+32768 First uncataleged relecatable deck INCLUDE SUBRX INCLUDE SUBRY Second uncataloged relocatable deck ENTRY The medules are linkage edited so that they occupy contigueus areas in main storage in the sequence in which they appear in the input stream. When the linkage editing is completed, cataloging to' the core image library eccurs because ef the CATAL option. The core image directery is checked to' make sure the new phase entries fit. If net, the job is canceled. The directory is scanned fer any match to' a phase being cataleged. A match is deleted frem the directery. The system directery is updated to' reflect the changes. Jeb contrel is brought into main sterage. Statement 7: Because CATAL was specified, a special routine is executed when the /& centrol statement is read by job centrel. This reutine updates the transient, library-routine, and foreground-pregram directeries. A system status repert is printed to reflect the usage and available space in each ef the libraries and directeries. These eperations de not occur in a LINK situation. The /& resets the CATAL eption, that is, it turns eff the LINK and CATAL switches. The example can be medified to illustrate a cataleg-and-execute eperatien by inserting the fellowing data between the EXEC LNKEDT and /& statements: 1. Any job centrol statements required fer executien er PROGB 2. A // EXEC statement 3. Any card reader input for PROGB Note that the actual update ef the directories and the system status report are delayed until completien ef the execution of PROGB, when /& is read. Frem a system design standpeint this is net desirable because ef possible eperatienal problems. Making the execution ef PROGB a separate job avoids any difficulties. All cere image library directories are updated at /&. This is time censuming and sheuld net be done fer each module cataloged. Section 3: Program Design 157 EXECUTE LINKAGE EDITOR IN FOREGROUND AND CATALOG TO PRIVATE CORE IMAGE LIBRARY tXAMPLE 1. 2. 3. 4. 5. // JOB CATLCIL * LINK EDIT AND CATALOG TO PRIVATE CORE IMAGE LIBRARY * LINKAGE EDITOR EXECUTING IN FOREGROUND * SINGLE PHASE, MULTIPLE OBJECT MODULES, FOREGROUND PROGRAM * MIXTURE OF CATALOGED AND UNCATALOGED RELOCATABLE MODULES * LABELED TAPE FILES AND SEQUENTIAL DASD FILES TO BE PROCESSED ASSGN SYSCLB,X'191' // ASSGN SYSLNK,X'190' // OPTION CATAL PHASE PROGB,S INCLUDE Relocatable object deck INCLUDE SUBRX INCLUDE SUBRY INCLUDE Relocatable object deck 6. 7. // LBLTYP TAPE / / EXEC LNKEDT 8. /& Explanation for Catalog to Private Core Image Library the OPTION statement is processed. Linkage editing and cataloging to the core image library will occur. This exampl.,a_illustrates the execution of the linkage editor in a foreground partition and the cataloging of a phase to a private core image library. This function is possible only in a system supporting the batched-job foreground and private core image library options. The phase being cataloged is the same as that in the previous example where the link edit was executed in the background. Statement 4: Only one PHASE is constructed. It is cataloged to the private core image library and retrieved by the name PROGB. An origin point of S origins PROGB at the starting address of the foreground partition, plus the length of the save areas and the area aSSigned to the COMMON pool, if any. Statement 1: The assignment of a private library is accomplished by the ASSGN SYSCLB statement. The label for SYSCLB must be stored on PARSTD or STDLABEL cylinder, or, if the DLBL statement is included in the job stream, i t must follow the ASSGN SYSCLB statement. Statement 2: The SYSLNK assignment indicates the relationship to the OPTION statement, although it is not required because of the assumed configuration. statement 3: The OPTION CATAL statement sets the LINK switches, as well as a CATAL switch. If SYSLNK is not assigned, the statement is ignored. The linkage editor control statements are not accepted unless 158 DOS System Programmer's Guide Statement 5: Four modules make up this phase. The first and last are not cataloged in the relocatable library; therefore, the object decks must be on SYSIPT, and each must be followed by the end-of-data record (/*). SUBRX and SUBRY are cataloged previously to the relocatable library by those names. Job control puts the uncataloged modules on SYSLNK in place of their INCLUDE statements. Job control copies the INCLUDE statements for the cataloged modules. Statement 6: The LBLTYP statement has the operand TAPE, rather than NSD because labeled tapes and sequential DASD files are processed when the phase is executed. Eighty bytes are reserved ahead of actual phase for label information. LBLTYP NSD is also satisfactory because it generates a minimum of 104 bytes and tapes require only 80. Statement 7: The EXEC LNKEDT statement causes the system loader to bring in the linkage editor program. SYSLNK now becomes input to the linkage editor. It contains the following: PHASE PROGB,S First uncataloged relocatable deck INCLUDE SUBRX Second uncataloged relocatable deck The modules are link-edited so that they occupy contiguous areas in main storage in the sequence in which they appear in the input stream. When the linkage editing is completed, cataloging to the private core image library occurs because of the CATAL option. The private core image directory is checked to make sure the new phase entries fit. If not, the job is canceled. The directory is scanned for any match to a phase being cataloged. A match is deleted from the directory. The system directory is updated to reflect the changes. Job control is brought into main storage. Statement 8: Because CATAL was specified, a special routine is executed when the /& control statement is read by job control. This routine updates the transient, library-routine, and foreground-program directories for the private core image library. A system status report is printed to reflect the usage and available space in each of the libraries and directories •. These operations do not occur in a LINK situation. The /& resets the CATAL option, that is, it turns off the LINK and CATAL switches. The example can be modified to illustrate a catalog-and-execute operation by inserting the following data between the EXEC LNKEDT and /& statements: 1. Any job control statements required for execution or PROGB 2. A // EXEC statement 3. Any card reader input for PROGB Note that the actual update of the directories and the system status report· are delayed until completion of the execution of PROGB, when /& is read. From a system design standpoint this is not desirable because of possible operational problems. Making the execution of PROGB a separate job avoids any difficulties. All core image library directories are updated at /&. This is time consuming and should not be done for each module cataloged. Section 3: Program Design 159 COMPILE AND EXECUTE EXAMPLE 1. 2. 3. 4. // JOB COMPEXEC * COMPILE OR ASSEMBLE, LINK EDIT AND EXECUTE * SINGLE PHASE, MULTIPLE OBJECT MODULES, BACKGROUND PROGRAM * SEQUENTIAL DASD FILES TO BE PROCESSED * INPUT TO LINKAGE EDITOR FROM LANGUAGE TRANSLATOR, RELOCATABLE LIBRARY AND // ASSGN SYSLNK,X'190' // OPTION LINK PHASE PROGA,S // EXEC COBOL SYSIPT~ COBOL source statements /* 5. INCLUDE SUBRX INCLUDE Relocatable object module /* 6• ENTRY BEGIN1 / / EXEC LNKEDT Any job control statements required for PROGA execution. 7. // EXEC Any input data required for PROGA execution. /* /& Explanation for compile and Execute The language translators provide the option of placing their output on SYSLNK rather than SYSPCH. Because the linkage editor uses SYSLNK for input, a program can be assembled or compiled, then linkage edited and executed. This operation, known as assemble/compile and execute, is illustrated by this example. All three sources of object module input to the linkage editor are used: SYSIPT, the relocatable library, and the output from a language translator. It is assumed that the phase is executed in the background partition, and that only sequential DASD files or unlabeled tape files are processed. statement 1: The SYSLNK assignment is given to illustrate the relationship to the OPTION statement, although it is not required because of the assumed configuration. 160 DOS System Programmer's Guide Statement 2: Because SYSLNK is assigned, the OPTION LINK statement sets the link indicator switches. Statement 3: The PHASE statement,must always precede the relocatable modules to which it applies; therefore, it is written on SYSLNK first for later use by the linkage editor. S is the origin ,point, that is, the phase originate~ with the first doubl~word at the end of the supervisor plus length of the label save area (as defined ~ LBLTYP) plus length of the area assigned to the COMMON pool (if any). This gives the same effect as * gives for a single phase or the first phase. As with the *, the S may be used with a relocation factor, for example, S+1024. The factor must always be positive, because a negative factor could cause the origin point to overlay the supervisor. Statement 4: The appropriate language translator is called (in this case, COBOL). The normal rules for compiling are followed; the source deck must be on the unit assigned to SYSIPT and the /* defines the end of the source data. Because the LINK switches are set, the output of the language translator is written on SYSLNK. Except for PL/I, FORTRAN (F) and the ASSEMBLER (F) and 14K variant, the DECK option is ignored when SYSLNK is used. Statement 5: The INCLUDE SUBRX statement is written on SYSLNK. The linkage editor retrieves the named module from the relocatable library. Because the operand is blank, the next INCLUDE statement signifies that the relocatable module is on SYSIPT. The data on SYSIPT is copied on SYSLNK until the /* statement. Statement 6: The ENTRY statement is written on SYSLNK as the last linkage control statement. The symbol BEGIN1 must be the name of a CSECT or a label definition defined in the first phase. The address of BEGIN1 becomes the transfer address for the first phase of the program. The ENTRY statement is used because the user wishes to provide a specific entry point rather than to use the point specified in the END record or the load address of the phase. The ENTRY statement affects the first, or onlYr-phase. Statement 7: No LBLTYP statement is required, because only sequential DASD files are to be processed. The rest of the statements follow the same pattern as discussed in the Linkage Editing and Execute example. The input from SYSLNK to the linkage editor is: PHASE PROGA, S Relocatable module produced by COBOL compilation INCLUDE SUBRX Relocatable module from SYSIPT ENTRY BEGIN1 If an error is detected during compilation of a source program, the LINK option is suppressed. Under these circumstances the EXEC LNKEDT and EXEC statements are ignored in this example. This LINK option suppression should be kept in mind if a series of programs is to be compiled and cataloged as a single job. Failure of one job step would cause failure of all succeeding steps. Remember that an OPTION LINK cannot be given if OPTION CATAL is in effect, because message lS1nD (STATEMENT OUT OF SEQUENCE) results. This is an error in instruction to the system because CATAL has functions that must be performed when the next /& statement is read. Therefore, the CATAL switch must remain on, and linkage editing only cannot be performed. Section 3: Program Design 161 CATALOG FOR PHASE OVERLAY EXAMPLE 1. 2. 3. 4. 5. // * * * // // JOB MULTPHAS LINK EDIT AND CATALOG TO CORE IMAGE LIBRARY MULTIPLE PHASES, MULTIPLE OBJECT MODULES, BACKGROUND PROGRAM NO LABELED TAPE OR NONSEQUENTIAL DASD FILES TO BE PROCESSED ASSGN SYSLNK,X'190' OPTION CATAL PHASE PHASEA,ROOT INCLUDE MOD1 PHASE PHASEB,* INCLUDE MOD2 PHASE PHASEC, PHASEB INCLUDE MOD3 / / EXEC LNKEDT /& Explanation for Catalog for Phase Overlay Sometimes i t is not possible to bring an entire program into main storage because it requires more bytes of main storage than are available. To solve this problem the program can be broken into separate phases that can be brought into main storage as required, overlaying all or part of another phase if desired. The linkage editing of three cataloged relocatable modules into phases for overlay is illustrated by this example. Statement 1: The OPTION CATAL sets the switches so that the phases can be linkage edited and cataloged into the core image library. Statement 2: PHASEA is considered the ROOT phase, that is, it is always resident in main storage during program execution. The origin point is the first doubleword address after the supervisor plus length of the label save area (if any) plus length of the area assigned to the COMMON pool (if 162 DOS System Programmer's Guide any). Only the first phase statement is permitted to specify ROOT. Statement 3: The * in the PHASE card for PHASEB causes MOD2 to be 110kage edited at the end of PHASEA. Statement 4: Because PHASEB is specified as the load address of PHASEC, i t is linkage edited into the same address as PHASEB. The symbol that designates the origin point may be a previously defined phase name as in this example, a previously defined control section, or a previously defined external label. A plus or minus relocation factor may be used (for example, PHASE2+100). statement 5: The EXEC LNKEDT causes all three phases to be linkage edited and cataloged. When the phases are executed, the ROOT phase normally is loaded by the system loader. The other phases would probably be brought into main storage by means of the FETCH or LOAD macro issued by the calling phase. SUBMODULAR STRUCTURE EXAMPLE // • • • // // 1. 2. 3. 4. JOB SUBMOD LINK EDIT AND CATALOG TO CORE IMAGE LIBRARY MULTIPLE PHASES, ONE OBJECT MODULE (SUBMODULAR STRUCTURE) BACKGROUND PROGRAM, NO LABEL STORAGE RESERVATION ASSGN SYSLNK,X'190' OPl'IONCATAL PHASE PBASE1,ROOT INCLUDE , (CSECT1,CSECT3) PHASE PBASE2,. INCLUDE , (CSECT2,CSECTS) PHASE PHASE3, PHASE2 INCLUDE , (CSECT4,CSECT6) INCLUDE Relocatable object deck /* // EXEC LNKEDT /f, Explanation for Submodular Structure Several relocatable modules are structured into several phases. In this example, a single object module is broken into several phases. The object module is composed of CSECT1-CSECT6. It is structured into three phases with overlay. The module is not cataloged in the relocatable library. Only the PHASE AND INCLUDE statements are discussed. statement 1: The INCLUDE statement tells the linkage editor to place CSECT1 and CSECT3 into PHASE1. The sequence in which the CSECTs are linkage edited is determined by the sequence in the input module rather than the sequence in the INCLUDE statement. (CSECT3,CSECT1) would give the same result as (CSECT1,CSECT3). The sequence can be controlled by issuing separate INCLUDE statements. For example, INCLUDE ,(CSECT3) followed by INCLUDE , (CSECT1) causes CSECT3 to be linkage edited before CSECT1, regardless of the sequence in the object module. Note that the first operand is missing in the INCLUDE statement, as indicated by the leading comma. This format of the INCLUDE statement searches the next succeeding object module on SYSLNK to locate the named CSECTs. See Statement 4. Statement 2: The INCLUDE statement causes CSECT2 and CSECTS to be used for PHASE2. This phase is located at the end of PHASE1. Statement 3: PHASE3 is made up of CSECT4 and CSECT6 and overlays PHASE2 because its origin point is at the same address as PHASE2. Statement 4: This INCLUDE statement with a blank operand is required to write the object module that follows in the card reader onto SYSLNK, to satisfy the INCLUDE statements with a blank first operand. With the sequence of statements shown in the example, the PHASE and INCLUDE statements are read from SYSRDR. However. it is permissible to read PHASE and INCLUDE statements from SYSIPT. To do this. Statement 4 (INCLUDE blank) is placed ahead of Statement 1. The INCLUDE with the blank operand directs job control to read the following data (which includes the PHASE. INCLUDE~ and then the object module) on SYSLNK from SYSIPT to the /* statement. If SYSRDR and SYSIPT are separate devices. take care to place the PHASE and INCLUDE statements on the correct device. PHASE1 is located at the end of the supervisor plus length of the label save area, and the COMMON area (if any). Section 3: Program Design 163 PHASE and INCLUDE statements can also be in the relocatable library. If the object module is in the relocatable library under the name MODi, the following changes are made: 1. Remove Statements 1 through 3, and add module name to Statement 4. // JOB SUBMOD // OPTION CATAL INCLUDE MODl / / EXEC LNKEDT 2. When the relocatable module is cataloged to the library, precede it with the following statements: PHASE PHASE1, * INCLUDE MODi, (CSECT1,CSECT3) PHASE PHASE2, * INCLUDE MOD1,(CSECT2,CSECTS) PHASE PHASE3,PHASE2 INCLUDE MOD1,(CSECT4,CSECT6) Relocatable object deck 164 DOS system programmer's Guide This form of the INCLUDE statement causes the linkage editor to search the module that follows the last INCLUDE statement in the library for the required control sections. SELF-RELOCATING AND MULTIPLE LINK EDITS EXAMPLE // * // 1. // 2. JOB MULTCATL SEVERAL LINK EDITS AS A SINGLE JOB OPTION CATAL PHASE PROG1,+0 INCLUDE PROO1 EXEC LNKEDT PHASE PROG2, * INCLUDE Relocatable object module /* // 3. // /& // // EXEC LNKEDT PHASE PROG3,* INCLUDE PROO 3 EXEC LNKEDT JOB LINKGO OPTION LINK PHASE PROG4, * INCLUDE Relocatable object module /* // EXEC LNKEDT Any job control statements required for PROG4 execution. / / EXEC Any input data required for PROG4. /* PHASE PROG5,* INCLUDE PROG5 // EXEC LNKEDT Any job control statements required for PROG5 execution. // ,EXEC Any input data required for PROG5. /* /& Explanation for Self-Relocating and Multiple Link Edits The linkage editing reqUirements for a self-relocating program and the combining of several cataloging or link-and-execute job steps into a single job are illustrated in this example. Use discretion in deciding how many steps should be combined before a /&, because a failure in one step can cause successive steps to be bypassed unnecessarily. Statement 1: The +0 displacement as the origin part for PROG1 designates this program as self-relocating. Once this program is cataloged to the core image library, it may be executed in any partition. It can be initiated into the background partition by job control, if the supervisor was generated with multiprogramming capabilities. A non-MPS supervisor will give message OP77I (CANCELED DUE TO INVALID ADDRESS). However, the program can be loaded by using the LOAD macro in a calling phase. Statement 2: PROG2 and PROG3 are linkage edited and cataloged as job steps within the job MULTCATL. Note that OPTION CATAL holds for these steps. Statement 3: A new job is initiated because the succeeding job steps are linked and executed without cataloging. (OPTION LINK cannot be issued when OPTION CATAL is in effect.) Note that OPTION LINK need not be reissued before the next job step. Section 3: Program Design 165 Checkpoint/Restart When a background program or a hatched-job foreground program is expected to run for an extended period of time, provision may be made for taking checkpoint records periodically during the run. The records contain the status of the job and system at the time the records were written. Thus, they provide a means of restarting at some midway point rather than at the beginning of the entire job, if processing must be terminated for any reason before the normal end of job. For example, some malfunction, such as a power failure, may occur and cause such an interruption. If checkpoint records are written periodically, operation can be restarted with a set of checkpoint records written before the interruption. These records contain everything needed to reinitialize the system when processing is restarted. Any programmer logical unit (SYSOOO-SYSmax) assigned to tape, or the 2311, 2314, or 2319 can be used for recording checkpoints if the proper file definitions are made and the correct label statements are submitted. Checkpoints must not be taken on ASCII tape files. The Disk Operating system includes routines to take checkpoint records and to restart a job at a given checkpoint. The checkpoint and restart routines are included in the core image library when the system is generated. The checkpoint routine is executed in the logical transient area and is called in response to a CHKPT macro instruction in the problem program. The restart routine is called by job control when it reads a RSTRT control statement. When a program is restarted, the user must reissue any STXIT macro instructions that are desired because the STXIT linkages established before the checkpoint was taken are destroyed. Checkpoint/restart does not save or restore floating point registers. (If needed, these registers should be stored in the problem program area before issuing CHKPT macro, and restored in a user restart routine.) Only background programs or batched-job foreground programs may be checkpointed. Checkpoint records are written on a 2311, 2314, or 2319 DASD or on magnetic tape. Each checkpoint is uniquely identified. When it is restarted, the RSTRT control statement specifies which checkpoint is to be loaded. If multireel files are being used, the operator must be aware of which reels were being processed when the checkpoint was taken. 166 DOS System Programmer's Guide Multitasking users should only issue the CHKPT macro in the main task with no subtasks attached. In addition, no tracks on any DASD should be in the hold state. A multitasking abnormal termination routine should not contain a CHKPT macro. Checkpoints should be taken while a program is running successfully, not while i t is canceling. Checkpointed programs must be restarted in the same partition in which they were checkpointed. Multiple jobs maybe checkpointed on the same tape. Checkpoint records written by previous versions of the system are not acceptable to the current version of the system. However, if they are embedded on magnetic tape, they are bypassed by the current version. It is possible to increase partition allocation between the time the checkpoint is taken and the time the program is restarted, if the starting address of the partition remains unchanged. PROBLEM PROGRAM RESPONSIBILITIES Use of CHKPT Macro Any partition, except a foreground partition in a single program mode, can issue the CHKPT macro successfully. If multitasking, only the main task can successfully checkpoint. CHKPT is ignored when issued by a subtask, a foreground partition in single program mode, or in any of the following additional conditions: 1. The device on which the checkpoint records are to be written is not a magnetic tape or a disk pack. (The device must be a 2311, 2314, or 2319 disk if the filename operand is present. ) 2. End of reel is detected while writing the checkpoint on tape. 3. The area on disk is not large enough for a single checkpoint. 4. The macro is issued by a teleprocessing program that has any I/O operation(s) pending on a teleprocessing device. 5. The user-specified end address is greater than the end of the problem program area. 6. The CHKPT macro is issued before the disk checkpoint file is opened. 7. Any of the required DTFPH parameters for the disk checkpoint file contain errors. CHKPT Macro 8. If a subtask is attached in the partition being checkpointed. I Name I Operation I Operand 9. If any DASD track for the partition being checkpointed is in the HOLD state. Note: Checkpoint records are not permitted on ASCII tape files. If a checkpoint is ignored, control returns to the user with binary zeros in register o. Otherwise, register 0 contains the appropriate checkpoint number (in unpacked decimal). Checkpoints are usually taken after a specified period of time has elapsed, or after a certain volume of input is processed. When multitasking, use the following as a guide for selecting a method: 1. 2. The multitasking operation requires checkpoints to be taken on a time interval basis. Therefore, at main task execution time, a STXIT macro establishes linkage for an interval timer interrupt. In the main task interval timer routine, the problem program issues WAIT macros to wait for the detachment of each subtask in the partition, and then takes the checkpoint. If the main task must take an immediate checkpoint, the interval timer routine in the main task must first detach all subtasks, disregarding current processing, before it can successfully issue the CHKPT macro. The multitasking operation requires checkpoints to be taken on a volume basis. Therefore, the main task attaches the subtasks necessary to perform the job, and then issues WAIT macros to wait for each subtask in the partition to detach. Each subtask keeps a count on the unit of work to be performed and detaches when it is finished. When all subtasks are detached, the main task can take the checkpoint. After the checkpoint is taken, the main task can then either attach more, or the same, subtasks to continue processing. r----T---------T--------------------------,I ~----+---------+--------------------------~ InamelCHKPT 1 sysnnn,{restart address} I I I II I I II I I I I (r1) I[,{ end address}] r, {tpointer:tll I (r2) L (r3) fJI I I I I I I I r, {dPointer}] r, {Filename}] I L __________________________ JI I ____ I _________ I L (r4) L (rS) ~ ~ SYSnnn specifies the logical unit on which the checkpoint information is stored. It must be a magnetic tape or a disk pack. (See Checkpoint File.) Restart address (or r1) specifies a symbolic name of the problem program statement (or register containing the address) at which execution is to restart if processing must be continued later. End address (or r2) is a symbolic name (or register containing the address) of the uppermost byte of the problem program area required for restart. This address must follow the logic modules being included from the relocatable library. If this operand is omitted, all of main storage allocated to the partition are checkpointed. This operand provides two advantages: 1. Less time and space is required for recording the checkpoint record set. 2. If a program using 24K of storage is being run in a larger system and only 24K is checkpointed, that program can be restarted, either on a 24K system or as a 24K partition in a multiprogramming system. Tpointer (or r3) is the symbolic name of an eight-byte field contained in the problem program area. (See Repositioning Magnetic Tape. ) Dpointer (or r4) is the symbolic name of a DASD operator verification table that the user can set up in his own area of main storage. (See DASD Operator Verification Table. ) Filename (or rS) is used only for checkpoint records on disk. It is the name of the associated DTFPH macro. (see Checkpoint on Disk.) Special register notation cannot be used with any of these operands. Section 3: Program Design 167 Information That Is and Is Not Saved: When the CHKPT macro is issued, the following information is saved: • Information for the restart and other supervisor or job control routines. • The general registers. • Bytes 8-10 and 12-45 of the communication region. CHECKPOINT FILE The checkpoint information must be written on a disk pack or a magnetic tape (either 7- or 9-track, EBCDIC only). The 7-track tape can be in either data conversion or translation mode; however, the magnetic tape unit must have the data conversion feature. On 7-track tapes, the 20-byte checkpoint header and trailer labels are written in the mode of the tape (Figure 3.9). The data records are written in data convert mode, odd parity. • The problem program area (see End Address Operand). Checkpoints On Tape • All DASD file protection extents attached to logical units belonging to the checkpointed program. The following information is not saved: • The floating point registers. (If needed, these registers should be stored in the problem program area before issuing CHKPT, and restored in a user restart routine.) • Any linkage to user routines set by the STXIT macro. (If needed, STXIT should be used in user's restart routine.> The programmer can either establish a separate file for checkpoints or embed the checkpoint records in an output data file (EBCDIC only). When the data file is read at a later time using logical IOCS, the checkpoint records are automaticallY bypassed. If physical IOCS is used, the user must program to bypass the checkpoint record sets. If a separate magnetic tape checkpoint file with standard labels is maintained, the labels should be either checked by an OPEN routine or bypassed by a MTC command before the first checkpoint is taken. • Any timer values set by the SETIME macro. (If needed, SETIME should be used in a user's restart routine.) Checkpoints On Disk • The program mask in problem program PSW. (If other than all zeros is desired, the mask should be reset in user's restart routine.) NOTES FOR DASD AND MICR FILES DASD system input or output files (SYSIPT, SYSLST, etc.) must be reopened at restart time. In the user's restart routine, the programmer must be able to identify the last record processed before checkpoint. Magnetic Ink Character Reader (MICR) files require the DTFMR supervisor linkages to be initiated at restart time. This can be accomplished by reopening the MICR file in the user's restart routine. Because the OPEN macro clears the docum~nt buffer, the problem program must disengage the device and process all follow up documents in the document buffer before taking each checkpoint. 168 DOS System Programmer's Guide If checkpoints are written on disk, the following must be observed: 1. Define area of disk to be used by writing a DTFPH macro and using a DLBL, EXTENT label set. 2. The number of tracks required is computed as follows: n 1 + [ X + L 30 20 18 + .£ z ] where: n = the number of sets of checkpoint records to be retained. (When the defined extent is full, the first set of checkpoint records is overlaid.) c = The number of bytes to be checkpointed in the user's problem program up to the end address specified in the CHKPT macro operand. x = The number of disk extents including nonoverlapping split-cylinder extents. If split-cylinder extents overlap on the same cylinder, the number of extents counted is the one used by the program. (This number is zero if DASD file-protect is not used.) 3. Open the area on disk by issuing an OPEN to the DTFPH. 4. Issue a CHKPT macro that points to the DTFPH to be used. 5. When restarting checkpointed jobs, the DTFPH filename is specified in the RSTRT job control card. 6. Each program can use a common checkpoint file or define a separate one. If a common file is used, only the last program using the file can be restarted. y = same as preceding for 2321. z = 3625, if checkpoint records are written on a 2311. 7249, if checkpoint records are written on a 2314/2319. For each division, the remainder is rounded to the next highest whole number before multiplying by n. See Figure 3.6 for an example using the checkpointed facility on disk. r----------T-----------T-------------------------------------------------------, PAYROLL START I • CHKPDSK • DTFPH DEVICE=2311,MOUNTED=SINGLE,TYPEFLE=OUTPUT • • OPEN CHKPDSK • • CHKPT SYS004,RSTRT,END"DVER,CHKPDSK • I II I II I II I II • END ~----------~-----------~-------------------------------------------------------~ I I / / JOB CHKPT I I ASSGN SYS004,X'190' I I ASSGN SYSOOO,X'180' I I ASSGN SYS001,X'181' I I ASSGN SYS002,X'182' I I // DLBL CHKPDSK,'CHECKPOINT FILE'", I I // EXTENT SYS004,DOS-II",1900,89 I IL ______________________________________________________________________________ / / EXEC PAYROLL J Figure 3.6. Using Checkpoint Facility on Disk Section 3: Program Design 169 REPOSITIONING I/O FILES The I/O files used by the checkpointed program must be repositioned on restart to the next record that the user wants to read or write. The checkpoint facility does not provide aids for repositioning unit record files. The programmer must establish his own repositioning aids and communicate these to the operator, when necessary. Some suggested ways are: 1. The fourth operand of the CBKPT macro pOints to two V-type address constants that the user specifies in his coding. The order of these constants is important. 1. The first constant points to a table containing the filenames of all the logical IOCS magnetic tape files that are to be repositioned. 2. The second constant points to a table containing repositioning information for physical IOCS magnetic tape files that are to be repositioned. 3. If the first, second, or both constants are zero, no tapes processed by logical, physical, or both types of IOCS, respectively, are repositioned. Take checkpoints at a logical breaking point in the data, such as paper tape end~of-reel. 2. Switch card stackers after each checkpoint. 3. Print information at the time of checkpoint to identify the record in process. 4. Issue checkpoints on operator demand. Operand Name User sequential DASD input, output, or work files require no repositioning. When updating DASD records in an existing file, the programmer must be able to identify the last record updated at the time of the checkpoint in case he needs to restart. This can be done in various ways: 1. 2. Create a history file to record all updates by dumping an image of the direct access record on tape as soon as it has been read. When a restart is initiated, these records can be used to rewrite the file and establish the status that existed when the corresponding checkpoint was taken. When this is completed, normal restart procedures are accomplished and reprocessing begins. Create a field in updated records to identify the last transaction record that updated it. This field can be compared with each transaction at restart time. Repositioning Magnetic Tape Checkpoint provides some aid in repositioning magnetic tape files at restart. Files can be repositioned to the record following the last record processed at checkpoint. The following discussion presents the procedure in correlation with Figure 3.7. 110 DOS System Programmer's Guide SYSOOx,(rl)" POINTER CHKPT I ,.r----------------------~ POINTER DC r - - - - - V(lOGICL) V(PHYSCL) I I r---------' I ,. LOGICL CNOP I r-----J 2,4 DC H 'n' number of entries as follows. r- DC V(filename 1) V(filename2) • • • symbolic DTF name of each tape file to be repositioned at restart V{filenamen} r - - - - - - - - - - ..J ,. I PHYSCL DC H'n' number of entries as follows. 3H • • • r- - - - - - - - - - - - _J six bytes (3 halfwords) for each tape fi Ie that is to be repositioned at restart. 3H I I , I filename 1 DTfxx Figure 3.1. Procedure for Building Tape Repositioning Tables If the tables are contained in the same CSECT as the CHKPT macro, the constants may be defined as A-type constants. The user must build the tables discussed. Each filename in the logical IOCS table points to the corresponding DTF table where IOCS maintains repositioning information. The user should note the following: 1. 2. Magnetic tapes with nonstandard labels should be repositioned past the labels at restart time (presumably the labels are followed by a tapemark so that foreward space file may be used). If a tape that is to be repositioned is processed with nonstandard labels and is read backwards, the user must keep a physical IOCS repositioning table, because the physical record count kept by loes will be incorrect. The physical record count must be the number of forward reads necessary for restart to position the tape. 3. Restart does not rewind magnetic tapes when repositioning them. 4. A multifile reel should be prepositioned to the beginning of the desired file. 5. The correct volume of a multivolume file must be mounted for restart. 6. For tapes with a standard VOL label, restart writes the file serial number and volume sequence number on SYSLOG, and gives the operator the opportunity to verify that the correct reel is mounted. 7. IOCS can completely reposition files on system logical units (SYSIPT, SYSLST, etc), if the tape is not shared with any other program and if the user keeps a physical IOCS repositioning table. However, if a system logical unit file is shared with other programs, a problem exists. output produced after the checkpoint is duplicated at restart. Input records must be reconstructed from the checkpoint, or the user restart routine must find the last record processed before checkpoint. The entries in the physical IOCS table are as follows: First halfword: hexadecimal representation of the symbolic unit number of the tape (copy from CCB bytes 6 and 7). Second halfword: number of files within the tape in binary notation. That is, the number of tapemarks between the beginning of tape and the position at checkpoint. Third halfword: number, in binary notation, of physical records between the preceding tapemark and the position at checkpoint. DASD operator Verification Table If the Dpointer operand in the CHKPT macro is used, the user can build a table in his own area of main storage to provide the symbolic unit number and the bin (cell) number of each DASD file used by his program. At restart, the volume sequence number of these files is printed on SYSLOG, and the operator can verify them. The entries in the DASD operator verification table must consist of the following two halfwords, in the order stated: 1. The symbolic unit in hexadecimal notation copied from CCB bytes 6 and 7. 2. The bin (cell) number in hexadecimal notation is always zero, except for a 2321, in which case the bin number varies with the cell (0-9) being verified. There must be one table entry for each DASD unit to be verified by the operator. section 3: Program Design 171 See Figure 3.8 for the procedure for building a DASD operator verification table. r-----T-------~---------------------------l I Bytes I Contents ~-----+-----------------------------------~ 0-11 .:.>:~.:~.:.:.!.;.:.:.:.:.;.:~.:.:.:.;.:.~:.;.:.:.:.:.:.',' :~·:'.~"'h;~·:·:~~~·;·:·:·:·:·:~·:·:·}:·:·:·;·:·:~·:·:';';.;.:.; CHKPT SYSOOx, RSTRT, END" DVER, CHKPDSK I I r----------------------~ I I I I r---------------~ I t DVER CNOP 2, 4 DC H'n' number of entries as follows: 2H • • ,.. _________ J • 4 bytes (2 halfwords) are required for each DASD so that the operator can verify each volume sequence number at restart time. CHKPDSK Figure 3.8. DTFPH Procedure for Building DASD Operator Verification Table BYPASSING EMBEDDED CHECKPOINT RECORDS ON TAPE WITH PHYSICAL IOCS The checkpoint information saved is written as a set of magnetic tape records consisting of a 20-byte header record, as many core-image records as required to save the necessary parts of main storage, and a 20-byte trailer record identical to the header. See Figure 3.9 for the format of header and trailer record. If checkpoint sets are embedded in a file being read with physical IOCS, they must be recognized and bypassed. On any mode input tape, checkpoint sets may be identified by the first 12 bytes of the header or trailer records. Note that when reading backwards, the checkpoint header occupies the 20 low-order bytes of the input area. 172 14-15 The total number, in unpacked hexadecimal, of records following the header. 16-19 The serial number of the check L _____ ~ ___________________________________ J point. Figure 3.9. DOS System Programmer's Guide Format of the Checkpoint Header/Trailer Records When bypassing checkpoint sets, three methods are possible: 1. Go into a read loop (forward or backward) until the checkpoint trailer (header if backward) is encountered. 2. Extract the count from bytes 12-13 of the header (or trailer if backwards), add 2 to this, and forward-space (or backspace) that number of records. Read commands could also be used. 3. Extract bytes 14-15 of the header (or trailer if backwards), pack and convert the field to binary, and forward-space (or backspace) that number of records. Read commands could also be used. 2H I t /// CHKPT // 12-13 The number, in binary, of core image records following the header • Operand Operation Name I When bypassing checkpoint sets on 7-track tapes in translate mode, only method 3 can be used and only forward-space (or backspace) record commands (not reads) can be used. Reads would create data checks. BYPASSING CHECKPOINT RECORDS ON TAPE WITH LOGICAL IOCS When a tape input file contains checkpoint records interspersed among the data records, the DTFMT macro parameter CKPTREC=YES is required. When this parameter is specified, logical IOCS bypasses the embedded checkpoint records. RESTARTING CHECKPOINTED PROGRAMS Job control prepares the system for restarting from a checkpoint by loading the restart program that repositions tape units, reinitializes the communication region, and stores the information from the RSTRT statement. The restart program handles the actual restarting of the problem program. When a checkpoint is taken, the completed checkpoint is noted on SYSLOG. Restarting can be done from any checkpoint record. not just the last. The job name specified in the JOB statement must be identical to the job name used when the checkpoint was taken. The proper 1/0 device assignments must precede the RSTRT control statement. Assignment of input/output devices to symbolic unit names may vary from the initial assignment. Assignments are made for restarting jobs in the same manner as assignments are made for normal jobs. RSTRT Statement The restart facility allows the programmer to continue execution of an interrupted job at a point other than the beginning. The procedure is to submit a group of job control statements including a restart (RSTRT) statement. The control statements necessary to restart a job from a checkpoint are: 1. JOB statement specifying the same job name used when the checkpoint was taken. 2. ASSGN statements for assigning I/O devices to the symbolic unit names. 3. RSTRT statement specifying the unit that contains the checkpoints and the checkpoint ID number taken from the message printed when the checkpoint was taken. The format of the RSTRT statement is: IBM 3211 Printer Support The addition of tapeless forms control and improvements in the use of the loadable print character buffer required special programming support for the IBM 3211 Printer. SYSBUFLD is the service program that loads the Universal Character Set Buffer (UCSB) and the Forms Control Buffer (FCB) with buffer load programs for the 3211 printer. SYSBUFLD is self-relocating. requires 2K of main storage. and is executed as a job step under BJF or SPI. It is initiated by the command: // EXEC SYSBUFLD $$BUFLDR is another 3211 program, called by IPL to load the UCSB and FCB buffer loads from the core image library. // RSTRT SYsxxx,nnnn,filename SYSxxx nnnn filename Symbolic unit name of the device on which the checkpoint records are stored. This unit must have been previously assigned. Identification of the checkpoint record to be used for restarting. This serial number is four characters and corresponds to the checkpoint identification used when the checkpoint was taken. The serial number is supplied by the checkpoint routine. symbolic name of the 2311 or 2314 disk checkpoint file to be used for restarting. It must be identical to the filename of the DTFPH used to describe the disk checkpoint file and the fifth parameter of the CHKPT macro instruction. This operand applies only when specifying a 2311 or 2314 disk as the checkpoint file. system Considerations When a 3211 PUB is encountered, the IPL program calls the buffer load transient, $$BUFLDR. $$BUFLDR in turn calls $$BUCB to load the UCSB. and $$BFCB to load the FCB. As supplied by IBM, these two phases contain: $$BFCB the configuration for a 66-line page (at 6 lines per inch). with 56 lines available for printing. a channel 1 for line 1, and a channel 12 for line 56. $$BUCB the character configuration for the All train. Also, $$BUFLDR sets the UCSB for folding and suppressing data checks. SYSBUFLD can be used to change the UCSB or FCB configurations, or to reload these buffers if a hardware failure occurs. Section 3: Program Design 173 Only one FCB load is supplied in the DOS system. Additional FCB loads can be created using the procedure in the DOS system Control and Service listed in the Preface. FCB loads can be either cataloged in the core image library or can be card images. Any of your FCB loads can be cataloged in the core image library as $$BFCB to enable the IPL program to load it. If a phase name is not specified during an FCB load, SYSBUFLD loads the buffer from SYSIPT. All UCSB programs must be cataloged in the core image library. They are loaded by specifying them in the SYSBUFLD control card. The four rema1n1ng standard train configurations (Gll, Hl1, P11, or T11) are in the relocatable library under the name IJBTRxll, where x is G, H, P, or T. These can be cataloged in the CIL to be loaded according to the train configuration. Non-standard UCSB loads can be created following the procedure in the DOS System Control and Service listed in the Preface. Any of these standard or nonstandard loads can be cataloged as $$BUCB to enable the IPL program to load that particular train configuration. 174 DOS System Programmer's Guide Error Recovery Techniques The simplest error recovery technique for the 3211 printer is specifying ERROPT=RETRY in the DTFPR, which sets CCB byte 2, bit 5 (PRINTOV=YES also sets this bit). This causes one automatic retry of the equipment-check/command-retry error. A more comprehensive technique is specifying ERROPT=YES in the PRMOD and ERROPT=name in the DTFPR, which sets eeB byte 2, bits 5 and 6. These bits indicate linkage to your error recovery routine named in the DTFPR, and provide automatic retry of the equipment-check/command-retry error. Return from your error recovery routine is by register 14. Both registers 14 and 15 must be saved if LIoes is used during error recovery. PIoes users can provide linkage to error recovery by testing the applicable bits in the eeB. See Figure 3.10 for the error indicators. If PIoes or LIoes is used, the sense information is not available to the user. The sense command, issued by the DOS error recovery routines, clears the 3211 sense information. CCB Byte Bit 2 1 UCSB Parity Check - Line Complete: There has been a parity error in at least one position of the UCSB. All characters in the I ine have been printed and line spacing has taken place. The position in error has been cleared, so errors will not be encountered during subsequent scans of the UCSB. Printer speed is degraded as a result of this error. Full printing speed cannot be regained until the UCSB is reloaded. You need a routine to reload the UCSB during the job step, or use SYSBUFLD to reload the UCSB before the next job step. 3 0 Equipment Check/Print Check: This is a hardware error that has resulted in an incomplete I ine, but I ine spacing has taken place. Check for possible line position or print quality errors. The line in error must be either accepted or the page reprinted (a user - written routine is needed). 3 1 Equipment Check/Print Quality: This indicates a hardware error has occurred that caused light or blurred printing. Line spacing has taken place. Check for possible print check or line position errors. The line in error must be accepted or the page reprinted (a user-written routine is needed). 3 2 Line Position Error: This can be a hardware error, a parity error in the FCB, or the result of a skip to a channel code not in the FeB. Check for possible print check or print quality errors. There is no way to tell where the carriage is positioned relative to the FBC; physical repositioning, as well as reloading of the FCB, may be necessary. 3 3 Data Check/Print Check: An unprintable character has been sent to the printer. The appl icable position (s) in the print line are bl ank and the paper has been spaced. The line in error must be either accepted or the page reprinted (a user-written routine is needed). Note: Check or reload the UCSB to ensure that the correct load has been used. 3 4 USCB Parity Check/Command Retry: There has been a parity error in at least one position of the UCSB. The appl icable position(s) in the print line is blank, but the paper has not been spaced. Subsequent attempts to print the applicable character will result in a data check/print check. The UCSB can be reloaded (a user - written routine is needed), and the applicable command (s) reissued. I Figure 3.10. Error 3211 Error Status Indicator Bits in the CCB Macro Writing The macro-definition language discussed here provides a systematic means by which the oos/360 assembler language programmer can develop macro instructions, thereby expanding the set of machine-oriented instructions that serve as the basis of the assembler language. This enables the programmer to reduce programming effort and shorten the assembler language source programs. With the aid of the macro language, any sequence of statements can be summarized into a single macro definition. Once written, this definition can be stored and referred to at any time, thus supplying the programmer with precoded routines. The programmer only writes a single statement, a macro instruction, to access the macro definition and retain access to all machine facilities. systematic use of macro instructions simplifies the coding of programs, reduces the frequency of programming errors, and encourages the use of carefully standardized sequences of assembler language statements for routine functions. There are two classes of macros in the Disk Operating System: system macros, which are IBM-written macros supplied with the system, and user macros, which are defined by the user. The user macros may be included in the source program and/or may be entered into the source statement library. Section 3: Program Design 175 The source statement library contains both user and system macro definitions. This library, which can be a part of system Residence (SYSRES) or a private library, eliminates the need for including definitions in the source module. MACRO INSTRUCTION The macro instruction statement is in assembler statement format. Symbols are used as a shorthand method of representing rules, definitions, etc. These macro instructions result in a one-for-one assembler statement. The name field of the macro instruction may contain a symbol that is not defined unless a symbolic parameter appears in the name field of the prototype and the same parameter appears in the name field of the generated model statement (see The Macro Definition) • The operation field contains the mnemonic operation code of the macro instruction and has to be the same as the mnemonic operation code in the source program or in the source statement library. The placement and order of the operands in the macro instruction statement is determined by the placement and order of the symbolic parameters in the operand field of the prototype statement. The operand field contains from 0-200 entries, separated by commas (entries are commonly referred to as parameters). Any combination of up to 255 characters may be used as a macro instruction operand if the rules concerning apostrophes, parentheses, equal signs, ampersands, commas and blanks are observed. These are described in the Tape Operating Systems Assembler Language publication listed in the front of this manual. The operand maybe written in a format different than that used for assembler language statements. The alternate format described here allows the programmer to write an operand on each line and allows the interspersing of operands and comments in the statement. Figure 3.11 illustrates the operand formats. r------T---------~--------------------------------------T-----------, I Name I OperationlOperand Comments I Col. 72 I ~------+----------+--------------------------------------+-----------~ I I I I I I NAMEl I OPl I OPERAND1, OPERAND2, I x I I I IOPERAND3 THIS IS THE NORMAL FORMAT I I I I I I ~ ~ I INAME2 I OP2 IOPERAND1, THIS IS THE I x I I I I OPERAND 2 , OPERAND3 ALTERNATE FORMAT I I I I I I I INAMEJ I OP3 IOPERAND1, THIS IS A COMBINATION I x I I I IOPERAND2,OPERAND3,OPERAND4, I x I IL______ I _________ I ______________________________________ OPERANDS OF BOTH FORMATS I ___________ JI ~ Figure 3.11. Operand Field Formats When a program is written in the Disk Operating system macro language (an extension of DOS assembler language), one of three macro instruction formats can be used: keyword, pOSitional, or mixed. Figure 3.12 shows the typical form of a keyword macro instruction to be used with a keyword macro definition. 176 DOS System Programmer's Guide r----------T--------~--------------------, I Name I Operation I Operand I ~----------+---------+~-------------------~ IA symbol, Imnemonic IZero to 100 or 200 I I sequence I operation I operands, separated I Isymbol, orlcode Iby commas. I I _________ not used -LI ________-LI ____________________JI L Figure 3.12. Keyword Macro Instruction Each operand consists of a keyword immediately followed by an optional value. Nested keywords are not permitted. A keyword consists of one to seven letters and digits, the first of which must be a letter. The operands of a keyword macro instruction may be written in any order. If an operand is omitted, the comma that would have separated it from the next operand need not be written. The following are valid keyword macro instruction operands: A4=F'6041' DUPE4=MEMBER r----y---------T--------------------------,I I Name I Operation I Operand ~----+---------+--------------------------~ I IEXAMPLE liA,&B,&C,&D,&E,iF I __________________________JI IL____ I _________ EXAMPLE 117,*+4"AREA,FIELD(6) ~ ~ Figure 3.14. Macro Instruction with Prototype Mixed-mode macro instruction operands are a combination of both positional and keyword operands. Certain operand entries (positional) must be written in a fixed order: other operand entries (keyword) can be specified in any order. Figure 3.15 illustrates the mixed-mode macro instruction. so= r---------~---------T--------------------, I Name The following are invalid keyword macro instruction operands: I Operation I Operand I ~----------+---------+--------------------~ &X4.P3=O(1,4) Keyword does not begin with a letter. IA symbol, Imnemonic Izero to 100 or 200 I I sequence I operation I operands, separated I I symbol or I code I by commas. I L _________ Inot used -LI ________ -LI ____________________ JI CARDAREA=B+l Keyword is more than seven characters. Figure 3.15. =(TO(S),(AFTER» No keyword. .Thetypical macro instruction is . positional unless otherwise indicated. The positional macro instruction operands are written in a fixed order. Figure 3.13 illustrates the positional macro instruction. r----------y---------T--------------------, I Operation I Operand I I Name ~----------+---------+--------------------~ IA symbol, Imnemonic Izero to 100 or 200 I I sequence loperationloperands, separated I I symbol, or I code I by commas. I L I __________ not used I _________ I ____________ _______ JI ~ Figure 3.13. ~ ~ Positional Macro Instruction The positional operands, if omi~ted from the macro instruction but appear in the prototype, are replaced by the comma that would have separated them from the next operand. If the last operand is omitted from a macro instruction, then the comma(s) separating the last operand from the previous operand may be omitted. Figure 3.14 shows a macro instruction preceded by its corresponding prototype statement. The third and sixth operands of the macro instruction corresponding to the third and sixth operands of the prototype statement are omitted in this example. Mixed Macro Instruction The operand consists of two parts. The first part corresponds to the positional operands. and is written in the same way that the operand entry of a positional macro instruction is written. The second part of the operand corresponds to the keyword operands. This part is written in the same way that the operand entry of a keyword macro instruction is written. Figure 3.16 illustrates these facilities. r----T---------T--------------------------,I I Name I Operation I Operand ~----+---------+--------------------------~ I I MACRO I I I&N IMOVE I iTY,&P,iR,iTO=,iF= I liN IST&TY liR,SAVE I I I LiTY I iR, &P , iF I I IST&TY liR,iP,iTO I _________ liR,SAVE __________________________ JI IL____ IL&TY ~ Figure 3.16. ~ Mixed-Mode Definition MACRO DEFINITION A macro instruction cannot be assembled unless a macro definition is made available to the assembler. A macro definition is a set of statements that provide the assembler with: 1. The name entry, the mnemonic operation code, and the form of the macro instruction operand, and Section 3: Program Design 177 2. The sequence of statements that the assembler uses when the macro instruction appears in the source program. Assembler Language publication listed in the front of this manual. 2. Elements of the Macro Definition Every macro definition is made up of four elements: header statement, prototype statement, model statement, and a macro-definition trailer statement. The macro instruction header and trailer statements denote the beginning and end of a macro definition respectively. The header statement's name field contains blanks, the operation field contains the word MACRO, and the operand field contains blanks. The header statement is the first statement of the macro definition. The trailer statement follows the same general outline as the header statement; only the operation field, that contains the word MEND, is different. The trailer statement must be present to denote the end of the macro definition. 3 and 4. scaling (S') and Integer (I'): Scaling and integer attributes are provided for symbols that name fixed point, floating point, and decimal DC or OS statement. The programmer may refer to the length, scaling, and integer attributes in the operand field of a SETA instruction, or in arithmetic relations in the operand fields ofSETB or AIF instructions. 5. A prototype is defined as an original model on which something is patterned. The prototype statement of a macro definition specifies in the operation column, the name of the macro and the format for the operand of all macro instructions that make use of this definition. This prototype statement must be the second statement in the macro definition. Like the operand of the macro instruction, the prototype statement may be written in a form different from that used for machine or assembler instructions. The alternate form is described under The Macro Language. ATTRIBUTES 6. The assembler assigns attributes to macro instruction operands and to symbols in the program. These attributes may be referred to in conditional assembly instructions under Conditional Assembly Statements. There are six kinds of attributes: 1. 178 Type (T'): The type attribute of a macro instruction is a letter. The type attribute may be referred to in the operand of a SETC instruction, or in character relations in the operands of SETB or AIF instruction. The letters used with the type attribute and their meanings can be found in the DOS System Programmer's Guide Length (L'): The length attribute of a symbol (or ofa macro instruction operand that is a symbol) is the length of the specified operand. Reference to the length attribute of a variable symbol is illegal except for symbolic parameters in SETA, SETB, and AIF statements. Reference must not be made to the length attributes of symbols whose type attributes are the letters M, N, 0, T, or U. Count Attribute (K'): The programmer may refer to the count attribute of macro instruction operands only. The count attribute is a value equal to the number of characters in the macro instruction operand after substituting for variable symbols excluding commas. If the operand is a sublist, the count attribute includes the beginning and ending parentheses and the commas within the sublist. The count attribute of an omitted operand is zero. The count attribute is one of the following: a. the operand field of a SETA instruction, or b. in arithmetic relations, the operand field of SETB or AIF instructions which are part of a macro definition can be referenced by the user. Number Attribute (N'): The number attribute of macro instruction operands, only, is referenced. The number attribute is a value equal to the number of operands in an operand sublist. The number of operands in an operand sublist is equal to one, plus the number of commas that indicate the end of an operand sublist. If the macro instruction operand is not a sublist, the number attribute is one. If the macro instruction operand is omitted, the number attribute is zero. Reference may be made to the number attribute in the operand field of a SETA instruction, or in arithmetic relations in the operand fields of SETB and AIF instructions that are part of a macro definition. 1. Name field entry which can contain blanks, a symbol, a symbolic parameter or a sequence symbol. 2. The operation entry may contain any machine instruction, conditional instruction, assembler instruction, or symbolic parameter except COPY, END, ICTL, ISEQ and PRINT; or it may contain a variable symbol, depending on the statement. 3. The operand entry may contain ordinary symbols or variable symbols. After substitution, the operand must not be greater than 121 characters. Model statements must follow the rules for paired apostrophes, ampersands, and blanks, as macro instruction operands. 4. The comments field entry which can contain descriptive items of information about the program is inserted after the operand. All 256 valid characters, including blanks, may be used in writing a comment. The entry cannot extend beyond the end column (normally column 11) and a blank must separate i t from the operand. SUBLIST NOTATION A sublist is one or more operands, separated by commas and enclosed in paired parentheses. An operand of a macro instruction may be a sublist. The entire sublist, including all operands, commas and parentheses is considered one macro instruction operand. Each operand entry within the parentheses is called a sublist member. Sublists provide the user with a convenient way to refer to a collection of macro instruction operands as a single operand, or a single operand in a collection of operands. For the accessing of individual members, the left parenthesis of the sublist notation must immediately follow the last character of the symbolic parameter. A period should not be placed between the left parenthesis and the last character of the symbolic parameter (Figure 3.17). r----~--------T-----------------, I NAME I OPERATION I OPERAND I ~----+---------+-----------------~ HEADER I I MACRO I I Prototype I IADDNUM I&NUM,®,&AREA I Model I IL I®,&NUM(l) I Model I IA I®,&NUM(2) I Model I IA I®,&NUM(3) I Model liST I®,&AREA I Trailer I I MEND I I ~----+---------+-----------------~ I I I Figure 3.11. The three types of variable symbols are symbolic parameters, SET symbols and system variables. I MACRO I IADDNUM I (A,B,C),6,SUM I Generated I IL 16,A I Generated I IA 16,B I Generated I IA 16,C I Generated LI ____ 1ST _________ 16,SUM _________________ JI ~ VARIABLE SYMBOLS Symbolic Parameter ~ Sublist Illustration The operand of the macro instruction that corresponds to symbolic parameter &NUM is a sublist. One of the operands in the sublist is referred to in the operand entry of three of the model statements. Model statements are the macro definition statements from which the desired sequences of machine instructions and certain assembler instructions are generated. Zero or more model statements may follow the prototype statement. A model statement consists of one to four entries: The symbolic parameter consists of an ampersand (first character) followed by one to seven letters and/or numbers, the first of which must be a letter. Symbolic parameters appear in prototype and model statements. They are assigned values by the programmer when he writes a macro instruction. The programmer should not use &SYS as the first four characters of a symbolic parameter. Example: Valid Invalid &LOOP2 &2BAC (first character after & not letter) 'READER &AREA2456 (too long) section 3: Program Design 119 SET Symbols SET symbols follow the same rules for structure as symbolic parameters. SET symbols differ from symbolic parameters in three ways: 1. their position in an assembler language source program, 2. how they are assigned values, and 3. how their assigned values can be changed. character data. These operands are called local SETA, SETB, or SETC symbols. If a local instruction is part of a macro definition, it must immediately follow the prototype statement and any global instructions or another LCLA, LCLB, or LCLC. The local definition of these operands indicates that each SET symbol is defined only within the defining macro. The GBLA or LCLA, GBLB or LCLB, GBLC or LCLC operands are assigned initial values of 0 (X'FO'), 0 (X'OO'), and null character (no hexadecimal number), respectively. The SETA, SETB, and SETC symbols are assigned the initial values of 0, 0, and null character value, respectively. Defining SET Symbols A SET symbol must be defined by the programmer before it can be used. It is defined by appearing as an operand of a global or local instruction (GBLA, GBLB, GBLC, LCLA, LCLB, LCLC). Figure 3.18 shows the typical format of global and local instructions. r----------T---------T--------------------, I Name I Operation I Operand I ~----------+---------+--------------------~ Not used; IGBLA, lOne or more variable must not IGBLB, Isymbols used as be present GBLC, or ISET symbols and I separated by commas. I(If more than one Imacro defines one LCLA, Iglobal SET symbol LCLB, land these macros are LCLC lassembled together, Ithe global SET Isymbol value is set Iby the first macro, Ibut is not altered Iby subsequent L__________ _________ Imacros.) ____________________ J ~ Figure 3.18. ~ Format of Globals and Locals A global instruction (GBLA, GBLB, GBLC) defines one or more operands as names associated with arithmetic, binary, or character data. These operands are called global SETA, SETB, or SETC symbols. If a global instruction is part of a macro definition, i t must immediately follow the prototype statement or another GBLA, GBLB, or GBLC. The global definition of these operands indicates that each SET symbol is defined both inside and outside the defining macro and enables communication between discrete macros. A local instruction (LCLA, LCLB, LCLC) defines one or more operands as names associated with arithmetic, binary, or 180 DOS System Programmer's Guide The SETA instruction in the operand entry is evaluated as a signed 32-bit arithmetic value that is assigned to the SETA symbol in the name entry. Figure 3.19 shows the format of the SETA instruction. r------T--------~------------------------, I Name I Operation I Operand I ~------+---------+------------------------~ I A SETA I SETA lone term, or I I symbol I Ian arithmetic I I I lexpression, not I Iless than -23~ nor I I I than +23~-1. I ______ I _________ Igreater L ________________________ JI ~ Figure 3.19. ~ Format of SETA Instruction The expression may consist of one term or an arithmetic combination of terms, the minimum and maximum values of which are _23~ and +23~-1, respectively. The arithmetic value assigned to a SETA symbol is substituted for the SETA symbol when it is used in an arithmetic expres~ion. The SETB instruction may assign the binary value 0 or 1 to a SETB symbol. Figure 3.20 illustrates the format of this instruction. r------T---------T------------------------, I Operation I Operand I I Name ~------+---------+------------------------~ IA SETBISETB IA 0 or a 1, (0) or (1), I I symbol I lor a logical expression I L ________________________ JI I ______ I _________ Iwithin parentheses ~ Figure 3.20. ~ Format of SETB Instruction The operand may contain a 0 or a 1 or a logical expression enclosed in parentheses. No explicit binary zeros or ones are allowed in parentheses other than in the form (O) or (1). A logical expression is evaluated to determine if it is true or false. The SETB symbol in the name entry is then assigned the binary value 1 or 0 corresponding to true or false, respectively. The following are valid operand fields of SETB instructions: (&AREA+2 GT 29) (T'&T02 EQ 'C') The following are invalid: &B (not enclosed in parentheses) (T'&P12 EQ IF' &B) two terms in succession The SETC instruction assigns a character value to a SETC symbol. Figure 3.21 shows the format of a SETC instruction. r------T---------T------------------------, IOperationloperand I I Name ~------+---------+------------------------~ I A SETC I SErC lOne operand of I I symbol I I the type attribute, I I I I character expression I I I lor a substring I I I I notation. A SETA I I I I symbol may appear I IL______ I _________ I here. ________________________ JI ~ Figure 3.21. ~ Format of SETC Instruction The character value assigned to a SETC symbol may be a type attribute. If the type attribute is used, it must appear alone in the operand field. A character expression usually appears in the operand field. A character expression consists of any combination of characters enclosed in apostrophes. The maximum length of a character expression is 127 characters. The character value enclosed in apostrophes in the operand field is assigned to the SETC symbol in the name entry. The maximum length character value that can be assigned to a SETC symbol is eight characters. If a value greater than 8 is specified, the leftmost 8 characters are used. system Variables ~ I system variable symbols are assigned values automatically by the assembler. There are four system variable symbols: &SYSNDX, &SYSPARM, &SYSECT, and &SYSLIST. System variable symbols may be used in the name, operation, and operand entries of statements in macro definitions, but not in statements outside of macro definitions with the exception of &SYSPARM. They may not be defined as symbolic parameters or SET symbols, nor may they be assigned values by SETA, SETB, and SErC instructions. The &SYSNDX symbol is assigned the four-digit nwUber 0001 for the first macro instruction processed by the assembler, and it is incremented by one for each subsequent inner and outer macro instruction processed. &SYSNDX may be combined with other characters to create unique names for statements generated from the same model statement. The &SYSECT symbol carries a character value that is the name of the last START, CSECT, or DSECT statement encountered before the expansion of the USING macro. The &SYSPARM is specified in theSTDJC macro at system generation time. &SYSPARM allows the user to control conditional assembly flow and source code generated through the use of the parameter specified in the job control OPTION statement. &SYSPARM acts as a global SETC, except its value is set by the job control OPTION statement. If no named CSECT, DSECT, or START statements occur before a macro instruction, &SYSECT is assigned a null character value for that macro instruction. The &SYSLIST symbol (not available in keyword macro definitions) is the symbol reference for the entire macro instruction operand field. This symbol refers to the nth macro instruction operand. If the nth operand is a sublist, then &SYSLIST(n,m) may refer to the mth operand in the sublist, where nand m may be any arithmetic expressions allowed in the operand field of a SETA statement. CONCATENATION Concatenation is defined as a linking together in a series or chain; a process of linking or joining together in a sequence, with a specified order. If a symbolic parameter in a model statement is immediately preceded or followed by other characters or another symbolic parameter, the characters that correspond to the symbolic parameter are combined, in the order given in the generated statement, with the other characters or the characters that correspond to the other symbolic parameter. This process is called concatenation. When a symbolic parameter is concatenated with any following character value, the extent of the symbol must be defined (delimited). If the first character of the following character value is not a recognized Section 3: Program Design 181 delimiter, a special delimiter character (a period '.'), must be used when the first character is a letter, digit, left parenthesis or a period. A period is optional when the first character is an ampersand (&). See Figure 3.22. 2. Vary the number and sequence of generated statements. These conditional assembly instructions give true flexibility to the macro definition language. r----~---------T----------------, IName I Operation I Operand I ~-----+---------+----------------~ Header I I MACRO I I Prototype I &NAME I MOVE I&P,&S,&R1,&R2 I Model I&NAMEIST I&R1,&S.(&R2) I Model I IL I&R1,&P.B I Model liST I&R1,&P.A I Trailer I IL I&R1,&S.(&R2) I Macro I I MEND I I I I I I ~ ~ There are 13 conditional assembly instructions: LCLA, LCLB, LCLC, GBLA, GBLB, GBLC, SETA, SETB, and SETC, that are discussed under SET Symbols, and AlF, AGO, ACTR, and ANOP that are discussed in this section. ~-----+---------+----------------~ IHERE IMOVE IFIELD,SAVE,2,4 I GeneratedlHERE 1ST 12,SAVE(4) I Generated I IL 12,FIELDB I Generated I 1ST 12,FIELDA I Generated IL_____ IL _________ 12,SAVE(4) ________________ JI Figure 3.22. Concatenation and Generated Coding SEQUENCE SYMBOLS The name entry of a statement may contain a sequence symbol that provides the programmer with the ability to vary the sequence in which the assembler processes statements. These symbols are never variables. They name a branch point in the definition and consist of a period followed by a letter and seven letters and/or digits. A sequence symbol in the operand entry of an AIF or AGO statement (see Conditional Assembly Statements) references the statement named by the sequence symbol. It can be used in the name entry of any statement that does not contain a symbol or SET symbol, except a prototype statement, or a MACRO, LeLA, LCLB, LCLe, GBLA, GBLB, GBLC, ACTR, ICTL, ISEQ, or COpy instruction. For example, • READER, • LOOP2, .A23456 and .X4F2 are valid sequence symbols. AIF--Conditional Branch The AIF instruction alters conditionally the sequence in which source program statements are processed by the assembler. The conditional branch is located within or outside of the macro definition. If the logical expression in the operand field is true, the macro generator branches to the sequence symbol following the logical expression. Figure 3.23 illustrates the typical form of this instruction. r----------y---------y--------------------, I Name I Operation I Operand I ~----------+---------+--------------------~ IA sequencelAIF IA logical expression I Isymbol or I lenclosed in paren- I Inot used I Itheses, immediately I I I Ifollowed by a I L ____________________ JI I __________ I ________ Isequence symbol. ~ Figure 3.23. ~ Conditional Branch Instruction The following are valid operands of AIF instructions: (&AREA+X'2D' GT 29).READER (&NAME+FlVE GT 2).POSSIBLE The following are invalid operands of AIF instructions: CONDITIONAL ASSEMBLY INSTRUCTIONS The conditional assembly instructions allow the programmer to: 1. 182 Define and assign values to SET symbols that can be used to vary parts of generated statements and DOS System Programmer's Guide I (T'&ABC NE T'&XYZ) No sequence symbol (T'&ABC NE T'&XYZ).X4F2 Blank between logical expression and sequence symbol .X4F2 No logical expression AGO--Unconditional Branch The AGO instruction causes an unconditional branch to the sequence symbol in the operand. Figure 3.24 illustrates the typical form of this instruction. r----------T---------T--------------------, I Name I Operation I Operand I ~---------_+---------+--------------------f IA sequencelAGO IA sequence symbol I Isymbol or I I I IL__________ not used I _________ I ____________________ JI ~ Figure 3.24. to be branched to. Figure 3.25 illustrates the typical form of this instruction. r----------T---------T--------------------, I Operation I operand , I I Name ~----------+---------+-------------------.~ IA sequencelANOP INot used, must not I ___________________ JI IL__________ symbol I _________ Ibe present. ~ Figure 3.25. ~ Assembly No Operation Instruction ~ Unconditional Branch Instruction The statement named by the sequence symbol in the operand is the next statement processed by the assembler. The statement named by the sequence symbol may precede or follow the AGO instruction. If the programmer wants to use an AIF or AGO instruction and has already entered a symbol or variable symbol in the name entry of the statement to which he wishes to branch, he cannot place a sequence symbol in the name entry. An ANOP instruction can be placed before that instruction, and then branched to. This has the same effect as branching to the statement immediately after the ANOP statement. ACTR--Conditional Assembly LOop Counter The ACTR limits the number of AGO and AIF branches executed within a macro definition. When used, the ACTR must appear after the globals and locals symbol definition statements and before any other type of model statement. The ACTR instruction assigns a maximum count to the number of AGO and AIF branches executed within the macro definition. When the count reaches zero, an END card is generated. If the count is zero before decrementing, the assembler takes one of two actions: 1. 2. If a macro definition is being processed, the processing of it and any nested macros above it is terminated, and the next statement in the main portion of the program is processed. If the main portion of the program is being processed, conditional assembly is terminated, and the portion of the program generated so far is assembled. If an ACTR statement is not given, the assumed value of the counter is 150. EXTENDED CAPABILITIES The macro language provides additional features that allows the system to: 1. Terminate processing of macro definition 2. Generate error messages 3. Define global SET symbols (discussed in the section SET symbols) 4. Use system variable symbols (discussed under System Variable Symbols) 5. prepare keyword and mixed-mode macro definitions and write keyword and mixed-mode macro instructions (discussed under Macro Instruct~on Formats) MEXIT -- Macro Definition Exit ANOP--Assembly No Operation The ANOP instruction facilitates branching to a statement that has a symbol or variable symbol in the name field. The ANOP instruction causes no operation and is inserted immediately before the statement The MEXIT instruction allows exit from the macro definition at various points in the definition. However, when this instruction terminates the macro definition, it does not signify the physical -end of the definition. Figure 3.26 illustrates the typical form of the instruction. Section 3: Program Design 183 r----------T---------T--------------------, I Operation I Operand I I Name ~----------+---------+--------------------~ IA sequencelMEXIT INot used, must not I Isymbol or I Ibe present. I __________ IL not used I _________ I ______ _____________ JI ~ Figure 3.26. ~ Macro Definition Exit Instruction MNOTE statement The MNOTE instruction may generate a message and indicate the level of severity of the error. The severity code is for the programmer's information only and is not used by the DOS assembler or co~trol program. This instruction requests a message to be printed on the output listing. Figure 3.21 illustrates the typical form of this instruction. r----------T---------~-------------------, I Name I Operation I Operand I ~----------+---------+--------------------~ IA sequencelMNOTE Isee examples in text I I symbol or I I I __________ ILnot used I _________ I ____________________ JI Figure 3.21. 184 1. severity code, 'message' 2. , 'message' 3. 'message' ~ MEXIT should not be confused with MEND. MEND indicates the physical end of the macro definition. MEND must be the last statement of every macro definition, including those that contain one or more MEXIT instructions. ~ The operand entry of the MNOTE instruction may be written in one of the following forms: ~ MNOTE Instruction DOS System Programmer's Guide For two and three, the severity code is assumed as one. The MNOTE statement appears in the listing with a statement number at the point where it was generated. Because the message portion of the MNOTE operand is enclosed in apostrophes, two apostrophes must be used to represent a single apostrophe. Two ampersands must be used to represent a single ampersand that is not part of a variable symbol (see Figure 3.28). r----T------~----------------------------, I NamelOpera-loperand I I Ition I I ~----+------+-----------------------------~ L ______ 11,'ERROR**--NOT ______ ______________________ I ____ IMNOTE RECOVERABLE' JI ~ Figure 3.28. ~ ~ Sample MNOTE Figures 3.29 and 3.30 are examples of macro writing and usage. Figure 3.29 defines the MSG ~acro. There are no locally defined symbols. All are globals. Figure 3.30 is an example using the MSG macro to write an appropria'te message pertaining to a particular step of the routine. The generated coding of the MSG macro is indicated by a '+' after the statement number. PAGE STMT SOURCE STATEMENT 1 2 &NAME 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 .BADMSG .SETREP &REPGLB .INORDER &REPGLB .BEGIN .. &NAME .C &MSGLTH &NAME.A .D .B 33 34 Figure 3.29. MACRO MSG GBLA GBLC GBLB AIF AIF AIF MNOTE MEXIT MNOTE MEXIT ANOP SETB AGO ANOP SETB ANOP MSG MACRO 1 DOS CL3-4 06/09/69 MSG00010 MSG00020 &A~&B &MSGLTH &LATBR PROTOTYPE &REPGLB~&MSGGLB ('&A' EQ ").BADMSG ('&B' EQ 'REPLY').SETREP ('&B' EQ ").INORDER 1~'INVALID REPLY OPERAND~ I QUIT' 1~'NO MESSAGE CODED~ MSG00030 MSG00040 MSG00050 MSG00060 MSG00070 MSG00080 MSG00090 I QUIT' MSG00110 MSG00120 MSG00130 MSG00140 MSG00150 MSG00160 MSG00170 1 .BEGIN o CHANGE LEVEL 2-0 L 15~=V(MSGRTN) AIF BAL ANOP SETA DC DC AIF DC ANOP DS MEXIT BAL AGO MEND (&REPGLB).B 14~4(15) NON-REPLY HANDLER K'&A-2 FL1'&MSGLTH.' MESSAGE LENGTH C&A MESSAGE (NOT &REPGLB).D C' , ANSWER BYTE OH RESTORE BOUNDARY 14~0(15) REPLY HANDLER .C Sample MSG Macro Section 3: Program Design 185 STMT SOURCE STATEMENT DOS CL3-4 1176 ~ 1177 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 117g ~ 1179 ~ THE FOLLOWING ROUTINE CHECKS THE RETURN CODE AFTER A 1180 ~ READ,WRITE,CONTROL COMMAND IS GIVEN 1181 ~ REGISTER EIGHT CONTAINS THE ADDRESS OF ROUTINE WHICH 1182 ~ JUST GAVE THE READ OR WRITE COMMAND. IF THE COMPLETION 1183 ~ IS BAD REG 8 IS USED TO TURN THIS DEVICE OFF CNO MORE 1184 ~ OPERATIONS WILL OCCUR ON THIS DEVICE),THE OPERATOR MUST 1185 ~ RELOAD THE PROGRAM INORDER TO RESTART THIS DEVICE 1186 ~ 1187 1188 ~ 1190 CKCONDC LTR RF,RF CK CONDITION CODE 1191 BNZ CONTCK 1192 BR R2 EXIT BACK CK GOOD 1193 CONTCK MSG 'ERROR OCCURRED ON CKING RETURN CODE' 1194+x MSG MACRO CHANGE LEVEL 2-0 1195+CONTCK L 15,=VCMSGRTN) 1196+ BAL 14,4CI5) NON-REPLY HANDLER 1197+ DC FLl'35' MESSAGE LENGTH 1198+ DC C'ERROR OCCURRED ON CKING RETURN CODE' MESSAGE 1199+ DC OH RESTORE BOUNDARY 1200 LR R3,RF SWITCH REGS 1201 BAL R2,FORMAT GO FORMAT CONDITION CODE 1202 STC R3,ERRMSG+28 INSERT CHAR 1203 LR R3 J RF 1204 BAL R2,FORMATI GO FORMAT SECOND CHAR 1205 STC R3,ERRMSG+27 INSERT SECOND CHAR 1206 ERRMSG MSG 'CONDITION CODE = 1207+ x MSG MACRO CHANGE LEVEL 2-0 1208+ERRMSG L 15,=VCMSGRTN) 1209+ BAl 14,4CI5) NON-REPLY HANDLER 1210+ DC FLl'21' MESSAGE LENGTH , MESSAGE 1211+ DC C'CONDITION CODE = 1212+ DS OH RESTORE BOUNDARY 1213 X MVC MSG2+27(7),OPERATIN 1214 MSG2 MSG 'LAST OPERATION 1215+ x MSG MACRO CHANGE LEVEL 2-0 1216+MSG2 L 15,=VCMSGRTN) BAL 14,4CI5) NON-REPLY HANDLER 1217+ 1218+ DC FLl'36' MESSAGE LENGTH 1219+ DC C'LAST OPERATION , MESSAGE 1220+ DS OH RESTORE BOUNDARY 1221 PDUMP PDUMP START END 1222+;: 360N-CL-453 PDUMP' CHANGE LEVEL 3-0 Figure 3.30. 186 Sample MSG Coding DOS System programmer's Guide Section 4: Debugging Aids Section Outline Gathering Documentation .189 System Action Under Cancel • • 198 Wait States • • • • • • • • • .202 50ft Waits • • • • • • • • • • .202 Hard Waits. • • • • • • • • • .202 Debugging Assembler Programs • .204 Debugging COBOL Programs • • • • • • • • 204 How to Use a Dump .205 Locating a DTF • • • • • • .205 Locating Data • • • • • • • • 206 Debugging FORTRAN Programs • .234 Debugging RPG Programs. • .243 Halt Analysis • • • • • • • • • • • • 243 Causes of a Halt Zero Condition • • • 243 Debugging PL/I Programs • • • • .255 Summary of PL/I Debugging Aids • • • • 263 Handling Compile Time Aborts. • .264 Section 4: Debugging Aids 187 Section Figures Figure 4.1. SDR Communications Region (Part 1 of 2) • • • • • • • • • • • • .190 Figure 4.2. Machine Check Recording and Recovery (MCRR) Linkage Table .192 Figure 4.3. RMS Linkage Area (RASLINK) 193 Figure 4.4. First Part of Program Information Block (PIB) Table • .195 Figure 4.5. PIB Flag Expansions • • • • 196 Figure 4.6. Second Part of Program Information Block (PIB) Table • • • • • 197 Figure 4.7. Causes for Message OS04I (Cancel Code X'21') • • • • • • • • • • 200 Figure 4.8. Low Core E.rror Bytes .203 Figure 4.9. COBOL Sample Program (Part 1 of 27) ............207 Figure 4.10. FORTRAN Sample Program (Part 1 of 8) • • • • • • • • • • • • • 235 Figure 4.11. Using RPG Pointers to DTF 243 Figure 4.12. Halt Indicator (HO) Analysis Aid ••••••••• .244 Figure 4.13. RPG Sample Program (Part 1 of 10) • • • • • • • • • • • • • • • 245 Figure 4.14. PL/I Program Structure • • 255 Figure 4.15. PL/I Storage Areas • • • 256 Figure 4.16. Entry Point Table • • 257 Figure 4.17. Object Time Core Usage .258 Figure 4.18. Library Work Space • • • • 259 Figure 4.19. Communications Area switches • • • • • • • • • • • • • • • 260 Figure 4.20. Dummy DSA and DSA Layout 260 Figure 4.21. Block Description .261 Figure 4.22. DSA Chaining • • • • • • • 262 Figure 4.23. PL/I Consecutive File DTF-A Appendage • • • • • • • • • • • • 263 Figure 4.24. PL/I Regional File DTF-A .263 Figure 4.25. PL/I Sample Program (Part 1 of 18) • • • • • • • • • • .265 188 DOS system Programmer's Guide This section presents debugging aids considered helpful to both the application and system programmer. Information contained in this section includes: • System action on all cancel conditions • Register conventions for following program flow • When a storage print is useful • The types of documentation used in locating program problems • The action taken when a hard wait or unending loop is encountered • The importance of low-core messages and system error messages as an aid in determining a starting point for approaching a programming problem. Sample programs in COBOL, PL/I, FORTRAN, and RPG, together with their respective linkage editor maps to show how to locate programs and partition save areas in main storage are included. Gathering Documentation This is an explanation of the types of documentation useful in debugging problem programs. All SYSLOG and SYSLST error messages, program listings, the supervisor listing, linkage editor map, and a core dump should be gathered. A system dump of main storage should be available, but if the system is in a hard wait or an unending loop, a stand-alone (self-loading) dump will have to be taken. The DOS stand-alone dump generator, DUMPGEN, produces a stand-alone dump program tailored to system requirements. The dump can either be a conventional dump program or a formatting dump program. A DSERV of the core image library directory may be helpful when program checks occur in the logical transient area. The directory can be displayed by an alphamerically sorted listing of the directory entries, or a listing of the entries in the order they appear in the directory. The label cylinder display program (LSERV) can also be used for error analysis. LSERV displays the TLBL and the DLBL and EXTENT information contained on the SYSRES label cylinder. Information about secured data files is not displayed. DOS I/O error logging, MCRR (Machine Check Recording and Recovery), RMS (Recovery Management Support), and the DUMP option of job control are additional facilities for error analysis. The RMS consists of two functions: MCAR (Machine Check Analysis and Recording), and CCH (Channel Check Handler). Other facilities for error analysis are EREP (Environmental Recording, Editing, and Printing Program), ESTVUT and ESTVFMT (Error Statistics by Tape Volume Utility programs). EREP edits and prints data that has been stored in the recorder file (SYSREC) by the I/O error logging and/or MCRR and/or MCAR/CCH functions. For the IBM system/370, EREP creates and maintains a history tape, and, if specified at system generation time, RDE (Reliability Data Extractor) of OBR/MCAR/CCH and, if specified by the ROD command, IPL/EOD (End of Day) data. Figures 4.1, 4.2, and 4.3 show the SDR communications region, the MCRR linkage table, and the RMS linkage area. Section 4: Debugging Aids 189 0 SDK Flags 2 1 (SDRTABLE) 32 10 11 3 4 Number of SDR Records Partition ID First SDR ID BBCCHHR Address of SDR Accumulator First OBR ID BBCCHHR Address of SDR Unit Switches Mask Bytes 71 List Save Area 103 104 95 96 Test Under Mask Table SDR 1 Work Area SDR2 Work Area 107 108 155 156 Area Modified by A - Transients 111 112 Test Under Mask Instructi on Temporary Work Area 135 136 118 31 Last 0 BR ID BBCCHHR Current OBR ID BBCCHHR Reserved 75 76 72 24 25 43 44 39 40 35 36 17 18 163 164 Branch Instruction 117 SDR Queue Save Area F'65536' 159 160 SDR Error Message Save Area 115 116 167 OBR/SDR Flag Byte Address 168 250 Data Area for OBR/SDR Records Key to SDR Communications Region Displacements: ~ SDR Flags: Bit 0: 1: 2: 3: Key of OBR RDE option Initial IPL time RF option = NO, recording is suppressed Bit 4: 5: 6: 7: RF option = CREA TE RF option = YES Error while recording Recorder fi Ie ready Set and tested by Job Control .. G Set by EREP transient SSBSDRUP to identify the partition making the call for EREP recording. Settings: X'10' X '20' X'30' X'Ol' X '00' if EREP is running in BG. if EREP is running in F2. if EREP is running in Fl. with one of the above if recorder file is ready. with one of the above if recorder fi Ie is not ready. Initial number of SDR records specified. If SDR record count is not specified, the file is formatted for OBR records only (SJOBCTLM, see IPL and Job Control PLM, GY24-5086). Disk address of first SDR record. Disk address of first OBR record. Disk address of current OBR record. Disk address of last OBR record. Figure 4.1. 190 SDR Communications Region (Part 1 of 2) DOS system Programmer's Guide Key to SDR Communications Region Displacements: ~ Address of SDR accumulator area which contains half - byte coutlTers and accumulated error conditions. ~ Address of SDR unit switches. SDR switch byte (1 for each PUB): X'80' - Update operations complete X'40' - Counters on external file overflowed X'20' - I/O error during write X'08' - SDR update half - byte counters routine required X'04' - Update SDR record routine required Other - Reserved When entry contains X '01000000', indicates MCRR, no SDR supported. G Reserved. G SDR1 register save area. ~ Mask formats for interpretive error accumulator, SDR1: X'FF' X'FE' X'FD' X'FC' Other - End of update Bypass counter Set up 'OR' condition to previous counter Ignore list item Test bit in error queue ~ Used by the interpretive error accumulator routine to process list passed by OBR/SDR A -transient. ~ Used by the interpretive error accumulator routine. 11041 Used by the interpretive error accumulator routine for address alignment. ~ Executed by the interpretive error accumulator routine. ~ Loop counter for the SDR counter update. §] Save area for pointers to entries in the SDR error queue. ~ Work area where half byte error counters are unpacked and updated. ~ list of devices passed to the SDR processor from $$AN ERAD . 11561 Used by SDR/OBR recorder phases to pass error message displacements and disk error addresses in event of 1160 I Entry point from OBR/SDR A - transients. 0'1 error. Branches to label SDRMM. 11641 Pointer into the OBR/SDR unit switches. Status posted by recorder phases. (See byte 36). ~ OBR and SDR records formatted by the recorder phases. Figure 4.1. SDR Communications Region (Part 2 of 2) Section 4: Debugging Aids 191 MCRRPSW1 (See Note) o (Hexadecimal o (Decimal Displacement) Displacement) 8 10 8 MCRR: PSW I Reentrant Address of I MCRR Routine I I XXXXXXXX 14 20 16 MCRR I PSW I I Address of I MCRR Routine I XXXXXXXX Address of Channel Failure Routine Address of Machine Check Routine XXXX XXXX Key to displacement: Machine Check Recording and Recovery PSW. Loaded to enable machine check interrupts. Second word (displacement 4-7) contains reentrant address (MCRETURN) to MCRR routine. Machine Check Recording and Recovery PSW. Loaded to enable machine check interrupts. Second word (displacement 12-15) contains initial address (MCRRRTN) of the MCRR routine. Address of channel failure routine (MACHEKl). Address of machine check routine (MACHEK). Note: MCRRPSW1 is the label of the first byte of the MCRR Linkage Table. Figure 4.2. 192 Machine Check Recording and Recovery (MCRR) Linkage Table DOS System Programmer's Guide RASLINK o (Decimal Displacement) 8 9 10 11 12 16 CPUID RASDMC RASFLAGS MCFLAGS RASMODEL RASTABA RASBASE CPU ID field Damaged Channel byte RAS flag byte Machine Check flags CPU Model RAS Table (RASTAB) address Base add ress for RAS Monitor XXXXXXXX X X X X XXXX XXXX Key to RAS Linkage Area displacements: CPU ID field. Address of damaged channel, or X 'FF' if no channel damaged. RAS Flag byte: bit flag description o 6 7 X'80' X'40' X'20' X'lO' X'08' X'04' X'02' X'Ol' RAS active RAS SIO flag RTA in control RAS I/O delayed Channel check on error SIO Reserved Channel check ~n SIO I/O active for SIO bit flag description X'04' X'02' X'Ol' Reserved Hard machine check All machine records built All channel check records built 1 2 3 4 5 ~ Machine Check Flags: 0- 4 5 6 7 G o G I Figure Largest CPU Model. Address of RAS Table (RASTAB). Address used for base register iii RAS Monitor Program. 4.3. RMS Linkage Area (RASLINK) Section 4: Debugging Aids 193 Further documentation can be obtained by executing the PDAID program, which records (traces) certain events and either writes ·chem on the I/O device specified or maintains them in the CE area (or alternate address area). The program can trace: 1. fetching or loading of programs or phases (Fetch/Load Trace). 2. input/output activity (I/O Trace). 3. supervisor calls (GSVC Trace). 4. QTAM input/output activity (QTAM Trace). The On-Line Test Executive Program (OLTEP), together with the On-Line Tests (OLTS), make up the On-Line Test System, which tests I/O devices with minimum interference to other programs running on the system. RETAIN/370 is an OLTEP function that allows the OLTEP programs to be executed on the system/370 from a remote location. RETAIN/370 is yet another problem determination tool. See the DOS OLTEP listed in the Preface for a detailed description. The facilities mentioned form the DOS problem determination aids. Problem determination is a process or a procedure for<· determining the cause of an error. The DOS Messages listed in the Preface recommends a specific procedure to follow when an error condition occurs; the DOS system Control and service gives a detailed explanation of problem determination aids. Error messages are very important and can supply useful information in determining where to start looking for the 194 DOS System Programmer's Guide trouble (i.e., in what partition the failure tock place). A message number or code is supplied to give further information about the error. The program check message gives the location of the failing operation code and the condition code from the program status word (PSW). This gives you a starting point for reconstructing the cause of the error. The program listing is an extremely useful tool in determining if the error condition was caused by a logic error or a particular condition that you had not considered when the program was written. The supervisor (SUPVR) listing allows you to check facts at the time of failure and to determine if the error indications were valid. The listing and the main storage dump allow you to locate the Program Interrupt Key (PIK) to determine the task in control of the system at the time of failure. By locating the Program Information Block (PIB) table, you can easily locate programs in main storage. See Figures 4.4, 4.5, and 4.6 for a description of the PIB table. Using the information in the PIB table, you can check the cancel code and find the partition save area address. The partition save area supplies. you with such useful information as the PSW and register values that you can use to locate the last instruction executed. The system communications region (Figure 1.7) within the supervisor contains the address of the PIB table, and other useful information for determining the nature of the error. PIB TABLE Byte Number 2 All Bound PIB SP 3 5 4 6 = 16 7 Byte Length Problem Program PIB (Note 1) Cancel Code Cancel Code Attention PIB x NOP SYSLOG ID Instruct(BG, F2, or Fl) ion (CR) SYSLOG ID (AR) Branch Code (BC) Partition Save Area Active=Address of Save Area Inactive = Remainder of BC Instruction Scratch Byte X'OQ' Cancel Code Quiesce PIB Cancel Code Supervisor PIB Subtask PIB for AP Note 3) Cancel Code Switch Byte See F SP General Exit Routine NOP SYSLOG ID Instruc(BG, F2, or Fl) tion Address of the Save Area Logical Transient Bucket (contains save area address) Address of the Logical Transient nnel PU X'OO' Address of SYSRES PUB X'04' X'08' Length of Error Queue Entry Number Core Blocks (Note 2) X'OC' X'lO' X'14' X'18' Constants to Clear Bytes 2 -5 of CCB X'IF' X'05' X'OO' X'OO' PIB Assign Flag See D User LUB Index of LUBs Flag Byte See C Note 1: Three problem program PIBs are built in this sequence when the MPS or BJF feature is selected as a generation option: Background PI B Foreground 2 PIB I Foreground 1 PIB When a batch-only environment is established at generation time, the All Baund and Foreground PIBs are excluded from the table, and only one (BG) problem program PIB is built. However, the X'20' bytes that F2 and Fl PIBs normally occupy (between PISSG and PIBAR) are filled with 32 bytes of DIBs data. Note 2: Number is in multiples of 2K for F2 and Fl. BG is always 10K (X' OA'). Note 3: Total of nine subtask PISs are generated, and only when AP is specified at generation time. * See Figure 4.5 for flag byte expansions A, B, C, D, E and F. Bytes 90 and 91 (X'5A'- '5B') of the communications region contain the address of the first part of the PIB Table. Label PIBTAB identifies the first byte of the table. E'igure 4.4. First Part of Program Information Block (PIB) Table Section 4: Debugging Aids 195 [ ; ] Supervisor, Quiesce, and ALL Bound PIB Flags: Bit 0: 1-4 5 6 7 1= 0= 1= 1= 0= 1= 0= o Always one Always zero Always one Active Inactive Active Inactive Note: IfPTO=YES is specified, Bit 6 is a one in the Quiesce I/o PIB when attached by the supervisor. Otherwise it is always zero. Problem Program PIB Flag (First Byte in PIB): o PIB Assign Flag X '80' = SYSRES DASD fi Ie protect inhibited (allow write operation on SYSRES) X'40' = Channel appendage exit allowed (BTAM) X'20' = Cancel in progress (used in terminator function) X' 10' = Cancel control (set on a foreground cancel) X '08' = Hold-Release flag for foreground assignments X '07' = Supervisor or Attention routine PIB assign flag setting X'04' = Background program PIB assign flag setting X' 02' = Foreground 1 program PI B assign flag setti ng X 'a I' = Foreground 2 program PIB assign flag setting Attention PIB Flag Bit 0: Bit 0: 1 = Registers stored o = Registers not stored 0 = Always zero 1-3 4 1 == QTAM Wait active 0== QTAM Wait inactive 5 0 = Normal execution 1 == Program has 'seized the system 6 1 == Unbound 0= SVC 2-bound CB-transient in progress) 7 1 = Unbound 0= SVC 7-bound (waiting for an I/O interrupt) X'80' indicates the program is not present in the system X'87' indicates the program is PTO bound X'89' indicates the program is IDRA bound Problem Program PIB Flag (Last Byte in PIB): Bit 0: 1: 2: 3-4: 5: 6: 7: 1 == Batched Job in Foreground a == No BJF Cancel in LTA and Device not Assigned 1 == /& on SYSIN if DASD ' a = No /& on SYSIN Reserved 1 = Task is cancelled a == Task not cancelling 1 = Subtask (s) attached a = No subtasks attached 1 = In AB Routine a -= Not in AB Routine Figure 4.5. 196 PIB Flag Expansions DOS System Programmer's Guide 1-5 6 7 o 1 == Registers stored a = Registers not stored a = Always 1= a= 1= a= zero Attention routine active Attention routine SVC 2-bound Active SVC 7-bound X'80' indicates the attention routine is not present in the system. X'89' indicates the program is IDRA bound Attention PIB Switch Byte Bit 0-2: Reserved 3: 1 == PTAFTCH (Fetch $$ANERRY, Z, or 0) Switch ON 0= PTAFTCH (Fetch $$ANERRY, Z, or 0) Switch OFF 4: 1 = Detach Logical Attention Routine ($$BA TTNA) Switch ON 0= Detach Logical Attention Routine ($$BATTNA) Switch OFF 5: 1 == Physical Attention Recall Switch ON a = Physical Attention Recall Switch OFF 6: 1 = Attention Request Switch ON a = Attention Request Switch OFF 7: 1 = External Interrupt Request Switch ON a = External Interrupt Request Switch OFF Byte Number = 16 Byte Length All Bound PIB Background PIB FG2 PIB System LUB Index (Note 1) FG1 PIB Address of Termination ECB, if any, or F'O' System LUB Index (Note 1) Attention PIB o o Quiesce PIB I/o Supervisor PIB ECB Address for Subtask PIB (Note 3) Note 1. Generated only if MPS is specified. Note 2 •. Always background communications region except when MPS = BJF. Note 3. Total of nine subtasks generated, and only when AP is specified. 1 Note 4. Will be filled in with halfword indicating the relative priority of task in the system (range H'41 to H'15 , the lower the number the higher the priority). Bytes 124 and 125 (X'7C-'7D') of the communications region contain the address of the second part of the PIB table. Label PIB2AD identifies the first byte of the table. The second part of PIB table comes before the first part in storage allocation. Figure 4.6. Second Part of Program Information Block (PIB) Table Section 4: Debugging Aids 197 are detached and EOJ is taken after the dump is complete. SYSTEM ACTION UNDER CANCEL The following lists all cancel codes and their message prefixes. Some do not appear in a foreground PIB, such as the X'FF' code (supervisor catalog failure). This type of function can be performed only in the background partition. The linkage editor and system maintenance functions must also be performed in the background area. Byte one of the PIB'table contains a cancel code stored by the system any time a cancel condition is encountered. The PIB table can be located by displaying on the console the communication region address (located at X'16'~X'17') plus the displacement of aX' SA' and X'5B'. This is the address of the first part of the PIB table. Remember each entry is 16 decimal (X'10') bytes in length. Each byte of the PIB is numbered starting with 0 and continuing through 15. The layout of the PLB table and the communications region can be found in Figures 4.4-4.6 and Figure 1.7. Cancel Code (Hexadecimal): Message Code: 10 Cancel Code (Hexadecimal): Message Code: Description, Action or Condition: This is normal end of job (EOJ). Cancel code X'10' is posted in byte 1 of the PIB for the program issuing the SVC 14. The next time the' canceled program is selected on general exit, an SVC 2 is taken to call in a B-transient program, which, in turn, ca~s job control to perform the end-of-job step. Description, Action or Condition: This is caused by the operator responding to an I/O error message with the cancel option on the 1052. Cancel Code (Hexadecimal): Message Code: Message Code: 17 OS021 Description, Action or Condition: This is caused by the main task in a partition issuing the CANCEL macro without detaching all subtasks running under its control._ OP731 Message Code: Message Code: 18 None Description, Action or Condition: This is caused by the main task issuing the DUMP macro with subtasks attached. It allows the dump to take place without the error cancel message being printed. All subtasks 198 DOS System Programmer's Guide 1B OP821 Description, Action or Condition: caused by a channel failure. Cancel Code (Hexadecimal): This is 1C 05141 Description, Action or Condition: This is caused by a subtask issuing the CANCEL ALL macro. This causes all other subtasks to be detached and canceled. The main task is canceled, and a dump of the supervisor and partition involved results. Cancel Code (Hexadecimal): Cancel Code (Hexadecimal): 1A Description, Action or Condition: This is caused by an I/O error that cannot be handled by the program (task), thus causing the program to be canceled. If the DUMP option is specified at system generation time, a dump of the supervisor and the partition in which the program was running will be taken. Message Code: Cancel Code (Hexadecimal): OP741 Cancel Code (Hexadecimal): None 19 Message Code: 1D 05121 Description, Action or Condition: This is caused when the main task terminates before all subtasks have been detached. This indicates the subtasks were canceled before they came to a normal EOJ. The subtasks are detached, and the complete partition is canceled. Cancel Code (Hexadecimal): Message Code: 1E program or task, the program or partition is canceled. If issued by a subtask, the subtask only is canceled. OS13I Description. Action or Condition: This is caused by the combination of one task issuing an enqueue for a resource, and another task issuing a dequeue for that same resource. As a result, the previous owner cannot be identified because register o in the s~ve area has been modified'. Cancel Code (Hesadecimal): Message Code: Cancel Code (Hexadecimal): Message Code: OSOlI 1F Description. Action or Condition: This is a result of an operator entering CANCEL from the 1052. OP81I Description. Action or Condition: caused bya CPU failure. This is Cancel Code (Hexadecimal): Cancel Code (Hexadecimal): Message Code: 20 OS03I or OS11I Description. Action or Condition: This is caused by a program check interrupt. The program is canceled by the system. The user may supply a PC or AB routine to handle this condition via the STXIT macro. This code is also used when a routine in the transient area is canceled due to a program check in the task or subtask using it. Cancel Code (Hexadecimal): Message Code: 21 Message Code: Cancel Code (Hexadecimal): 22 OS05I or OS06I Description. Action or Condition: This is caused by the issuing of a FETCH (SVC 1) or a LOAD (SVC 4) macro whose phase name cannot be found. This cancel code is also used when a logical transient is canceled. OP77I Description, Action or Condition: This is a result of attempting to load a problem program phase at an address outside main storage or outside the requester's area (background or foreground). This condition also occurs: 1. if the program requires more main storage than is allocated to the partition where the program is to run or 2. if an improper address is detected on an SVC interrupt (i.e., CCW address in CCB is invalid). Cancel Code (Hexadecimal): Message Code: Cancel Code (Hexadecimal): 23 OS02I Description, Action or Condition: This is caused by a program, task or subtask issuing a CANCEL m~cro. If issued by a 26 OP71I Description. Action or Condition: This is a result of a program issuing an I/O request for a logical unit that is not assigned to a device. If a dump is taken, general register 1 contains the address of the CCB. If the CCB is unavailable, the logical unit message contains SYSxxx. Cancel Code (Hexadecimal): Message Code: Message Code: 25 OS04I or OS09I Description. Action or Condition: This can be caused by many user errors. See Figure 4.7 for a list of the causes. Message Code: 24 27 OP70I Description, Action or Condition: This is a result of a program issuing an I/O request for a logical unit for which there is no logical unit block (LOB) entry (invalid LOB code in CCB). If a dump is taken, general register 1 contains the address of the CCB. section 4: Debugging Aids 199 The complete text for message OS041 is: ILLEGAL SVC - HEX LOCATION nnnnnn - SVC CODE nn 10. When nn is 29: A DEQ is issued by a task that did not ENQ the resource. (This is valid in an AB routine.) 11. When nn is 2A: A subtask (without an ECB = parameter) has issued an ENQ macro, or where nn is in hexadecimal notation. A subtask has issued an ENQ macro to a resource that has not been dequeued by another task that has been terminated, or This message results from the following causes: 1. When nn is 02: The phase name given does not start with $$B, or For LlOCS, macros called in invalid sequence. As a result, an SVC 8 is issued after an SVC 2 before an SVC 9 has been issued to free the transient area, or For other conditions, the user specified a temporary exit (SVC 8) for a logical transient. In the temporary exit routine, another routine is called (by an SVC 2) before an SVC 9 is issued to free the transi ent area. 2. 3. 12. When nn is 2D: Emulator execution was attempted, but the EU parameter of the SUPVR macro was omitted or incorrectly specified during system generation. 13. When nn is 32: For LlOCS: a. An imperative macro (such as WRITE or PUT) was issued to a module that does not contain the requested function, or MVCOM macro was issued by a foreground program, operating under single program initiation. b. A PUT was issued for an ISAM retrieve module without a preceding GET, or When nn is OA, 12, 13, or 18: The interval timer was not allocated to this partition, or c. An inva Iid ASA fi rst character for the printer was used, or The supervisor was generated without the timer option. d. A wrong length record indication occurred while processing 1287 documents when RECFORM= UNDEF, or e. The 1287 program erroneously contained a CCW{s) with the SLI flag bit ·OFF', or When nn is 05: The ·to· range specified in the MVCOM macro is invalid, or 4. When nn is OB: The call was not given by a logical transient routine. 5. When nn is 16,17, or 1A: The caller did not have a PSW key of zero. This is applicable only in a multiprogramming system. 6. A task has issued two ENQ macros to the same resource without an intervening DEQ. When nn is 23: More than 16 holds have been issued for the same track. 7. When nn i.s 24: Free a non - DASD or a track that is not held. 8. When nn is 26: A subtask issued attach, or the save area is not on a doubleword boundary. 9. When nn is 27: A main task issued detach without SA VE = parameter, or For COBOL, a wrong length record was detected in the object program. 14. When nn is any other value: The supervisor function requested by the operand of the SVC is not defined for the supervisor being used. A main task issued detach, but the ID of the subtask in the save area passed is not valid, or If a main task attempts to detach an already terminating subtask. I Figure 200 4.7. Causes for Message OS04I (Cancel Code X'2i') DOS System Programmer's Guide Cancel Code (Hexadecimal): Message Code: 28 None Description, . Action or Condition: cancel in progress) Cancel Code (Hexadec~al): Message Code: Description, Action or Condition: This occurred when an IBM-supplied component failed to post a valid cancel code. (QTAM 30 OP72I Description, Action or Condition: This is a result of a program ignoring the reading of the /& statement on SYSRDR or SYSIPT. Cancel Code (Hexadecimal): Message Code: 31 OP75I Description, Action or Condition: This is a result of the number of pending I/O errors exceeding supervisor capacity. Cancel Code (Hexadec~al): Message Code: 32 Cancel Code (Hexadecimal): 33 OP79I Description, Action or Condition: This occurs when a DASD command chain in a file-protected environment does not start with a command code of X'07'. This code indicates a long seek and must be the first command in the chain. Cancel Code (Hexadecimal): Message Code: 34 OP84I Description, Action or Condition: This is caused by an unrecoverable I/O error during a FETCH of a non-$ phase, thus resulting in the job being canceled. Cancel Code (Hexadecimal): Message Code: The linkage editor map can be a great help in locating programs and subroutines that are included in the programs at object time. Common areas, load address, relocation factors, low-core and high-core addresses are also shown. In addition, the PHASE card is displayed to show where the phase was' loaded (i.e., directly following the supervisor or at some other location). This map is also helpful when working with multiphase programs. OP76I Description, Action or Condition: This is caused by DASD file-protect limits being exceeded or by an incorrect record reference for system files on disk. It will also be posted for unrecoverable I/O errors on tape. Message Code: All of these cancel codes cancel the program, task, or subtask when they occur. If multitasking is being used and a main task is canceled, all of the subtasks attached are detached and canceled as a result of the main task being canceled, with the exception of cancel code X'23'. If a dump option was specified at system generation time, the contents of the supervisor and the partition in which the cancel condition occurred is written on SYSLST. OP78I FF The system dump of main storage used with these items allows the programmer to relate all the information he has gathered to the contents of main storage at the time the error occurred. By using the dump and the listing, the programmer can see how his program appeared in main storage at the time of the error. By using the values found in the PIK and PIB table in the dump, he 'can see partition save areas, registers, and instructions to determine what actually caused the error. There are times when a system dump is not available to the programmer, such as hard waits and unending loops. When one of these conditions occurs, the only way to get a dump of main storage is to use a stand-alone dump. Remember that the address of the communication region (COMRG) is lost when a stand-alone dump is taken. Therefore, bytes X'16'-X'17' should be displayed before taking a dump of main storage to ensure that the programmer has the correct communication region address to use when he is analyzing the dump. If bytes X'16'-X'17' are not displayed, the communications region start address can still be found by scanning the dump for the date in the form MM/DD/YY or DD/MM/YY (this indicates the start of COMRG). Although the register values in a stand-alone dump (register print area of the dump) may not be valid, the partition save area values most likely will be valid. Section 4: Debugging Aids 201 Wait States The system is said to be in a wait state when the ·wait· light is continuously lit and the ·system· light is off. wait states are divided into hard waits and soft waits. If the system is in a hard wait, the wait bit in the current PSW (bit 14) is set to one and the system mask is set to zeros, thus disabling all interrupts. Because no interrupts are allowed, a PSW swap cannot occur and the system mUst be re-IPLed to continue processing. A soft wait occurs when the DOS supervisor finds no in-core programs ready to run and loads a PSW with the wait bit set to one and the system mask set to all ones. The first interrupt returns control to the supervisor and processing may continue. A wait can easily be determined as hard or soft by causing an interrupt. If the system responds with some action, the wait is softi if not, the wait is hard. The most convenient way for the operator to cause an interrupt is to press the 1052, 3210, or 3215 request key. If the wait is soft, the attention routine responds with the ·READY FOR COMMUNICATIONS· message. attention of the customer engineer as a possible hardware failure.) If this technique does not end the wait, take a stand-alone dump to find what the system was waiting for. HARD WAITS The DOS supervisor loads a hard-wait PSW when a failure occurs that puts th~ integrity of the control program or system data in doubt. The supervisor attempts to place a message in low core bytes 0-4. Figure 4.8 shows the explanation for each error. If a hard wait occurs, it is imperative that this message be retrieved and recorded. Effective diagnosis is extremely difficult if this step is neglected. If byte one of main storage contains an S (X'E2'), the following information can be obtained easily: Check byte X'13' for, a X'OP'. This indicates either a channel control check or an interface control check. Bytes X'3A'-X'3B'contain the device address. If byte X'13' does n9t contain a X'OP', a machine check must ha~e occurred. SOFT WAITS Byte one may have a W. If a W (X'E6') is found, a hard stop on SYSRES is indicated. If the system is in a continuous soft wait, it is waiting for an interrupt to signal the completion of an event. Although the expected interrupt may be from the timer or external interrupt key, a missing device-end caused by hardware is the most frequent cause. The operator can make each device not-ready, then ready, to generate a device-end interrupt from each address. The system light flashes briefly as the supervisor examines and discards interrupts for which it was not waiting. The interrupt from the device waited for causes normal processing to continue. (The occurrence should be brought to the If the CPU d~tects an error in its own circuitry, or (in theSystem/360, model 50 or smaller) in the channel or interface control circuits, it forces a machine check interrupt. The system places anS in byte 1 and enters a hard,wait. The S is a request to run the SEREP (system Environmental Recording, Editing, and Printing) dump to format and display the contents of the CPU's hardware registers and log-out area for use by the customer engineer. (A SEREP dump configured for the system should be available to th~ operator. A copy can be obtained from the customer engineer responsible for the CPU.) 202 DOS System Programmer's Guide Byte 0 Byte 1 Byte 2 Byte 3 Explanation SYSTEM/360 SEREP Codes: X'OO' X'E2' Not used Not used Machine check. Load SEREP. Re -IPL system. X'Ol' X'E2' Reserved Reserved Channel failure: interface or channel control check. Load SEREP. Re -IPL system. SYSTEM/370 SEREP Codes: X'Cl' X'E2' A, I, S* Not used Unrecoverable machine check. X'C2' X'E2' Not used Not used Unrecoverable channel failure during RMS f",tch. X'C3' X'E2' A, I, S* Not used Channel failure on SYSLOG when RMS message scheduled. X'C4' X'E2' A, I, S* Not used Reserved (should not occur) X'C5' X'E2' A, I, S* Not used Channel failure: ERPI Bs exhausted. X'C6' X'E2' A, I, S* Not used Channel failure; two channels damaged or a damaged channel situation occurred while RMS was executing an I/o operation. X'C7' X'E2' A, I, S* Not used Channel failure; system reset was presented by a channel. X'C8' X'E2' A, I, S* Not used Channel failure; system codes in ECSW are invalid. X'C9' X'E2' A, I, S* Not used Channel failure; channel address invalid. SYSTEM/360 and SYSTEM/370 WAIT Codes: X'03' X'E6' Channel Unit DOS unrecoverable disk error during program fetch. The first six sense bytes are placed in hex bytes 5-A. Re-IPL system. X'04' X'E6' Not used Not used Cancel condition has occurred while performing a Supervisor fundtion (not a Supervisor detected problem -program error). Normally a Program Check while in Supervisor State. This condition also occurs if a fetch has been issued for and IBM - suppl ied transient which is not in the system core image library. IBM-supplied $$A, $$B, and $$R transients cannot be placed in a private core image library. Take a stand -alone dump; the name of the transient involved is in the first 8 bytes of the appropriate transient area. Place the transient in the system core image library. Re -I PL system. X'05' X'E6' Channel Unit I/o Error Queue has overflowed as the result of an I/O error on a program fetch channel program. Re -IPL system. X,06' Not used Not used Not used Reserved (shou Id not occ ur) • X'07' X'E6' Channel Unit IPL I/O error. Channel can unit indicate whether SYSRES or communication device. Re -IPL system. Channel Unit Error recovery messages. Refer to OP messages in DOS Messages, found in Preface. X'08' to X'60' * Note: A (X'Cl ') = SYSREC error recording unsuccessful. I (X 'C9') = SYSREC error recording incomplete. S (X'E2') = SYSREC error recording successful. Figure 4.8. Low Core Error Bytes Section 4: Debugging Aids 203 If a program check interrupt occurs while the DOS supervisor is in control of the system, the integrity of the control program itself is in doubt. system response is to put a message of 04W (X'04E6') in bytes 0 and 1 and enter a hard wait. Note that many programs may run in the supervisor state and hence cause this type of hard wait. These programs include BTMOD (in its channel appendage routine), SPOOLing programs such as POWER (which alters the address of the SVC new PSW to point to the POWER partition), most $$A and some $$B transients. After the 04W message has been noted. a stand-alone dump should be taken. The first diagnostic steps, as with any program check. are to locate the failing instruction and determine the program in error. Use the supervisor assembly listing to determine if the program check address (location X'2D'-X'2F') falls within the supervisor nucleus (address less than label NUCEND), within the logical transient area (label LTA to LTA+X'4BO'). the physical transient area (label PTA to PTA+X'22S'), or outside the supervisor (address greater than label PPBEG). In the first case. use the supervisor listing to find what routine was being executed and what function the supervisor was attempting to perform. Use the I/O old PSW to find the device involved in the last I/O interrupt received and the SVC old PSW for the last SVC executed. In the second and third cases, the name of the transient involved appears at the beginning of the transient area involved. Use the DOS system Generation listed in the Preface to find the function of that transient. When the program check address is outside the supervisor, find the partition it falls in and use the program documentation to locate the failure. If W is not present in location 1, record the communications region address contained in locations X'16'-X'17' and take a stand-alone dump. Check the PIK(located at displacement X'2E' in the communications region) to determine the task in control. Then, locate and examine the PIB table entry for the task in control. The All Bound PIB is usually active, indicating an I/O interrupt or event has not occurred. The program or task save areas indicate the device(s) or resource(s) being waited on. The PIB supplies information such as the cancel code and the address of the partition save area. The save area contains the PSW. The instruction address portion of the PSW 204 DOS System Programmer's Guide should be pointing to the last executed instruction. The register values can also be helpful at this point. Register 14 is used as a standard return from an IOCS module. Register 15 contains the address of the IOCS module. . Register 1 points to an ECB, RCB. CCB. or last phase or transient fetched or loaded. Note: Certain unusual hardware and software failures can cause the system to halt processing with both the system light and the wait light on continuously. This indicates the current PSW has its wait bit set on.but'the CPU is operating (processing microprogram instructions). If possible. the system should be left in this state until a customer engineer has arrived. A stand-alone dump can show the I/O operations in progress. No low-core message will be found. and a re-IPL is necessary to continue processing_ . By gathering all of the proper documentation and using some of the aids given in this section. most errors should be resolved without too much difficulty. Debugging Assembler Programs The proper documentation and careful interpretation of system messages is needed to ensure that the programmer understands the diagnostics provided by the system. Internal pointers found in the system communications region and PIB table allow the programmer to analyze main storage dumps. to locate programs and save areas. and to determine the cause of the error. The linkage editor map shows where programs should be located in main storage. where overlays are loaded. and whether the program is relocatable or assembled for operation in only one partition. Remember that all relocatable programs are assembled with a load address of zero in the Disk Operating system. See Figures 1.7 and 4.4-4.6 for the format of the system communications region and the PIB table and Figure 1.2 for the format of the partition save areas. Debugging COBOL Programs Debugging information for the COBOL programmer includes an example of a program named TESTRUN, consisting of a source statement listing. Data Division map. Procedure Division map. diagnostic messages, linkage editor map, and an abnormal termination dump. The IBM Disk Operating system FUll American National standard COBOL Compiler is used for the compilation job step. Figure 4.9 contains the program output in its entirety. The Data Division map provides the internal name generated by the compiler for data names and file names defined in the program. This internal name is the same as that used in the object code listing. An address is provided for each name, in the form of a base and a displacement. The Procedure Division map is a listing of the object code. Compiler-generated card numbers identify the COBOL statement in the source deck containing the verb that corresponds to the object code. The object code listing also contains the relative address of the object code instruction. In addition to the object code, a Task Global Table (TGT), a Program Global Table (PGT), a literal pool and register assignments are provided when a Procedure Division map is requested. The TGT is used to record and save information needed during the execution of the object program. The PGT contains literals and the addresses of procedure names and generated procedure names referenced by Procedure Division instructions. The linkage editor map contains the load address of the program and lists the names and locations of COBOL subroutines in main storage. HOW TO USE A DUMP When a job is abnormally terminated due to a serious error in the problem program, a message is written on SYSLST that indicates the: 1. type of interrupt; for example, a program check 2. hexadecimal address of the instruction that caused the interrupt 3. condition code 4. reason for the interrupt: for example, a data exception. The instruction address can be compared to the Procedure Division map, where a relative address is provided for each statement. The load address of the module (which can be obtained from the map of main storage generated by the Linkage Editor) must be subtracted from the instruction address to obtain the relative instruction address as shown in the Procedure Division map. If the interrupt occurred within the COBOL program, the programmer can use the error address and the Procedure Division map to locate the specific statement in the program that caused the dump to the taken. Examination of the statement and the fields associated with it may produce information as to the specific nature of the error. Figure 4.9 illustrates a dump a data exception. Invalid data, data that does not correspond to is placed in the numeric field B result of redefinition. caused by that is, its usage, as a • The program interrupt occurred at hexadecimal location 0039Bc. This is indicated in theSYSLST message printed just before the dump. • The linkage editor map indicates that the program was loaded into address 0032A0. This is determined by examining the load point of the control section TESTRUN. TESTRUN is the name assigned to the program module by the source coding: PROGRAM-ID. TESTRUN. • The specific instructin which caused the dump is located by subtracting the load address from the interrupt address (that is, subtracting 32A0 from 39BC). The result, 71C, is the relative interrupt address and can be found in the object code listing. In this case, the instruction in question is AP (add decimal). ' • The left-hand column of the object code listing gives the compiler-generated .~.~ card number associated with the instruction. It is card 69. As seen in the source listing, card 6' contains the COMPUTE statement. LOCATING A DTF One or more DTF's are generated by the compiler for each file opened in the COBOL program. All information about that file is found within the DTF or in the fields preceding the DTF. A particular DTF may be located in a system dump as follows: 1. Determine the order of the DTF address cells in the TGT from the DTF numbers shown for each file name in the Data Division map. 'Note: Since the order is the same as the FD's (File Description) in the Data Division, the order can be determined from the source program if the Data Division map is not requested. section 4: Debugging Aids 205 2. Find the relative starting address of the block of DTF cells from the TGT. 3. Calculate the absolute starting address of the block by adding the hexadecimal relocation factor for the beginning of the object module as given in the linkage editor map. 4. Allowing one fullword per DTF cell, count off the cells from the starting address found in Step 3, using the order determined in step 1 to locate the desired DTF cell. LOCATING DATA If more than one DTF is generated for a file, the above procedure should be followed using the PGT and the SUBDTF cells rather than the TGT and the DTFADDR cells. The order in which multiple DTF's appear in main storage is dependent on the OPEN option as follows: The location assigned to a given data name may similarly be found by using the BL (Base Locator) number and displacement given for that entry in the Data Division map, and then locating the appro~riate fullword BL cell in the TGT. The sum of the displacement and the contents of the cell give the relative address of the desired area. This can then be converted to an absolute address as described for locating a DTF. 5. (a) INPUT (b) OUTPUT (c) I-O or INPUT REVERSED 206 DOS System Programmer's Guide There can be two or three SUBDTF's for each file"with multiple OPEN options. The Data Division map sould be used to determine the file and the number of the SUBDTF CELL assigned to it. ...."IJ ~ (1) // JOB DT~CHK // OPTION NODECK,LINK,LIST,LISTX,SYM,ERRS // EXEC FCOBOL 11.49.30 ~ • \D n o g en ~ I-' ~ ~ ] 11 ~ ..... ~ 01 11 rt ~ oH\ N ..... en ~ ....rt g ~ '=' ~ g .... ~ ~ ~ ....g, )I CI1 N o ..... 1 CBL QUOTE, SEQ 00001 000010 00002 000020 00003 000030 00004 000040 00005 000050 00006 000060 00007 000070 00008 000080 00009 000090 00010 000100 00011 000110 00012 000120 00013 000130 00014 000140 00015 000150 00016 000160 00017 000170 00018 000180 00019 000190 00020 000200 00021 000210 00022 000220 00023 000230 00024 000240 00025 000250 00026 000255 00027 000260 00028 000270 00029 000280 00030 000290 00031 000300 00032 000310 00033 000320 00034 000330 00035 000340 00036 000350 00037 000360 00038 000370 00039 000380 00040 000390 00041 000400 00042 000410 00043 000420 00044 000430 00045 000440 00046 000450 00047 000460 00048 000470 00049 000480 00050 000490 00051 000500 00052 000510 00053 000520 00054 000530 00055 000534 00056 000535 IBM DOS AMERIC~N N~TIONAL STAND~D COBOL IDENTIFIC~TION DIVISION. PROGRAM-ID. TESTRUN. AUTHOR. PROGR~MMER N~ME. INSTALL~TION. NE~ YORK PROGRAMMING CENTER. DATE-~RITTEN. FEBRU~RY 4, 1971 D~rE-COMPILED. 07/23/71 REM~RKS. THIS PROGRAM HAS BEEN WRITTEN ~S A SAMPLE PROGRAM FOR COBOL USERS. IT CREATES AN OUTPUT FILE ~ND READS IT BACK AS INPUT. ENVIRONMENT DIVISION. CONFIGURATION SECTION. SOURCE-COMPUTER. IBM-360-H50 • OBJECT-COMPUTER. IBM-360-H50. INPUT-OUTPUT SECTION. FILE-CONTROL. SELECT FILE-1 ASSIGN TO SYS008-UT-2400-S. SELECT FILE-2 ASSIGN TO SYS008-UT-2400-S. D~T~ DIVISION. FILE SECTION. FD FILE-1 LABEL RECORDS ~RE OMITTED BLOCK CONTAINS 5 RECORDS RECORDING MODE IS F RECORD CONTAINS 20 CHARACTERS D~TA RECORD IS RECORD-1. 01 RECORD-1. 05 FIELD-~ PIC X(20). FD FILE-2 LABEL RECORDS ARE OMITTED BLOCK CONTAINS 5 RECORDS RECORD CONT~INS 20 CH~R~CTERS RECORDING MODE IS F DATA RECORD IS RECORD-2. 01 RECORD- 2. 05 FIELD-~ PIC X(20). ~ORKING-STORAGE SECTION • 01 FILLER. 02 COUNT PIC S99 COMP SYNC. 02 ALPH~BET PIC X(26) V~LUE IS "ABCDEFGHIJKLMNOPQRSTUVWXYZ". 02 ALPHA REDEFINES ALPHABET PIC X OCCURS 26 TIMES. 02 NUMBR PIC S99 COMP SYNC. 02 DEPENDENTS PIC X(26) VALUE "01234012340123401234012340". 02 DEPEND REDEFINES DEPENDENTS PIC X OCCURS 26 TIMES. 01 ~ORK-RECORD. 05 NAME-FIELD PIC X. 05 FILLER PIC X. 05 RECORD-NO PIC 9999 • 05 FILLER PIC X VALUE IS SPACE. 05 LOC~TION PIC AA~ V~LUE IS "NYC". 05 FILLER PIC X VALUE IS SPACE. 05 NO-OF-DEPENDENTS PIC XX • 05 FILLER PIC X(7) VALUE IS SPACES. 01 RECORD~. 02 A PICTURE S9(4) VALUE 1234. CBF CL3-3 07/23/71 to.) cgo 8en en '< en rt (D a ..,. ~ IQ ~ (D .. 4:: \Q n ~ 0 txI 0 1:"1 IQ en 11 0 11 i . en (D 11 ~..., (D ~ Cil ~ 11 0 IQ 11 01 a ..,. (D SlI ~ SlI ~ to.) 0 HI to.) ....a I I 2 00057 00058 00059 00060 00061 00062 00063 00064 00065 00066 00067 00068 00069 00070 00071 00072 00073 00074 00075 00076 00077 00078 00079 00080 00081 00082 00083 00084 000536 000540 000550 000560 000570 000580 000590 000600 000610 000620 000630 000640 000645 000650 000660 000670 000680 000690 000700 000710 000720 000730 000740 000750 000760 000770 000780 000790 02 B REDEFINES A PICTURE S9(7) COMPUTATIONAL-3. PROCEDURE DIVISION • BEGIN. READY TR~CE. NOTE rHAT THE FOLLOWING OPENS THE OUTPUT FILE TO BE CREATED AND INITIALIZES COUNTERS. STEP-l. OPEN OUTPUT FILE-l. MOVE ZERO TO COUNT, NUMBR. NOTE THAT THE FOLLOWING CREATES INTERNALLY THE RECORDS TO BE CONTAINED IN THE FILE, WRITES THEM ON rAPE, AND DISPLAYS THEM ON THE CONSOLE. STEP-2. ADD 1 TO COUNT, NUMBR. MOVE ALPHA (COUNT) TO NAME-FIELD. COMPUTE B = B + 1. MOVE DEPEND (COUNT) TO NO-OF-DEPENDENTS. MOVE NUMBR TO RECORD-NO • STEP-3. DISPLAY WORK-RECORD UPON CONSOLE. WRITE RECORD-l FROM WORK-RECORD. STEP-4. PERFORM STEP-2 THRU STEP-3 UNTIL COUNT IS EQUAL TO 26. NOTE THAT THE FOLLOWING CLOSES THE OUTPUT FILE AND REOPENS IT AS INPUT. STEP-5. CLOSE FILE-l. OPEN INPUT FILE-2. NOTE THAT THE FOLLOWING READS BACK THE FILE AND SINGLES OUT EMPLOYEES WITH NO DEPENDENTS. STEP-6. READ FILE-2 RECORD INTO WORK-RECORD AT END GO TO STEP-8. STEP-7. IF NO-OF-DEPENDENTS IS EQUAL TO ·0· MOVE "Z" TO NO-OF-DEPENDENTS. EXHIBIT NAMED WORK-RECORD. GO TO STEP-6. STEP-8. CLOSE FILE-2. STOP RUN. "':I ~. I.Q I I 3 ~ Ii CD .. .c:: \0 n 0 bj 0 t-t CIl $lI ~~ CD ~ Ii 0 I.Q Ii ~ ~ $lI ~ W 0 H\ tv .....J en CD n rt ~. g .c:: t::7 ~ ~ I.Q ~. :::J I.Q ~ ~. Q. en tv o \0 II INTRNL NAME LVL SOURCE NAME II DNM=1-148 DNM=1-178 DNM=1-199 DNM=1-216 DNM=1-246 DNM=1-267 DNM=1-287 DNM=1-306 DNM=1-321 DNM=1-339 DNM=1-357 DNM=1-372 DNM=1-392 DNM=1-408 DNM=1-432 DNM=1-452 DNM=1-471 DNM=1-490 DNM=2-000 DNM=2-018 DNM=2-037 DNM=2-063 DNM=2-082 DNM=2-102 DNM=2-113 FD 01 02 FD 01 02 01 02 02 02 02 02 02 01 02 02 02 02 02 02 02 02 01 02 02 FILE-l RECORD-l FIELD-A FILE-2 RECORD-2 FIELD-A FILLER COUNT ALPHABET ALPHA NUMBR DEPENDENTS DEPEND WORK-RECORD NAME-FIELD FILLER RECORD-NO FILLER LOCATION FILLER NO-OF-DEPENDENTS FILLER RECORDA A B BASE DTF=Ol BL=l BL=l DTF=02 BL=2 BL=2 BL=3 BL=3 BL=3 BL=3 BL=3 BL=3 BL=3 BL=3 BL=3 BL=3 BL=3 BL=3 .BL=3 BL=3 BL=3 BL=3 BL=3 BL=3 BL=3 DISPL 000 000 000 000 000 000 002 002 01C OlE OlE 038 038 039 03A 03E 03F 042 043 045 050 050 050 INTRNL NAME DNM=1-148 DNM=1-178 DNM=1-199 DNM=1-216 DNM=1-246 DNM=1-267 DNM=1-287 DNM=1-306 DNM=1-321 DNM=1-339 DNM=1-357 DNM=1-372 DNM=1-392 DNM=1.-408 DNM=1-432 DNM=1-452 DNM=1-471 DNM=1-490 DNM=2-000 DNM=2-018 DNM=2-037 DNM=2-063 DNM=2-082 DNM=2-102 DNM=2-113 DEFINITION DS OCL20 DS 20C DS OS OS DS OS OS OS OS DS OS DS OS DS DS DS DS OS OS OS OS OS OCL20 20C OCL56 lH 26C lC lH 26C lC OCL20 lC lC 4C lC 3C lC 2C 7C OCL4 4C 4P ·USAGE DTFMT GROUP DISP DTFMT GROUP DISP GROUP COMP DISP DISP COMP DISP DISP GROUP DISP DISP DISP-NM DISP DISP DISP DISP DISP GROUP DISP-NM COMP-3 R 0 Q M F F R 0 R 0 R .... N 0 8 CI'l CI'l '< en rt CD a ...."'iI I.Q s:: ,f:: fi .§ . en t1 en ~ ~ CD ..g t1 0 en I.Q ~ a ....s:: CD 003E8 TGT SAllE AREA SWITCH TALLY SORT SAVE ENTRY-SAVE SORT CORE SIZE NSTD-REELS SORT RET WORKING CELLS SORT FILE SIZE SORT MODE SIZE PGT-VN TBL TGT-VN TBL SORTAB AODRESS LENGTH OF IlN TBL LNGTH OF SORTAB PGM ID A(INIT1) UPS I SWITCHES OVERFLOW CELLS BL CELLS DTFADR CELLS TEMP STORAGE TEMP STORAGE-2 TEMP STORAGE-3 TEMP STORAGE-4 BLL CELLS VLC CELLS SBL CELLS INDEX CELLS SUBADR CELLS ONCTL CELLS PFMCTL CELLS PFMSAV CELLS VN CELLS SAllE AREA =2 XSASW CELLS XSA·CELLS PARAM CELLS RPTSAV ARE-A CHECKPT CTR IOPTR CELLS n t1 ;CD MEMORY MAP \D 0 t"'I ~ 4 .. ..g t1 0 I.Q I. I t1 CD t1 ~ ~ t1 rt' ,f:: 0 HI N -..J 003E8 00430 00434 00438 0043C 00440 00444 00446 00448 00578 0057C 00580 00584 00588 0058C 0058E 00590 00598 0059C 005A4 005A4 005BO 005B8 005CO OOSCO 005CO OOSCO 005C4 005C4 005C4 005C4 005CC 005CC 005CC 00500 00504 00504 00504 005D4 00508 00508 00508 LITERAL POOL (HEXI 00618 \ LIT+O) 00630 (LIT+24) 00000001 5BSBC2C6 1COOO01A C3D4E4D3 DISPLAY LITERALS (BCD) 00640 (LTL+40) , WORK-RECORD' SB5BC2D6 FOE90000 D7CSDS40 cooooooo 5BSBC2C3 D3D6E2C5 ....tlIj 5 I.Q s:: ~ .c:: PGT I \Q OVERFLOW CELLS VIRTUAL CELLS PROCEDURE NAME CELLS GENERATED NAME CELLS SUBDTF ADDRESS CELLS VNI CELLS LITERALS DISPLAY LITERALS I (') ~ en ~..., REG 6 REG 7 REG 8 j a 60 ~ 60 63 U1 63 ~ o ..... N ~ CD 0 ....rt II 63 67 0 ::s .c:: II t:; CD tr s:: I.Q I.Q .... ::s I.Q .... )II Q, fA ...... N 005EO 005EO 005EC 00600 00610 00610 00618 00640 REGISTER ASSIGNMENT CD en 005EO I I 67 BL =3 BL =1 BL =2 00064C 00064C 000650 000652 000655 00065C 000660 000664 000666 000669 000610 000614 000678 00061A 00061C 000680 000684 000688 00068A 00068E 000692 000694 000698 00069c 0006AO 0006A4 0006AA 0006BO 0006BO 0006B4 0006B6 0006B9 0006cO 0006C4 0006C8 0006CC 0006D2 START 58 FO C 004 05 1F 000140 04F6F0404040 96 40 D 048 58 FO C 004 05 1F 000140 04F6F3404040 41 10 C 040 58 00 D 1C8 18 40 05 FO 50 00 F 008 45 00 F OOC 00000000 OA 02 41 00 D 1C8 58 FO C 008 05 EF 58 10 D 1C8 96 10 1 020 50 20 D 1BC 58 10 D 1BC D2 01 6 000 C 038 D2 01 6 01C C 038 SVC PN=Ol 58 FO C 004 05 1F 000140 04F6F7404040 48 30 C 03A 4A 30 6 000 4E 30 D 1DO D7 05 D 1DO D 1DO 94 OF D 1D6 EQU L BALR DC DC 01 L BALR DC DC LA L LR BALR ST BAL DC LA L BALR L 01 ST L MVC MVC EQU L BALR DC DC LH AH CVD XC NI * 15,004(0,12) 1,15 x' 000140' X'04F6F0404040' 048 (13), x' 40' 15,004 (0,12) 1,15 X'OOO140' X'04F6F3404040' 1,040(0,12) O,lC8(O,13) 4,0 15,0 0,008(0,15) 0,00C(0,15) X'OOOOOOOO' 2 0,lC8(0,13) 15,008(0,12) 14,15 l,lC8(O,13) 020(1),X'10' 2,lBC(Q,13) 7, 1BC(0, 13) 000(2,61,038(12) 01C(2,6),038(12) * 15,004 (0,12) 1,15 X'OOO140' X'04F6F7404040' 3, 03A(0, 12) 3,000(0,6) 3,lDO(0,13) 1DO(6,13I,lDO(13) 1D6(13), x' OF' v (ILBDDSPO) SWT+O V ~ ttl 0 t:-t I.Q CIl DI 11 0 11 i. 11 (J) In s: ~. Q., CD 6 ~ CIl '< en I I ~CD 67 S ..., "0 CD ttl 11 0 69 70 I.Q 11 DI S -is :+ '"0 ~ - 71 72 ~ ...a 72 72 74 0006D6 0006DA 0006DE 0006E2 0006E6 0006EA 0006FO 0006F4 0006F8 0006FC 000700 000704 000708 00070A 00070E 000712 00b716 00071C 000722 000726 00072A 00072E 000730 000734 000738 00073C 000742 000746 00074A 00074E 000754 000758 00075C 00075E 000761 000768 00076C 00076E 000770 000771 000774 000778 00077A 00077C 000782 000786 000788 00078C 000790 000794 000798 00079C 00079E 00079E 0007A2 0007A.4 0007A7 4F 30 D lDO 40 30 6 000 48 30 C 03A 4A 30 6 01C 4E 30 D lDO D7 05 D lDO D 94 OF D lD6 4F 30 D lDO 40 30 6 01C 41 40 6 002 48 20 6 000 4C 20 C 03A lA 42 5B 40 C 038 50 40 D lDC 58 EO D lDC D2 00 6 038 E FA 30 6 050 C 41 40 6 OlE 48 20 6 000 4C 20 C 03A lA 42 5B 40 C 038 50 40 D lEO 58 EO D lEO D2 00 6 043 E 92 40 6 044 48 30 6 01C 4E 30 D lDO F3 31 6 03A D 96 FO 6 03D 58 FO C 004 05 IF 000140 04F7F2404040 58 FO C 004 05 IF 0002 00 000014 ODOO01C4 0038 FFFF D2 13 7 000 6 58 10 D lC8 18 41 58 FO 1 010 45 EO F OOC 50 20 D lBC 58 70 D lBC 58 10 D lE8 07 Fl lDO 000 03C 000 lD6 038 PN=02 58 FO C 004 05 IF 000140 04F7F4404040 CVB srH LH AH CVD XC N1 CVB 8TH LA LH MH AR S ST L MVC AP LA LH MH AR S ST L MVC MV1 LH CVD UNPK 01 L BALR DC DC L BALR DC DC DC DC DC DC MVC L LR L BAL ST L L BCR EQU L BALR DC DC 3,lDO(0,13) 3,000(0,6) 3,03ACO,12) 3,01C 2,13,050 (11) 14,054(0,13) 15,14 048 (13) , x, 20' 6,004(0,0) 1,00C(0,12) 7,038(0,12) 7,0 5,0 4,000(0,1> 4,11 4,000(0,1> 1,6,000(5) 8, 1BC(0, 13) 7, 1CF ' .... Q.a en ... N \Q JOB DTACHK ACTION LIST LIST LIST LIST LIST LIST LIST 07/23/71 TAKEN MAP' AUTOLINK IJFFBZZN AUTOLINK ILBDDSPO INCLUDE IJJCPDl AUTOLINK ILBDIMLO AUTOLINK ILBDMNSO AurOLINK ILBDSAEO ENTRY DISK LINKAGE EDITOR DIAGNOSTIC OF INPUT 0001 IV IV 0 ..,."III I..Q s:: 11 8en en ~ en rt (1) a ttl 11 0 ~ 11 I . (I) 11 en en ..,.s:: Q, (I) 01/23/71 PHASE XFR-AD LOCORE HICORE DSK-AD PHA.8E*** 0032AO 0032AO 004ADB 63 01 2 ESD TYPE LABEL LOADED REL-FR CSECT TESTRUN 0032AO 0032AO CSECT * ENTRY * ENTRY * ENTRY IJFFBZZN IJFFZZZN IJFFBZZZ IJFFZZZZ 003C50 003C50 003C50 003C50 003C50 CSECT ENTRY ILBDSAEO ILBDSAE1 0049FO 004A06 0049FO 0 0 CSECT I LBDMNS 0 0049E8 0049E8 CSECT * ENTRY * ENTRY * ENTRY ILBDDSPO ILBDDSP1 ILBDDSP2 ILBDDSP3 0041B8 004708 0047AO 004958 0041B8 (1) . .f= \Q n t» t"4 CI) ~ ~ (I) ttl 11 0 ~ 11 ; ttl SlI 11 rt ~ .f= 0 H\ IV ...J .., CSECT ILBDIMLO 004990 004990 CSECT ENTRY * ENTRY IJJCPD1 IJJCPD1N IJJCPD3 003FCO 003FCO 003FCO 003FCO co o o en en :>i z(!lU en iii en>< ..:t:iiI " C"'ll'- " V:>>D I Figure 4. 9. COBOL Sample Program (Part 15 of 27) Section 4: Debugging Aids 221 N I Figure 222 4.9. COBOL Sample Program (Part 16 of 27) DOS System Programmer's Guide ~ ..,. I'Ij ~CD .. 01:: 07/23/11 OTACBK \.Q 11.52.21 GR 0-1 GR 8-F FP REG COMREG 00003850 00003960 00000001 00000001 .000035B8 00003BE2 000032AO 000032AO 00000000 00000000 00000000 00000000 BG ADOR IS 000208 0000338A 50003C12 00003388 00003550 00003880 00003688 0000338A 000041B8 00000000 00000000 00000000 00000000 000000 000020 000040 000060 000080 OOOOAO OOOOCO OOOOEO 000100 000120 000140 000160 000180 0001AO 0001CO 0001EO 000200 000220 000240 000260 000280 0002AO 0002CO 0002EO 000300 000320 000340 000360 000380 0003AO 0003CO 0003EO 000400 000420 000440 000460 000480 0004AO 0004CO 0004EO 000500 000520 000540 000560 000580 0005AO 0005CO 0005EO 000600 000620 000640 000660 00000000 FF050001 00002F28 00040000 00000000 0146940F 06B006BO AOOC4110 010E9104 C0440118 4570B218 C0441BAA A0009140 4BA00262 90309890 41100030 00003000 C4E3C1C3 A8A07COO 00002044 01001F98 00001F2C 0000289C 48A00236 410CBOOO 48E001C8 02E04190 48661000 1B234140 00CA4230 960C1004 03CC4284 95600237 4121000F 92FF0409 20004810 B60E0501 00234180 02740200 4780B62E 02CC9507 02004144 91406004 02034000 48603000 50184180 95035018 9C000184 00454110 58600048 47700654 47700500 00000000 5B5BC2C5 F15A1COO 00000000 00050003 41900156 00504510 00C695C1 A0004BAO A0009680 BC104510 023141AA 68009058 90108200 01FOBF50 FF050001 32A03000 00004ADB 25102514 1F140020 00000294 00000000 00002A9C 58BOA004 B000410C BF5801FO 002341BO BCAC4860 1A234220 950B1001 41455000 5000BF14 04204111 00C61B33 1007AOOE 03B88930 BE5A4720 00014148 42205000 9560C09C 581002CC 9120100C 41800558 30029198 01694060 06FF91FO 02020049 01F94130 05E29550 41F0089A 41F0065C 91401038 PAGE 1 \Q n o I:J:' g en ~ ~ CD ~ o \.Q Ii ~ ~ Ii rt ~ ...,J o H\ N ...,J en CD ..,.~ g 01:: i' g \.Q \.Q ..,. ~ ..,.lJII ft N N W 00000000 40002E06 OCOOOOOO 00000336 00000000 B41B41AO 06B006BO 00EA9260 A0004180 94F9103B 01F842BO 0006BEEE A0014110 41AACOOO 01F08200 41FOB166 80001048 C8024040 00C62111 OOOOOOOC 20000000 00000000 00003228 4AA00262 07F99601 0201BF50 01B69500 07F6181F 03904130 04094820 07F91858 000001F9 47800366 4510BCAC 02000440 02544338 0022BB2c 04~9110 04B14000 47F004EC 60004170 00000503 41800560 700195FF 95003000 08409101 41000634 41100,5F2 060C91AF 4A60BOOC 45100B84 45700B84 00000000 FF150001 00001038 00040000 00000000 C0544510 06B041BB A00195E2 010E9203 01011058 00E148BO 000C43A1 BB640201 02010016 00389284 96030039 FOF161F2 0007AFFF 21182269 22E21E4E 00000000 00000000 100020CE 9180AOOO A00048BO E00094FO 00234180 1B664121 00151B23 02364322 41430002 95FF04B1 0502A005 05021009 A0004123 10004930 4780B8E4 30064180 50104000 5880BF8C 05660202 10014000 94BF6004 30024710 47800592 100C4110 9560C09C 4032COB4 00440789 50600040 9120800F 4B800262 00000000 E00039C2 00000000 0000141A 00000003 OB8418A8 001141BB A0024180 008F9281 10589283 02C847FO 000142AO 01F09008 A0009898 COA40201 82000038 F361F1F1 00004ADB 226AOOOO 1EF41F04 02080000 00000000 000010C8 47100306 02C841CB BF510213 03F49526 000F4570 41B00392 C0031A23 43540000 07891BOO 02814770 023941BO 000B0500 BE3847BO 0501BE4C B2384180 92FF4000 44000CB8 02C06001 41800566 91101002 03C64280 9F006000 0500940F 4180061C 96803006 0201003A 4032COB4 41100094 4818COOO 00000208 FF050000 0601F440 FF050184 01BB0994 00040000 OOOOOBBC 00040000 06B006BO 06B041BB 4180B2CE 41FOOOOA 01464180 01569640 A0024180 00C69561 0262481A C00049AO A0014400 04080188 BC700205 BEEEBEF5 C0444400 A0045890 68209060 68409068 01F04400 A0045890 9890BF58 820001FO 40002E06 00001000 00000000 00000000 00000010 0001FFFF 25183CFO F7F2F3F7 214C0010 5B5BC206 00000000 000025AC 00000000 00000000 923801C9 909001FO 9018B030 48B002C8 B00095FF AOOF0189 01F99090 01F09220 00BE4860 00221A66 BE5C1B22 43201001 04094320 100141FO 41F00454 412000C8 1A444A40 BE5495FF 95FF04B1 4180B238 00004910 BE3A41BO 43301001 95011006 47BOOOCA 04031002 00034A30 024891FO 04AE4930 BE144710 80001A44 4A40BE54 4260500C 92035018 41700566 020202CO 1B444340 30054C40 41100560 91051002 96401002 96141002 30060119 43203000 05E29550 30044180 500C4180 05000300 1009940F 07030300 OBC69106 00454110 30044110 06200202 950150184120065C 91203006 41100094 47100500 96F006FF 00000000 80002EOO OF0014BA 00000204 00134570 06B006BO A0019120 A0024180 021641AA 941FA001 OC05BEEE A0044220 68609010 A0049818 9680AOOO 00002000 00000000 F815EC01 F1F2FOF4 00130001 00000044 00000000 4190086C 41CBBOOO 90EOBF6C 01C94590 481002CA 4130001F 04584120 96801002 40004110 48600236 04201B66 4110039E COB04182 30044180 04AE950F 18584A50 91F03004 10095860 BE485A40 41100560 9601100C 4322C090 080C9504 C09C3004 0048500C OE9C913F 00491009 9560C09C 9560C09C 95003003 •••• •••••••••• B $$BEOJ4 •••••••• 7 ••••••••••••••• ••••••••••••••• M ••••••••• O•••••• • &. • •• • •• •• ••••••• - ••• S •••• ••••• 9 •• P ••••••• ••••• 8 ••• X••• B.0 • ••• ................. .F.A••••• F./ •••• •••••• K •••• 5 •••• ••• • ••••• K •• 0 •• •• ••• • •• K ••••••• .••••• .....o•••••••••• . -. . .. .. ••••• 0 •••••••• K. • O. & ••••••• 0 •••• - ••••• 0 •••••••••• •••••••• 01/23/11 OTACBK •• Gl •• F •••••••••• ••••••••• S ••• 4 •• •••••••••••• 8 •• J ••••••. 072311204 ••••• <•• $$BO •••• • •••••••••••••• B ••••••. r ••. 0 •••• ••••••••••• B •••• ••••• 9 ••••••• B•• ••• BK •• &•••••• K. ••••••••••••• 4 •• ••••• 6 •••••••••• ••• 0.9 ••• 0 ••• r •• . ...... - ....... . • .. -. * .••••••.•. ••••• R ••••• 0 •••• •• ••• R •••••••••• • •••• 9 •••••••••• • •••••• 9 •••••••• ..••••• &....0 ••••• ....B•••• ... & •••••••••••• - •• .- •••••• N••••••• • ••••••• N ••••••• ••• RK ••••••••• N. •• N •••••••• UN •• < • F •••••••••••••• •••••••• M••••••• ••••••••••• 0 •••• ••• • •• • •• • •••• & • .K •••• &• • • • •• & •• -& ••• & •• 0 •• • •••• 0 •••••••••• • - •••••• K•••••• - •••• - ••••• K ••• -. •••••• N•••••••• .... - .. - ..... K ••••••••••• F •• · - ............ -. - &. • •• • ••••••••• • • &•••••• - ••••• Gl ••••••• 2 •••• ~ •• •• •••• •• •••• K ••• • - ••• - •• &-. •• • • ••• •• < ••• . ...... - ...... . -. S. &•••••••• ••• 0 &••••• L ••••• K ••••••••• L ••• &. .9 ••• F •••••••••• .S. & •••••• K••••• .0 •••• & •••• • O. *-••••••••• - •• ••••••• O•••••• *.-.. ..,.I7J N N ~ \Q 8til CD ~ .. ~ ~rt \Q o CD a o ~ i ~.... to 11 \Q til CD 11 (1) a en (j) ~ ..,.s= a i Pol CD ~ t-A co o 111 N ...a ....-... OTACHK 000680 0006AO 0006CO 0006EO 000700 000720 000740 000760 000780 0007AO 0007CO 0007EO 000800 000820 000840 000860 000880 0008AO 0008CO 0008EO 000900 000920 000940 000960 000980 000911_0 0009CO 0009EO OOOAOO OOOA2Q 000A40 000A60 000A80 OOOAAO OOOACO OOOAEO OOOBOO 000B20 000B40 00-0B60 000B80 OOOBAO OOOBCO OOOBEO OOOCOO 000C20 000C40 000C60 000C80 OOOCAO OOOCCO OOOCEO 000000 000020 000040 000060 000D80 OOOOAO 47700500 BE3E0202 4870BOAE 4770009A 07704700 47800098 47F00728 00024A70 95025018 41770018 00080204 80024770 47F00604 30050203 9501500C 00480202 lB224320 0044B020 OC1495FF 910A0241 95000044 94713006 47100948 01529601 47F009A8 94BF1002 91103006 474009E8 4832COB4 30060117 07F195FF 47200AC6 02624878 92018006 70014270 58770000 45700B84 96803006 02000B50 070647FO 47FOOA1E OBAA910F OBB88200 47800C08 96101002 OCF49212 OCEC95FF COAE4060 OC839204 00450774 C09C4780 9130500C 50800048 002647FO 20009000 500C4770 100C4780 02CC9640 PAGE 07/23/71 96FOB47B 00491009 4070400A 02074000 08045876 45400758 41706008 024C9130 478001AO 41870018 BE427000 00985876 940FB47B BEOC1008 47800500 70091009 003A4322 47800A42 30024110 07769500 07890602 07F99477 92003003 800047FO 944B1002 47F00A24 478009E8 47F009CC 02000All 41100580 30024780 0300C09C ~0009140 06600500 60009501 05017000 9620800F 91041002 003A4832 OA004842 48800276 500C4780 OBB80729 440004F8 94BF1002 OC839104 30024780 BE5AD715 600A9690 91020C83 00029560 478000BC 02021009 00F0940E 20004760 006E9520 00A69101 60044190 45700B84 58600048 96F00703 60009508 00001B66 05008000 47F006F6 700247AO 4120079C 01F6D506 95025018 00180507 47F00506 5870BEOC 9101100C 47F0050A C0904832 05010044 OC149139 30040776 00410041 30069104 96801002 09A894FE 440004F8 92FF500C 4810BE5A 95003000 003A0510 lB554350 09E8D201 30049560 70384710 80058011 50184720 BEE04780 47FOOB10 4780093C COB695FF COB44832 91F0500C OB944180 02010044 588002CC 92040C83 30064780 OC529110 60006000 30064186 4780000E 30044780 47F00096 004947FO 00449506 00424580 60004770 600C4710 01529287 9180800C 4870BOAC 91406004 60084770 41870003 70004740 95FF7003 014C01F4 4188C044 8000800A 474007F8 80027000 95015018 95047000 47100500 419001B6 COB40500 B0224780 00454710 9610C08C 47700A42 30064780 9101100C 100C91FO 586002CC 43703002 49307008 41700AOO 41330008 30024145 10000046 C09C4170 OAC64560 47700ABA OB185870 OB100501 96203006 96043006 30000789 COB64570 47800B9A 006047FO BEE20202 95078000 91090045 OC5294FO 100C4710 02076000 000C4080 4180BO~8 B73E9562 96201002 OC329120 00444780 OE449102 00B295FF 00F09130 C09447FO 47100604 4010400A 4710060C 07445870 43605000 00980500 47800098 4B800262 9120800F 47200098 4340BE46 47700098 4720081C 50100048 45100B84 91060045 3001003B OA429102 OC084160 9603C084 91040044 09E80601 4710096A 30044770 96406004 D2003002 41700908 95FF3002 95013000 50001A44 02021000 OAC69101 077C4160 02008005 00404B70 7000C096 96401002 95003000 05609582 OB7A4133 4380500C OB940700 0041B009 47700C08 47800C42 Oc839120 OCEC4860 00404030 B04A4140 45700E54 30044180 47F00802 100C4780 OE549220 600A4710 02414780 00454780 09E80205 lB444340 50400048 940FB47B 60085074 89600001 80007001 41670002 4878COOO 47100094 02020049 41440001 47F00804 91203006 4110B038 0201B035 47700EA2 078747FO 00444780 08F89180 41900152 47700926 10040044 45700B84 09844370 91401002 40000200 9602700A 07899198 47200B66 4A40BE54 00410601 100C4710 80060500 80124160 BOOC0502 47700B18 96011004 47700AOO 30010187 00081934 4188C044 07000700 9560C09C 944B1002 92040C83 100C4110 BE5A4960 600895FF 004A9102 47F00026 B73E07F4 91011003 OCAC4181 600B4180 00A69502 00B29560 00A694FE 0005600C 05E24C40 95065018 47F00500 00109208 4A600254 47000804 lB774376 416007AA 41F007A4 10095860 4240BE46 4400010C 47100094 47800862 80024170 94F00039 OB3A4570 08CA9180 00440786 91100044 95500044 94733006 198A4700 BF900670 478009AO 400004Bl 4B70COAE 30064780 95FF3002 4A500214 10040044 OAc64570 80068010 80034370 70010239 9560C09C 91270044 07F90200 41330008 072995FF 07F79180 00E201E2 47700C08 91401002 58800040 OC429101 BE5847BO 30024770 00444710 0300C09C 91020C83 41800C32 00104570 B0485080 BE504770 C09C4770 100C4400 910600c7 BE404A40 477006CC 95076000 40104700 95FF6001 4540014C 00018970 48710060 41770018 00485816 0504BE42 41100098 0200B038 47F0085E B0285010 4170089A OA280501 30064110 96040044 47100910 47700AOO 9180100C 09624190 4270BF90 96101002 427004Bl 4970BE4C OA2407F9 01879198 58104000 95035018 OB844B80 47700ABA 60004170 47200B18 47700BOC 47700938 OB53003B 95013000 30020181 100C4110 02010000 9101100C 47800C04 12884770 10024710 OC084A60 OC829602 OCA49130 30049540 47100802 4B80BOOC OE5447FO 00489COO 006E9502 00A69101 04F85860 970100C7 ••••• 0 •••••••••• •• K •••••• - •••••• •• 0 ••• •••• K • • - ••• - ••• • • • • • • • N •••••• • 0 •••• - •• O. 6 •••• 2 ••• M• • • • S< • • & •••• & ••••• ••••••••• 0 •••• -. •••• -.& . . . . . . . . .-& •• - ••• - •••• -. ..N ••••••••••• < •• & ••••••••••••• ... ...... - ..... ••••••••• O•••••• ••••••••• 6N ••••• •• K ••••••• &• • • 8 •••• K •••••• - •••• • •• • • •• •• N ••• •••••••••• N ••••• • O. Me •••• O. o •• &. •• K ••••••••••••• • • &••••••••••••• ••••• 0 •••••••••• ••••• <••••••• <.4 •••••••••••• K ••• & •••••••••••• 0 •• • ••• K ••••••••• &. • .K •••••• 0 •••••• • ••••••••••••• N. •••••••• N••••••• ••••••• 0 •••••• N. ••• -. 8 •••••••••• •••••• 0 ••••••••• ••••••••• & •••••• ••••• 9 •••••••••• .YO ••••••••••••• ••••••• 0 ••••••• 0 • 0 ••••••••• 8. - •• ••••• 0 •••• &••••• K•••• K•••••••• • •••••• Y •••••••• • Y.O •••••••••• •••• K ••••.••••••• •• • • • • • • • • • 6 •••• •. 7 ••••••• YK ••••• •• • FL •••••• - •••• ••••••• ••••• F.- ••••• -N ••••••••• •••• - ••• & ••••••• •••• N ••••••••• N. • •• Q ••••••••••• < ••••••••••••••• 9 &••••••• &•••• K ••••• 0 ••••••• &. • F ••••••• F •••••• .01. - •• N••••••••• K •••••• - •••• - ••• • ••• N ••••••••• ••••••••• O•••••• ·............ . ••••••••• 9K ••••• K ••••••••••••••• .0. 0 •••••••••••• .0 ••••••• 0& ••••• • ••• &•••••••• -. 0 •••••••• K •••• SK. •• & •••••• 7 •••••• • •.••••••• S.SK ••• ••• R.- •••••••••• ••••••• 8 •••••••• .4 ••••••• ~ •••••• ••• - ••• - ••••• Q.•• - •• P. -. -. K. -. ••••• O•• L •••••• ••••• K. - •••••••• •• & •••••• 0 •••••• & ••• K •••••• 0 •••• ••••••• 4 ••••••• K ...... . ....... . •••• - ••••• & ••••• ••• O. O•••••••••• - • O. K•••••••••••• • •••••••••••••• 0 - .............. . &••••••• - ••••••• • •.•••••• - •••• 0 •• ••• - •••••••••• 0 ••••••••••••• 8. • YK ••• - •••• G ••• G ~ ~. s:: Ii CD ..-= '" () 0 tI' 0 t"" CIl ~ ~ CD ttl Ii 0 u::l Ii SlI S ttl SlI ~ ~ '"0 H\ "-> -...J m CD 0 rt' ~. 0 ts -= tj CD t:r s:: u::l u::l ~. ts u::l )t ~. g, en "-> "-> U1 07/23/71 OTACHK u::l II • I OOODCO OOOOEO OOOEOO 000E20 000E40 000E60 000E80 OOOEAO OOOECO OOOEEO OOOFOO 000F20 000F40 000F60 000F80 OOOFAO OOOFCO OOOFEO 001000 001020 001040 001060 001080 0010AO 0010cO 0010EO 001100 001120 001140 001160 001180 OOllAO OOllCO OOllEO 001200 001220 001240 001260 001280 0012AO OO12cO 0012EO 001300 001320 001340 001360 001380 0013AO 0013CO 0013EO 001400 001420 001440 001460 001480 0014AO 0014CO 0014EO 02010002 600C0774 00F04570 OE3496FO 946F3006 42200048 47700E9E 003AD201 BE749550 9118F006 4780B25C 4890BOFE 955B9000 OF764144 4580B08A 41EOE014 B1244770 88700008 BE24BE25 B02A4880 9286BOEO B07C4190 5840B120 OEOC95FF 4710BOC6 BE034780 000007F8 800011E4 01565860 6009B101 4770B194 4770B22A 41FF0008 45400EF4 477000BE A005C080 50800024 47100156 01569101 41900156 013307F9 BE644800 04084770 95600237 10020719 802C5800 00140600 A0009703 OEF01864 10021321 88700008 4170B3E8 023847BO 41110004 01F09228 B5FC4880 01F04590 01524700 30009204 91020C83 OE5C47FO OE1F4830 1B224320 4820003A 91390045 OOOOOBBA F0044780 077E95FF 94BFA001 D2079000 47800F6A 01004144 18E94180 15E84740 OF041840 12004780 9200BE25 B0944080 4580B08A C0004A90 9200BE50 04B14780 OA0748FO BOF84370 80000058 00000000 BF141266 07F74400 9604AOOF D200B1F5 50FOBFA4 9140A001 9680AOOO 4400B218 9502BE50 D501A004 00214710 4160BE6C 9601COA4 BOFE1B66 B3081B66 4770B33E 94FEAOOO 800C50EO 60391000 008F4200 47FOOEF4 9012BF14 5E700054 18310500 00C64570 47FOB44C 01C94590 02364188 02E094FO B4FE9856 000092E6 471000FO OEOA4580 BE740257 003A4322 9C002000 07779102 920F0073 OECE92C1 F0024770 9202BE50 10001B44 05029000 01004144 9168955C OF8A47FO 02024001 OFF41810 0201BOE6 BOE61821 5810BOEO B1004899 07F45080 BOA245EO COAC95FF BE244177 48FOCOAC 4570BC70 4750B152 04084780 47FOB194 02379500 1B664111 47100152 92000277 07F70500 47700152 B27E4780 00BE9203 940FOE1F 0201003A 45400EF4 45400EF4 5080BF54 47F00152 800C4570 07F991FO 002007F9 4570B424 58200050 50700054 02370273 BCA407F9 94FEAOOO 02E09530 C0444570 00199140 00500203 PAGE 00018200 96021003 OE1E47FO BE6CBE82 C09D4570 47400E7C 00440717 82000BB8 BE6BOA03 OEE007FE 92600237 05039000 BE304780 01004144 E00841FO OF800503 E0109200 1B871A08 B0961B99 4570BCA8 41101000 00000610 020445EO B10441FO F0024770 00014270 0704F002 1B004540 186947FO B1AA4111 5B5BC2C4 00934780 00005510 95000277 92FFBFAO 02370277 9180AOOO 01565880 00939501 07FF9200 30004580 18B09200 50009030 9180F002 02030024 BC7047FO 00214770 91FOO021 18105870 50300050 88300008 078747FO 58610000 47FOB238 02374720 B55647FO 001B4780 0050BEE4 OBB89541 02070040 08B29104 4400B2C8 OA2807F8 90002000 91080044 0501BE4C 9284C094 48600236 4260B101 02784780 OF669510 01004144 01564780 B120B124 BE5007FF 47FOOFF8 4390E013 4880BOE6 4A10BOE6 49190008 OE089190 BE0092FO B00645EO 02700201 BE1C0704 OEF05860 B15A5860 00005510 E4040740 OEF44570 023847BO 47700156 97030080 478000BE 47800152 00240680 BE6B4720 013358AO OE4447FO 009347FB 47F00156 07199284 BFC44570 B2149204 00BE1200 477000BE A0045000 5520BEE4 88200008 00BE91FO 95001000 5810A004 00BC9500 0.OBC47FO B40A9601 8A500008 30044770 60004580 600A4780 4870BE5A 18284320 47200E70 47170004 BE5A4720 47F00156 4570BC70 41201007 OF6E0501 B1014700 05015040 OFAE0507 477000CO 5880E014 18081817 0201B094 06201A28 12994720 4740B07C F0064710 04930AOO B1045880 027FB056 BE1~F002 902C1266 BF184170 023847BO 95000093 BC7048FO 00C60502 92100277 41700156 94FOAOOO 5080BF54 06805890 B20E9284 01F44580 093892F1 00084860 58800024 A0009200 BC7058EO B38247FO 47AOB39E 4570BC70 70304121 4700B40C 5E300054 00214770 4770B468 50601030 02374780 00BC47FO C0849601 1B655E60 000E94F3 OE1E47FO 00F04180 4B70COAE 02360922 47100032 47FOOE68 OE0092C4 48FOCOAC 9287AOOO 4570BCAC 00309000 OF625840 BE240207 9000E008 47FOOFCE 88800008 0202BE25 E01A4880 4570BCA8 B01A9500 50190024 BOA29180 92200493 02049203 0204BE23 4400B10C 4780B13E 01525000 00C60507 47800EF4 C09290F1 10000030 47FOB210 0702C08D 58800024 47F00152 A0045080 COA4078F 00EA41AO BE6B4570 02364570 4B80BOOE 009347FO BFA45880 B37E9206 03000021 1B444400 00034570 92FOB4E3 1F325030 00BE4111 91806002 07F94700 00BC4140 00BC9218 C08C9180 BEE85060 600C9501 08024400 09E847FO 4070BE5A 50800048 91060045 18264020 BE6B48FO 8000BE39 95000093 5040B120 47800F72 BE3447FO BOEOBOFO 47800FBC 0503B120 5870E010 E0170200 B0964690 5010BOEO B1014780 5890A004 F0064710 9180BE02 00939120 027C4160 07FEOOOO 18064170 600C0300 1000B18C 95000277 BFC0180F 477000BE 44000408 A0050702 06800680 9140A001 900C47FO 9209BE6A COA49280 BC704110 BC704400 50800024 01569180 C08C9001 B3825860 02379706 04084770 BCA4947F 13721B22 005407F9 00005510 4710B470 06049090 BEF44570 01C99090 001B4780 00549200 K•••••••••• W•••• - •••••••••• 0 •••• .0 ••• *.0 ••••••• 0 ••• 0 •••••• K••••• 3 ••••••••••• 3- ••• K•• - •••••• O.K •• •••• - •••• O••• y.O ... ··............... · ............... ............ ·............... • •• H •••••••• ••• 8 •••••••• &••• .iil •• K••••••••••••• ••• SO •••••• A., •• •• 0 ••••• 0 ••••••• .~.* ......... -.. ••••••••• 0 •••• N•• < ••••••• D., .0 • •••• O••• O•••••• · - .............. • - •••••••••• & •• •••••• N••••••••• ••• 0 •••••• & •• K•••• 0 •••••• N••••••••• • •••••••• 0 •• N••• ·.......... ·• ............... •••• Z••••• * ••• 0 •••• K••••••• N••• • $ •••••• N••••••• ••••• y •••• O•• N. ••••• M. K• ••••••••• 4 •••••• ••• •••• • K•• W•••• ................ • iil •••••••••••••• ••• ••• • 4& ••••• ••• ••• •• • • • ••• • 0 ••• F ••• O•••• O••• • •••• 8 •••••••••• • •• 8 ••••• 0 •• P. O. • • • •• • iil& ••••••• • Q •• 0 ••••••• 0 ••• ••• 0 •••••••••••• • O•••••••••••••• •• K••••• K•••• iil.•• P ••• 0 ••••••••• • O. - •••••••••••• ••• - •••••• &. -. L • ••••••••• FN ••••• OMP ••••••• 4 ..... .4 ••••• 0 ••• 1 •••• • •••• FN ••••••••• ••••••••• 0 •••••• •••••••• P ••••• P • ..... ..... •• w•••••• ··............... • •• u ••••••••••• ••• - ••••• &••••• 0 - •••• 7 •••••••••• ••••••••• O•• $$BD •• •• K•• 5 •••••••• • ••• &0 •••••••••• .4. ·.. ........................ ••••••••• 7N ••••• &••••••••••••••• •••• N••••••••••• .0.8 •••• K••••• K• •••• K••••••••••• • •• w•••••••• &••• • •• w•••••••••••• ·•••• ............... &•••• O••• .. •••••••••• &•••• 0 ··............... . ... .......... ••••• 4 •••••••••• • •• 9 •••• K••••••• .• ..... . ........ ........ .4• 4&•••• ••• O•••••••••• &••• ··........ ., • •••••••••• R •• - • • • 0 ••• 1. , •••••• - • - •••••• &••••• 0. ••••••••• O•• K••• •••••• &•••••••• 0 •• 0.- •••• 9.0 •••• ••••••••••• 9. 0 •• .0 ••• 0.4 •••••••• ••••••••••• && •• & • ••••••• &••••••• ••• y •• N•••••••• O ••••• F ••••• 9./ •• ••••• 0.< ••••• 0 •• • 0 ••• I •••••••••• • •••••••••••••• 0 • O. •• • • • • •• • ••• •• • •••••• &K •• &. U • •••••••••• 0 •••• • O•••••••••••••• ••• M••• O••• O••• • ••••••• L••••••• ·• ............... • &••••••••••••• ••• U••••• O.T •••• •••••••••• &•••• 9 ••• 0 •••••••••••• ......... . ..... ·.......... - •••• &- ••• 9 ••• M•• .4 •• ••• 0 ••• 0 ••••• 1 •• ·• ............... &••••• -. Y&- •••• tv tv .... ITJ 0\ ~ 8CI:I CD CI:I "< en rt CD lEI ~ ~ .'" n I'd 11 g g ~ CI:I o i ~.... en I'd 11 11 CD 11 ....~ p" CD CD o ~ 11 ~ ~ ~ tv o o I-h tv ...... 001500 001520, 001540 001560 001580 0015AO 0015CO 0015EO 001600 001620 001640 001660 001680 0016AO 0016CO 0016EO 001700 01}172 0 001740 001760 001780 0017AO 0017CO 0017EO 001800 001820 001840 001860 001880 001'8AO 0018CO 0018EO 001900 001920 001940 001960 001980 0019AO 0019CO 0019EO 001ADO 001A20 001A40 001A60 001A80 001AAO 001ACO 001AEO 001BOO 001B20 001B40 001B60 001B80 001BAO 001BCO 001BEO 001COO 001C20 Dl'ACHK 07/23/71 B4E3940F B0014830 4140BF14 4570B556 4780B54C 96805002 02764787 00089528 4570BC70 5893C048 47FOB5C6 4570B426 9010602C 10355034 12554740 B5C64121 18538850 00011A45 BF949503 BF904780 BF945870 BF845970 41880001 4280BF90 70085080 400092FF 70075886 000095FF 92007001 45700B84 700847FO 04E80202 95096000 4780B70E 05016006 BF910725 30034177 00014270 58550000 02036012 B7C69101 600C4710 07779102 60000717 60050717 07F49102 91041003 4710B822 45700E54 47F00032 OE12950A 30030724 BOOC5070 B0909208 BE1B47BO B8CA9513 500C4780 B8A29210 B8A69200 B0854180 00320203 6012BE11 47F003F4 92000022 BB249507 40004770 4780B958 0200BB29 910F700B 471000BE 41700000 42750004 70044000 0200700A 4C70BB2A 5A700298 B2389224 BB200203 BB2F4780-B9EE4140 43203005 4C20BE48 47FOOOBE 0500700A 07F99140 BB2F4710 70009180 700B9200 4780BA9C 43407000 B9630200 B9632004 43430000 4A400262 BB2C4770 BAB49200 40007004 47850004 47FOBAF6 00000000 00474570 BCA41810 000407F9 9680AOOO 5840C08C 47F~BB94 58320000 12334780 02024000 20010703 20040200 2004A001 60004860 02368860 BF14BF14 47F00152 02724183 C0449510 47F00152 9607C084 96018000 0707BF14 01C94780 B5809502 02076000 90080223 1B444570 B5F44570 000047FO 01524570 00474570 BCA49001 98564000 07F79056 B23847FO 04829056 BF7C4740 B6525870 020F7008 10004180 40000207 70006000 B6B34770,B6B29200 5870BF84 4B70BF88 BF801009 5860BF8C 95016000 077591CO 58760000 41770000 30039220 B05C9102 50024170 B82C9108 B7F09140 600C0717 9180600C 07149102 60004710 B7F64550 96081003 47FOOOFO 47FOOE12 4550B8B6 47FOOE12 95013003 B0904550 B8B29101 BE1B47BO B8CA5870 B0859506 50184770 B0684320 600047FO 07F59620 10030600 0300BB2E 30049560 048C5844 00001B55 50044870 BB284550 4340700B 41440001 4C70BB2A 5A700298 023747FO 048C95FF 0200B963 700047FO BB241002 4540B80C BB3047FO B9FC0202 5A200200 95FF2004 02374770 00BE910F BA7C4340 B9630200 700A9200 700B4710 02007000 B9630200 92FF2004 47FOBA62 95804000 4780BAB4 500A9601 40004190 94BFBB2F 95FF7000 OOOOOOOC FF230000 18204570 BCA44840 9101AOOF 4710BC28 9563A001 4780010C 010C5852 00040207 20002000 0703402C 9200A001 9601AOOF 00014A60 02700707 94FEAOOF 48200236 PAGE 800147BO 9601C084 BF1447FO BE504770 6008902C BC700203 B4264140 400007F9 BF944550 BF944550 BF781887 70004080 43860007 B6B30211 02017015 5080BF8C 60040775 4A760006 600A4710 60050717 9108600C 600C4710 B8B20501 9180600C 95FF3003 072447FO BE104780 BE184177 B8A64570 00FE9240 10036000 BB2E07F4 43503005 BAF647FO 4240700B 0200B963 B9634780 B9769680 02031002 BB251009 478000BE 700B4780 B963BB29 BAB095FF B9632004 4130BEF7 91014000 015247FO 07850200 00000000 02368840 9550A001 584A0004 50004008 402C0200 48600236 60006000 88200001 01529856 96FOB001 01521255 B5800500 021B602C 900C6004 00014570 4A400022 B6E69856 B6E69856 4A80BF88 70129200 06804280 70188000 80029240 18764A70 9115io02 59700238 B76AD202 9110600C 4710B80C S8369160 BE186012 0714950A 0784910F OE124400 B87A9562 00015070 OB849240 B05C4180 47FOOOFO 4770048C 4C50BE48 B98E0500 47F0048C 70005010 B9B60200 700B94FE BB249223 5840BB24 43720004 BA424360 5860BB24 70004780 42420004 41330001 4710BAB4 BAB44C70 BB297000 00001831 00015A40 4780010C 48200236 02235008 402FA001 88600001 05010272 5A2002AO BF141266 47F00152 07079601 B1010273 90105050 0223902C B5F41330 4840425B BF9447FO BF9447FO 5080BF84 70119601 B6B34188 41807015 70179680 BOOC5970 07759120 072547F5 BE191009 07179108 4170B822 60004770 4770B7F6 30030724 30034780 00F05870 30044780 BE184570 B0859180 B0584570 4140B8F4 0202BB25 5A500200 700A0237 95FFB963 700092FF 7000B963 A00092FF BB204770 58440000 9640BB2F 700B0660 02006000 BAB007F9 47FOBA62 95003000 58504004 BB2A5A70 5070BB24 12004780 02A05004 44000408 88200001 402C021B 943F402F 4A60026C 02364770 0200A001 4740B53C 95808000 80004930 47870004 900Cl135 6008021B 4780B5C6 48300236 04829856 04E85850 4380BF90 70144180 00044280 40807002 10024110 02380725 100C0775 00084370 5850BE18 60004710 9124600C B8CE9101 9680600A 4180B050 B7FC47FO 00404B70 B8669509 OA2891FO 800C4780 OE5447FO 92FF0022 10095840 95FF5004 4770B9B2 4780B9B6 70000205 4870B962 002247FO 00BE9180 1B771B22 4550BAF6 4260700B 70004240 95FF7000 02007000 07891B44 0501500A 02980505 4870BB28 BB4E4121 00005034 4770BB88 5A2002AO 502C4010 02034030 07076000 BC240707 20049640 • T •••••••• ,•••••• ••••••• 0 •••••• ••• <•• , ••••• P ••• • •••••••• I •••••• •• •• •• •• K. - ••• K. • O.F ••••••••• 4 •• •• - ••• ' •••• 0 •••• • •• • F •••••••••• ••• , •••••••• 7 •• • •••••••••• O•••• • •••••••• iii. • ••• • ••••••• K ••••••• •• , • • • • • K ••• -. 4 • •••• O••• O•••••• ••• 0 ••••• P •••••• • ••••• N ••••••••• - ••• K. - ••• " •••• •• K ••• -.K ••• -.K. ••• • •••• 4 ••••• F ~. 9 • • • • • $ •••• • •• ,.W ••••• 0 •••• ••• ,.W••••• O.Y., ........ ,...... . •• K •••••••••••• ,.............. . K.. •••• • ••••••• ·.- ....... - .... . • .'. O. YK •••••• - •• N. - ••••••••••••• .••..•••.• ... * •. •••• K. -. , ••••••• .F •• - •••• O. - •••• 4 •• - •••• 6.' ••••••••••••• 0.0 .... ..... ..... ••••• 0 ••• 0 ••• ' •• .. ,........ ,... . ,........... ,.. . •••• •••• • 0 •••••• • •••••••••• 5 •••• - ••••• K •••••• , •• .. - ........ ... -. - ..... . .. - •........... , •• N ••• - •••• 6 •• -. • •••••••••••••• 0 ••• 0 ••••• O. •• • • •••••• , •••••••• 0 •••••••••••• - •• 0 .* ••..•.••• 0 •• K.- •••• 5 •••• 0. • O. 4 •••• L •••••• - •• - •• 0.0 • • 4 •••• • ••• K ••• , •••••• , •••••• •• <••••••• •• ••• 4 •••• K •••••• ·,.. <, ... ,.... ,. .6.0 •• N••••••••• • ••• 0 •••••••••• K ••••• , ••••••• K • • K •••••• 0 •••• • ••••• K ••••••••• ·..... K...... .. • •••••••••••••• 0 K ••••••••••••••• •••• <••••••••••• .. . ... . .. . .. '.6 <••••••• K•••••• O •• ••••• • •• 0 •• K. • 0 •• N ••••••••••• .9 •••••• IiI • • • K. ••••• - •• K.- •••• •• K ••••• K. •• K •••••••••• 0 •• ••• 7 •••••••••••• • •••••••••• 9 •••• ••••••••• O•• K••• ·....... ,. .. ... •••••••• , • O. 6 •••••••••••• ··..,............. ... .. ,... ,.. ••• 9 •••••••••••• • ••• O•••••••••• •••••••••••••• K. K. • •• P ••••• P. •• K ••••••••••••• - •• - ••• - ••• - •• P. ••••• 0 •••••••••• • N. ,. ••• O•• <••••••• N. •• K••••• ' ••••••• ,. .K. , • • K. ,. .K • • • • • • • K. • - ••• - ••• - •• P.- • -.-.N ••••••••• P. •••••••• K •••••• ~ .... ~ OTACBK I.Q ~ 11 m .. -=- \£) n ~ g en ~..... m I'd 8 I.Q 11 SlI B i ~ tv ~ o HI tv ....a en (1) ....~ o ::s -=~ ~ ~ I.Q I.Q .... ::s I.Q ....)I 01 en tv tv ....a 001C40 001C60 001C80 001CAO 001CCO 001CEO 001000 001020 001040 001060 001080 0010AO 0010CO 0010EO 001EOO 001E20 001E40 001E60 001E80 001EAO 001ECO 001EEO OOiFOO 001F40 001F60 001F80 001FAO 001FCO 001FEO 002000 002020 002040 002060 002080 0020AO 0020CO 0020EO 002100 002120 002140 002160 002180 0021AO 0021CO 0021EO 002200 002220 002240 002260 002280 0022AO 0022CO 0022EO 002300 002320 002340 002360 002380 A0015832 021B4010 90246000 A00007F7 472000C6 COB20985 4700B502 OC000800 08002F20 16001E18 IFOOI085 IFOOIE3C 080010CO 86002B50 00008000 00000000 00180000 12C40156 00090000 00000000 00000000 615C44FO 00000000 00000000 00001000 00030000 FF050007 00002B50 00000005 00000000 2720001F 02080000 240B1480 023FOAOO OCI01418 22682268 134C1420 00BE1432 00002F08 OAOOOOOO FFFFFFFF OOOCFFOO 001FFFOO 0133FFOO 0137FFOO 0183FFOO 0192FFOO 0282FFOO FFOOOOOO 00060000 OOOEOOOO 00160000 OOFFOOOO 00000050 00001900 00000000 00000051 00001300 07/23/71 00044400 302C0223 90586020 48600236 4910BE3A 19684770 4110BE28 00000000 60000001 20000004 60000001 40000001 00000000 60000308 OC000006 13000101 00000000 5B5BCI05 00000000 --SAME-00000000 FFOOOOOO 04084770 402C3008 90606040 41220000 474000C6 00C607F7 9283AOOO 01001035 04001E78 07001E16 lAOOlE10 08003B38 07001E21 9200027C 000010C8 5B5BC2Cl 00050000 C5090900 00000000 PAGE BC565840 47FOOI0C 90686060 59200238 IB881851 9510AOOl 9103A008 60000003 20000006 40000006 50000005 lE3C1E30 40000006 20000005 000010FO E3E305Cl lE6COE12 000010FO 00000000 C08C47FO 9180AOOO 9070D-213 472000C6 4350COB2 47B0017E 4770B166 080020FO 13001EI0 39001E18 08001090 070010BO 3io01E23 86003008 0000Q400 C6C70700 OOFOOOFE OE000005 00000000 BCSA584A 07175890 901001FO 12660787 09851968 92E9BE6B 9280AOOO 60C2C740 20000001 60000004 030806CO 40000006 40000005 60000168 00000000 01000001 211C12AE 22100400 00000000 00040207 A0044880 02079008 41110000 477000C6 9110A008 9200A008 C3001038 lAOOlE10 08001070 07003B51 IFOOIE3C 08001000 OOOOOOOQ 00001DC8 00FE32AO lEC41E56 002000C8 00000000 40083000 01C890EO 80009680 59100238 18524350 4710B20E 47F00156 60000001 20000005 00000000 60000006 40000001 0008000A 1E003000 FF006000 10401080 000012B2 00000000 00000000 00000000 00000000 OOFFOOOO 01008484 00000000 00000000 00000000 00002F20 80808083 85605040 30201000 00000000 00000000 00000000 00003000 900010AE 00680000 00000001 00003228 00002054 00002F08 00000020 00000000 00000006 00000000 00000000 00000000 00000000 47FOOIE8 00000000 1907BOOO 0507BOOO 47FOBCEC 00003228 47FOOICA 22100016 22682268 22682268 137AOOCE03E815D2 144COOBE OOBEOOBE 04000000 05000000 FFOOOOOO 03030500 FFFFFFFF FFFFFFFF OOOOFFOO 210000FC 0130FFOO 620000FB 0134FFOO 620400F8 0180FFOO 50930190 0184FFOO 50C300C4 0193FFOO 600BOOFB 0283FFOO 50C300CO FF020000 0005FFFF 00080000 00090000 00100000 00110000 00180000 00190000 00000000 00000000 00001900 00000000 00000000 00000000 00000050 00000000 00001900 000001F4 00000000 00000000 00040007 00001EOO 00005000 00000208 00002B08 00000000 02080000 27·B00034 OOOOOOFF 012AOAOO 07002B50 IF050000 11281166 15A815CE 01B601B6 06000000 00000000 00000618 OOOEFFOO 0131FFOO 0135FFOO 0181FFOO 0190FFOO 0194FFOO FFOOOOOO 80FFOOOO OOOAOOOO 00120000 001AOOOO 00000000 00000000 00000079 00001900 00000000 00000050 •••••••••••• ~.. 5 • •• O•••••• K. K • • • • K • • • • • 0 •• - ••••••••••••• B •• ••• 7. - •••••••••• • •• F •••••••••••• .. - ... - .. -- .. -- ... F..... . F.... ••••••••• F. 7 •••• .. ..........- ... .... - .......... . ·.... ....- ....... ....... ,...... •• K•••• OK ••••••• • i ••••••••• F ••• , • •••• Z•••••••••• ••••••••••••• 0 •• ••• O-BG C••• - ••• • •••• Q•••••• - ••• ••• i- •• Q ••• lil •••• . ... - .......... . •••••••• $$BATTNA ••••••••••• B•• -. FGP •••••••••• • O••••••• O •••••• · .0 •..••.... B••• 0 .O •• $$ANERR •••• O ••••••••••• R•••• / •• 0 •••••••••••• ••••• -i •••••••• --SAME-~ 00000000 00002000 000024A8 40002E06 00000007 000002E4 00000000 00000000 8500E207 8000C6F2 8000CI09 8400E207 22682268 I1FC1372 OOBEOOBE 030045F8 OBOOOOOO 030305FF 110000FC 000000F8 620300F8 620700F8 50C300CO 600AOOFC 50C300CO 00000000 00070000 OOOFOOOO 00170000 00000000 00000000 000001F4 00000000 00000000 00000700 400010BC 00002B50 00002140 00000001 00000008 00000000 00000000 0000000-0 0310C2C7 8000C6Fl 84006150 21782178 128212F6 lSA41502 180819C2 07000000 00000000 FFFFFFFF 420000FC 620100F8 620500F8 50C300CO 600800FC 600COOF8 00000000 00030000 OOOBOOOO 00130000 001BOOOO 00000000 00000000 00000000 00000000 00000000 00002308 00000000 80002C4C 00001FAO 00000000 00000000 00000000 19001F98 19070800 47FOOEBO 220821A8 120600C2 15A8138A IB360000 08000000 FFFFFFFF 0009FFOO OOOFFFOO 0132FFOO 0136FFOO 0182FFOO 0191FFOO 0281FFOO FFOOOOOO 00000265 OOOCOOOO 00140000 001COOOO 00000000 00000051 00001300 00000000 OOOOOOO~ 00000079 00000000 00001900 00002054 0000250F 00000000 90002CFE 00002B6A 00000000 00000000 00000000 OA0032AO 05070800 50000408 22382238 1314135A 13AC13C8 02004478 09000000 FFFFFFFF 000000F8 420000F8 620200F8 620600F8 50C300C4 600900FC 50C300CO 00000000 28FFOOOO 00000000 00150000 00100000 00000000 00000000 00000700 00000000 00000000 00000000 •••••.• i ••• Q•••• • • i ••••••••••••• ••••••••••• < •••• ••• i ••••• ~ •••••• • •••••• U •••••••• • •• Q•••••••••••• ·• ••••• .......... .... . BG •••••••• ' • ••••• SP. O. Y•••• ••••• ~ F2 •••••••• • ••••• AR. O•••••• •••••• SP.O •••••• • <••••••••••• Y. K ••••••••• <•••••• • ••••• Fl •• Q ••• Q. • •• i •• /i. O•• i ••• ••••••• 6.0.B •••• ••••••• K••••••• R • •••• Q. B •••••••• ••••••• 8 •••••••• ••••••••••••••• 8 ••••••••••••••• 8 ••••••• 8 ••••••• 8 ••••••• 8 ••••••• 8 ••••••• 8 •••• i ••• •••• iC •••••• iC.O • ~ •• - ••••••• - •• 8 •••• iC •••••• iC •• ••••••• 8 ••••••• 8 ••••••• 8 ••••••• 8 • ••• iC •••••• iC.O ... .- ....... -.. . •••• - •• 8 •••• iC •• ••• i •••••••••••• ••••••• 4 •••••••• ••••••••••• i •••• ••• ~ ••••••••••• 4 ••• i •••••••••••• "IiI IV IV ~. ~(I) 8en .. .r= \Q CIl ~ t+ (I) S n ~ "tI g I.Q til a ~.... 11 I. (I) Ii It! a en (j) I.Q ~ a ~. 0, (I) ~ :+ IV IV o HI IV ...,J ...-.. PAGE 07/23171 DTACHK I.Q CO 0023AO 0023CO 0023EO 002400 002420 002440 002460 002480 002500 002520 002540 002560 002580 0025AO 0025cO 0025EO 002600 002620 002640 002660 002680 0026AO 002720 002740 002760 002780 0027AO 0027CO 0027EO 002800 002820' '002840 002860 002880 0028AO 0028CO 0028EO 002900 002920 002980 0029AO 0029CO 0029EO 002AOO 002A20 002A40 002A60 002A80 002AAO 002ACO 002AEO 002B4"0 00000000 00000079 00008000 40C3D6D4 00000000 09002455 E3E3D54B 00000000 00000000 00FF1504 FFFFFFFF FFFF13FF FFFFFFFF FFFFFFFF 00000000 00000000 08000000 00000000 06000000 10000000 00000000 00000000 FOF761F2 0007D7FF 21782269 232A1E4E 00000000 00000000 0007FFFF F7F2F3F7 00000000 000025AC 00000000 00000000 372D2E2F 5B6c507D C4C5C6C7 84858687 3F3F3F3F 3F3F3F3F lA091A7F lA0A171B lA1A1A1A lA1A1A1A 64656667 75767778 444546.47 55565758 FFOOOOOO OOOOOOFF 00000000 00000000 00000000 00000051 00000000 00001300 08000004 000023D8 D4E4D5C9 C3C1E3C9 --SAME-20000015 00008000 40F040FO C34BOOOO --SAME-00000000 00000000 13FFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFF OOFFFFFF FFFFFFFFFFFF0014 03000000 00000000 00000000 06000000 00000000 00000000 OBOOOOOO 00000000 00000000 OEOOOOOO 00000000 00000000 13000000 00000000 --SAME-F361F7Fl 32A03000 00003Fl0 00003Fl0 226AOOOO 25102514 1EF41F04 1F140020 02080000 0000283C 00000000 D5D640D5 F875ECDl 8000EC50 F1F2FOF4 00002044 00000000 00000000 00000044 00001F2C 00000000 0000289C 00000000 00000000 1605250B OCODOEOF 4D5D5C4E 6B604B61 C8C9D1D2 D3D4D5D6 88899192 93949596 --SAME-3F3F3F3F 3F3F3F3F lA1A1AOB OCODOEOF lA1A1A1A lA050607 lA1A5B2E 3C282B21 1A1A7C2C 255F3E3F 68691A1A lA1A1A1A 797A1A1A lA1A1A1A 48491A1A lAiA1A1A' 595A1A1A lA1A1A1A OOFFOOOO OOOOFFOO 00000000 FFOOOOOO --SAME-00000000 00000000 LBLTYP --BG-003220 003240 003260 HEX LENGTH I~ 00000000 00000700 000023EO D6D5E24B 00001900 00000000 F1C9FOFO 00000000 000001F4 00000000 C14040D9 00000000 00000000 090023ED C5C1C4E8 00000000 00000000 20000023 40C6D6D9 00000000 08000004 OOOOOOO~ 00002440 00002448 F1C3FOFO C14040Cl 00000000 00000000 00000000 00000000 00000000 FFFFFFFF FFFFFFFF FFFFFFFF 13FFFFFF 01000000 00000000 00000000 09000000 00000000 00000000 11000000 00000000 000B2A3F 14FF15FF FFFFFFFF FFFFFFFF FFFFFFFF 00000000 04000000 00000000 00000000 OCOQOOOO 000000.00 00000000 FFOOOOOO OB140AOA 14FF15FF FFFFFFFF FFFFFFFF FFFFFFFF 00000000 00000000 07000000 00000000 00000000 OFOOOOOO 00000000 00000000 01FF01FF FFFF03FF FFFFFFFF FFFFFFFF. FFFFFFFF 02000000 00000000 00000000 OAOOOOOO 00000000 00000000 12000000 00000000 02FF12FF FFFF100l FFFFOOFF FFFFFFFF FFFFFFFF 00000000 05000000 00000000 00000000 ODOOOOOO 00000000 00000000 00000000 00000000 00000020 25183CFO 214C0020 00000000 C1D4c540 00002171 OOOOOOOC 20000000 00000000 00000000 00000000 10111213 FOF1F2F3 D7D8D9E2 979899A2 00000000 0007FFFF F1F2F3F7 00000000 FOF761F2 0007FFFF 21782269 23721E4E 00000000 -00000000 000.025AC 00000000 3C3D3226 F4F5F6F7 E3E4E5E6 A3A4ASA6 00000000 F875ECD1 F1F2FOF4 00000000 F361F7Fl 00003Fl0 226AOOOO lEF41F04 02080000 00000000 00000044 00000000 18193F27 F8F97A5E E7E8E94A A7A8A9CO D5D640D5 8000EC50 00002044 00000000 32A03000 00003Fl0 25102514 lF140020 0000286C 00000000 00001F2C 0000289C lC1D1E1F 4C7E6E6F E05ASF6D 6ADOA107 C1D4C540 00002171 OOOOOOOC 20000000 00000000 00000030 25183CFO 214C0030 00000000 00000000 00000000 00010203 404F7F7B 7CC1C2C3 79818283 '3F3F3F3F 3F3F3F3F 10111213 lA1A161A 261A1A1A lA1A1A1A lA6A6B6C lA1A1A1A 7D4A4B4C 30313233 OOOOOOFF OOFFOOOO 3F3F3F3F lA1A081A 1A1A1A04 1A1A1A1A 1A1A1A1A 6D6E6F70 1A1A1A1A 4D4E4F50 34353637 00000000 OOOOFFOO 3F3F3F3F 18191A1A lA1A1AlA 1A1A5D24 lA603A23 71721A1A lA1A1A1A 51521A1A 383.91A1A FFOOOOOO OOOOOOFF 3F3F3F3F 1C1D1E1F 1415lA1A 2A293B5E 40273D22 lA1A1A1A lA1AlAlA lA1A1A1A 1A1AlA1A OOFFOOOO 00000000 00010203 1A1A1A1A 201A1A1A 2D2F1A1A 1A616263 1A7E7374 7B414243 5C1AS354 00001300 OOOOFFOO FFFFOOOO ................. • ••••• ••••• Q•••• 6 ••••••• 4 •••••••• 1I00A READY FOR COMMUNICATIONS. •••.•••• 1COOA A TTN. 0 OC ••••••• 07/23/71 •••••••• •• P ••••••••••••• ••••••••••••••• 0 ••••• 4 ••••••• <•• •••••••• NO NAME •••• 8 •• J ••• i •.•• 72371204 •••••••• • a'e • • • • • • • • • • • • • 07/23/71.: •••••• •••••••• NO NAME •••• 8 •• J ••• , •••• 72371204 •••••••• $., ...•. ,-./0123 DEFGHIJKLMNOPQRS ••••••••••••••• 0 • •••• 4 ••••••• < •• 456789 •• <••• aABC TUVWXYZ ••••••••• ·•••••• .............. . $ ••••••••• .... - ...... .. ·............. , . ................. •••••••••••••.•• < .. ,..•.....•... •••••• i ••••••••• / ~ 00000000 0000 D5064005 C1D4C540 000032AO 00003880 00003688 0000338A 00000001 0000338A 50003C12 00003388 FF150007 E00039C2 00003BE2 000032AO 000041B8 00003850 00003960 00000001 00003550 000035B8 000050B1 00C2DF17 ·.............. . -... ,...... NO NAME •••••• • B••• s .... •••.•.• i •.. - .••. •••••••• i ••••••• '~.B .. I'Ij 1-1' OTACHK I.Q c:: t1 CD . .::: . ID n 0 t:I:I 0 I:"i en SlI ~..... CD "'C t1 a I.Q t1 SlI S "'C SlI t1 IT '"W a HI '"...., ..,J en CD 0 IT 1-1' a ::s .::: t7 CD tr c:: I.Q I.Q 1-1' ::s ~ ~ 1-1. 0.. en IV '" ID II 003280 0032AO 0032CO 0032EO 003300 003320 003340 003360 003380 0033AO 0033CO 0033EO 003400 003420 003440 003460 003480 0034AO 0034CO 0034EO 0036CO 0036EO 003700 003780 0037AO 0037cO 0037EO 003800 003820 003840 003860 003880 0038AO 0038cO 0038EO 003900 003920 003940 003960 003980 0039AO 0039CO 0039EO 003AOO 003A20 003A40 003A60 003A80 003AAO 003ACO 003AEO 003BOO 003B20 003B40 003B60 003B80 003BAO 003BCO 00000000 05F00700 FFFFFFDC 00005218 00000000 00000000 47FOFOAC 000032AO E3C5E2E3 E6E7E8E9 el000000 01010014 00003430 00000000 00000014 00000000 10003C50 41EOEOOl 00640063 00000000 00000000 00000000 00000000 00000000 00003550 000032AO 00010000 00000000 00000000 00000000 00000000 000049E8 00003A5E 5B5BC2D6 E6D609D2 58FOC004 4500FOOC 5870D1BC 4830C03A C03A4A30 48206000 C03e~140 E0009240 4004F7F2 60385810 C004051F 60004930 00014004 4500FOOC 5000F008 58FOC004 41FOC028 58FOC018 D500C058 412001EC FFFF5810 18011840 C0500A02 07/23/11 PAGE --SAME-900EFOOA 47FOF082 000032AO 000032AO 00003238 00004DB6 00000208 00000000 00000000 000032AO 0007AFFF 000032AO 0007AF24 OA0407F1 000032BO 000032BO 00004218 00000000 00000000 00000000 00000000 --SA~£-- 58COFOC6 98CEF03A 000032AO D9E4D540 0001FOFl 000040D5 00000000 00000000 86BCF018 000035B3 00000000 1168E2E8 58201044 00000000 --SANE-00000000 00000000 --SAME-00003958 000032AO 000032AO 00003958 --SAME-00000000 00003550 0000338A 000041B8 00003A72 07C50540 60D9C5C3 051FOOOl 000033F8 02016000 4A306000 601C4E30 4C20C03A 601E4820 60444830 40404000 01C81841 00014004 C03E58FO F7F74040 00000000 4500Fooe 051F0001 02021025 07FF5810 60430772 58FOC004 C01407Fl 4110C048 OAOEOAOE 58EOCOOO 90ECDOOC 00003880 0001C1C2 F2F3F4FO E8C34000 00000000 10003C50 ~lEOEOOl 00640063 00000000 E2FOFOF8 020035B8 00004A06 58DOFOCA 185D989F' 00003688 C3C4C5C6 F1F2F3F4 00404040 00000000 1160E2E8 58201044 00000000 04000000 40400272 00000064 000049FO 9500EOOO FOBA9110 000038EC C7C8C9Dl FOF1F2F3 40404040 10000000 E2FOFOF8 010034E8 00000000 00008200 00000000 00003620 00000000 4770FOA2 D0480719 00003BC8 D2D30405 F4FOF1F2 00000000 04000000 40400162 20000064 000049FO 00000108 20000000 00000000 00000000 9610D048 07FF0700 C3D6C2C6 0607D809 F3F4FOFl F1F2F3C4 00009200 10000000 00003550 01010014 000034A8 00000000 00000014 00000000 92FFEOOO 00003BE2 FOFOFOF1 E2E3E4E5 F2F3F4FO 00000000 00000108 04000000 00003550 00000000 00000000 86BCF018 00000000 00000000 00000000 00000000 000033F8 00003550 7000004B 00000000 00000000 000038EC 000032AO 000033F8 50003C12 00000000 00003550 000033F8 00003880 00000000 01000000 50003C12 00003960 00000000 70003934 00003388 000041B8 00000000 000041B8 00003550 00003850 00000000 00003850 000035B8 00004708 00000000 00003960 00003BE2 00003550 00000000 00000000 000035B8 00000000 00004990 00003B26 5B5BC2C3 0609C400 4004F6F3 OA024100 C038D201 4E300100 0100D705 1A425B40 60004C20 601C4E30 58FOC004 58F01010 F7F44040 C024078F 40005810 OA025800 00000000 4004F8FO F00158FO C01C07F1 95406044 051F8001 58FOC004 070005FO 50D05008 00000000 00003388 00000000 00003950 00003B58 D3D6E2C5 58FOC004 40404000 D1C858FO 601CC038 07050100 01DOD100 C0385040 e03A1A42 D1DOF331 051FOO02 45EOFOOC 40005800 5810COOC D1C894EF D1C84110 OA024100 40404000 101045EO 58FOC004 07720200 1000000B 051FOO01 5000F008 5050D004 00000000 000033F8 00003A3E 00003A3E 00003A3E 5B5BC2C6 051FOOOl 4l10C040 C00805EF 58FOC004 Dl00940F 940FD1D6 D1DC58EO 5B40C038 603AD1D6 00000014 5020D1BC D1E85000 07F15800 10201801 C0500A02 D1CC58FO 5810D1CC F0085020 051F0001 6043C059 OC000060 4004F8F3 4500FOOC 5820COOO 00000000 00003470 00000000 00003AEO 000032AO C304E4D3 4004F6FO 5800D1C8 5810D1C8 051F0001 D1D64F30 4F30D1DO D1DCD200 504001EO 96F0603D 000001C4 587001BC D1E45800 D1E45000 18404110 4l10C040 C00805EF 58FOC028 01C05880 4004F8Fl 92406044 00000000 40404000 00000000 95002000 000032AO 00000000 00000000 00003B2C 00000001 FOE90000 40404000 184005FO 96101020 4004F6F7 D1D04030 4030601C 6038EOOO 58EOD1EO 58FCC004 0038FFFF 5810D1E8 C0205000 D1E858FO C04805FO 5800D1CC 5810D1CC 91201010 D1COD213 40404000 5810C05C 00140DOO 58l0D1CC OA025800 077992FF 00000000 0000001C 00000000 00003B88 lCOOO01A COOOOOOO 9640D048 5000F008 5020D1BC 40404000 60004830 41406002 K&306050 D2006043 051FOO01 D2137000 07F158FO D1E84830 C004051F 5000F008 184005FO 96101020 071F1841 60388000 5820C02C 5010D1EC 01C40038 94EF1020 01CC4110 20009610 7 • 0 •••• 0 •• 00 ••••• ·............... ................ ••• 1 •••••••••••• · ............... ................ •••••• OF •••••• O. .00 ••• 0 ••••••••• ................ TESTRUN •• ABCOEF WXYZ •• 0123401234 A••••• NYC •• • ••••• 0 ••••••••• 0 •••••••••••••• S ••••••• HCOBFOO01 GHIJKLMNOPQRSTUV 0123401234012340 •••• 123D •••• ·............... ·............... .......... ••••••••••• &.-SY •••••• 0 ••••••••• ·............... S008 • •• Y••••••• &••• &. ••••••• 0 •••••••• ••• &•• SYS008 • ••••••••••••• O• ................ ................ ................ ................ • •••••••••••••• 0 ................. ................ ·••••••• ............... 8& ••••••• • •••••••••• &•••• ••• &••••••• 8& ••• ••••••••••• &••• • •••••• &••••••• S ••••••• &••••••• & ••••••••••• 8 ••• & ............... ·................. ................ ................ ·••............... • • • • • &•••••••• ••• 8 •••••••••••• ·•••............... · ............... Y••••••••••• & ................ ................ ·$$BOPEN ............... $$BCLOSE $$BFCMULOZ •••••• WORK-RECORD •• 0 •• • 0 ••••••• 63 •• 0 •••• 8 •••• JH. 0 •• J.K.- ••• K.- ••• •••••• - ••• J.P.J. •••• - ••• J.P.J.J. •• -.< ••••• $ •• & ••• - ••• -. <••••• ••• - ••• - ••• J.3. .72 •• 0 •••••• - ••• JH ••• 0 •••• O. .74 - •••••• 0 •••••••• .77 ••• JH •• •• 0 ••••••••• JH •• &. 0 ••• 0 ••••••••• • 0 •••••• .80 .O •• K••• O•• O•••• • 0 ••••••••• 1. 0 •• N••• - •••• - ••• K. • .J •• 0 •••••••••• ••••••• 1. 0 •••••• •••••••••• 0&. O. • &•••••• &. &. && •• ·. .... .60 ... •. JH • .0&. O. •••••. JH •••• &.J. • 0 ••••••• 67 J ••• JO •• J. ..JO •. J • • - •• -. J ••• J.K. - ••••• -& $ •• & J ••• J. K. -. -.JO.O- •• O•••••• ••••••• D•••• K••• &.J ••• J ••• JY.l.0 JY&.Ju •••• &.JY •• • 1 •• JU&. JY. 0 •••• ••••• 0&. O. • &••••• ..J•• .0 J •• 0 •••••• J ••••• •• J •• 0 •••••••••• O.&.J ••• J.K.- ••• ••••• 81 - •••• - •••• *&.J. ••• - ••••••••• D•• .83 ••• J ••••• • .0 ••••••••• J ••• ... ..... ·............... "-> w 0 8 CIl C/) ~ rn rt CD ..,.I'Zj ~ CD .. ~ \C C1 a g "d 11 0 0 1:4 \Q 11 CIl III i . t6 en ..,.s:: \Q ~ CD CD C/l I'd 11 11 0, (I) 0 11 III S ,.. I'd III 11 rt "-> ~ 0 HI "-> -.J 003BEO 003COO 003C20 003C40 003C60 003C80 003CAO 003CCO 003CEO 003DOO 003D20 003D40 003D60 003D80 003DAO 003DCO 003DEO 003EOO 003E20 003E40 003E60 003E80 003EAO 003ECO 003EEO 003FOO 003F20 003F40 003F60 003F80 003FCO 003FEO 004000 004020 004040 004060 004080 0040AO 0040CO 0040EO 004100 004120 004140 004160 004180 0041AO 0041CO 0041EO 004200 004220 004240 004260 004280 0042AO 0042CO 0042EO 004300 004320 D04850EO D0484160 418001BC D1C45810 41FOF21A 103C4510 F0369011 4510F260 OA014200 07FE9104 101541EO OA009180 5BB01038 48B01000 4170F140 96801015 OA0001F7 F1B89108 5810104e F1F6940F OA320000 OA3298Fl F35805EE 47EOFOE8 41EOF296 F2609120 104e58EO 41BOF2FA 102B4400 00000000 5B5BC2C5 F1CC9104 102B4710 4780F068 94BF102C 91801002 07F31831 1030024F 4710FllE 102C4710 1050D500 19434770 10364720 1052F1C8 OA021812 F9C3F14E C4E207FO 416D007C 4710F08A 9140D048 F126D200 58440000 00608950 4A510002 4710F116 DOFC4580 015e4190 F53C9200 PAGE 01/23/11 DTACHK ~ D05405FO 00044110 4110D1CF 01BC5880 41FOF052 FOCA9871 F32c58CO 91801002 10384800 10154710 FODE819A 10024110 41BBOOOO 58A01048 41E0105C 948Fl005 189B4B90 1015071E 41110001 10029108 OA320000 E12447FO 98F1EOF8 OA0047FO OA029801 10154710 F35C94EF 58E01024 103050EO --SAME-09D9E305 1010071E F13C4140 4640F05A 4530F1A8 4710FOAA 4110FOOO 10483000 9106102A F1B69108 10401048 F1124202 FOB20200 4770FOEB 47FOF132 E5E660FO F3F390Ee 5810F7BC lBEE43El 4780F1FA 00601004 4A410008 00088850 48550000 12714780 F2004700 007C1989 F53C5010 9120D048 COOC4110 05105800 D1C058EO 41FOF260 F32C4400 10445BCO 4110F01E 10000AOO FOC2D703 F01B41FO FOFCOA01 91041015 10AA12BB 91201002 58B01038 10545090 941Fl015 5010F358 10154110 OA329110 E03098Fl 9070F32e FOE89610 F3509110 Fl0441FO 102401FE 07FE960B 102847FO 41EOF016 C0380610 80001EOB D05407FE 47FOF114 10349101 10404180 OA010201 91801002 104Cl04C FOE2B69A 91011004 4110F194 4780F154 4110F1AA 41BBOOOO 10444BBO 58EEOOOO 5810F354 F21A9512 10024180 E1249070 5870F328 10249001 10244710 Fll0910C 91011015 10249108 F2865B5B 5800B048 05505840 50008000 41FOF088 C9D1C6C6 1015018E F0369180 103El050 4710FOA6 07FED703 F01B5090 4710F20C 50B01044 96401005 41E01058 D2021039 10504ABO 5010F328 41FOF1EA 10144770 F24E4110 F32C5870 91801015 F35050EO F2BE907C 101547BO 4710Fl04 10154710 C2c3C5D6 9820B050 10001E4B 87861000 47FOFOB2 C2E9E9D5 OA099011 10024710 41FOF036 OA074000 10441044 104407F1 58E01028 4AB01052 12BB4740 941Fl015 104150BO 100041FO 981DF32C D203F358 F20A58EO F35405EE F3289680 4710FOE8 F35C94F7 F32e5870 F2D2D703 5070F328 F28A9120 E5Fl0000 58E00054 50401000 0203D1E8 41FOF046 F3F89011 F32C4510 F06COA01 91801002 1000D200 07FE989B 91201015 44001030 4BB01000 F154948F 91401005 10409120 F12C9541 91041015 10449110 10684110 47FOEOOA 101547FO 96801015 10241801 F3289108 10441044 987CF32C 10154710 00000000 01FE9620 81165000 C0305860 47FOF02A F32c9620 FOCA41FO 40C0103E 4110F092 1038101E 10449104 4710FOF2 50E01028 50B0104C 10051BBA 4710F1AA 10150181 EOO04170 4180F1E4 10034780 F35405EE 41FOE012 F1745810 91281015 4110F31E 10154710 0703104C 91401002 F28658EO 00000000 41FOF02A OA099026 FOE85846 4940F1CA 4144F1E9 OA079110 OA021813 4530F1A8 4750F132 102A4710 4770F192 103e8800 10401049 OA009180 00000004 400BCBE3 010896FF 9400Dl04 00011AE1 lB554351 9640D060 910F1000 000847FO 91020105 F12647FO 000247FO 47BOF162 015C4110 41FOF02A Flce5860 00000640 47BOF078 02006000 10034780 02001040 9108102A 58401010 F13258EO 18534800 00084620 D203104C 10024710 00003550 8B030141 F7C90201 91801000 41EEOO03 00014141 43800060 4740F35C FOFOD200 071E1957 F1A25950 F1924110 95408000 F5400AOO 01011052 100895FF 18304304 920B6000 40000600 FOCC0501 10380200 4780FOFC 41440000 10409826 10344120 F1584144 103C4340 F1B40A07 000032AO lB130B61 D1581000 41110002 91011001 00021B75 4480F7CA 91201000 D0601004 47COF1A8 F7BC4720 00785830 4770F162 91801002 10529026 101E4180 00004140 4530F1A8 60001028 1052F1C8 10381030 92016000 05014000 F1CC9620 00031843 00014242 10404144 07F31821 0000395A 5COOOOOO 4580F200 4710F426 4710F064 06704450 4A410006 4710F006 96500060 910F1000 Fl0C91FF F7BC1B37 06804630 4710F182 F1CC4530 F03E4A60 00094334 9140102C 9108102C 4770FOC2 024Fl098 4530F1A8 F1F34170 102C07FE 4342103C 103C1835 00014240 48020006 00000004 47FOFOOE 47000004 94000105 41EEOOOl F1CA9601 91101000 02030060 43800060 4710Fl16 F7C94710 4180007B F14E5890 OA075810 F13C9826 104A9103 F1DF1930 4780F088 4780FOE8 96F01049 10485830 91011004 F1329102 02001040 43321044 0503103C 1050D501 41101016 000048EO C9D3C2C4 47FOF030 95401000 50EOOl14 010441FO 4710FOAC 10005850 4480F7CA 9101D15A Fl0C9012 1A835090 015C5030 015C58FO •• &•••• 0 •••••• 0. ... - ............ •• J ••• J ••••••••• JO •• J ••• J ••••••• .02 •• 00 •• 02-.01. •••• 0 ••• 3 ••••••• 0 ••• 3 ••••• $ •• •• 2- •••••• 0 ••• K. ................ •••••••• OBP •• <.< •••• O••• O•• OOS •• •••••••• 0 ••••••• •••••••••••••• 1. •••••••••••••• 1. •• 1 ••• * •••••• 1. ·•••............... 1 •••••• &••••• 1 ••••••••••••••• •• • <•••• &.3 ••• 3. 16 •••• ~ ••••• 2 ••• ·•••............... 1 ••• 0 ••• 1 •••• 3 •••• 1.8 •• 3 ••• 3. •• OY••• OOY •••••• • .2 ••••• 3& •••••• 2- •••••• 1 •• 01 ••• • <•• 3* •••••••••• •• 2 ••••••••••••• • ••••• &•••• 02. $$ $$BERRTN.OO •• OO. 1 ••••••••••• 1 •• •••• 1 •• OY ••••• •• 0 •• 0 •• 1 ••• O. •••••• 1 ••• 1ZK.-. •••••• 0 ••••••••• .3 •••• 0 ••••• K•• •• K••••••• 1 ••••• • .1 •••••• &1 •• •••• 1 ••••••• 1 ••• • &N •• •••• 1 ••••• •••• 1 ••••••••••• •••• O.K •••• K•• < • .1H •• OY •••••••• ••••• 01 •••••••• & gel. vw-o •• T •••• OSP033 •• J ••• 71K. ••• iii •• 7 ••• J ••••• •• 0 ••••••••••••• •••• 1 ••••••••• 1.K •• - ••• - .............. 3* • -. &••• &••• OOOK. .. ... •••••••••• J ••••• •• 1 ••••• 1 •• 01 •• & •••• 2 •••••• 01 ••• • * ••• @•••• 1 •• 5 ••• 5.& •• *•• 5 •• 8 ••••••• &•••••••• • &. • ••• & •••• &. &••••••• K.JY~ •• .00 •• 00 •• 00 •• 00. 1JFFBZZN38 •• 3 ••• •••••••• 3 ••• ·0 •• 0 0 ••••••• 0 ••• ••• &.00 ••••••• O. • .·0 ••• ••• K••••• •• P ••••••••••••• 0.& •••• 1 •••••. 02 ..2 ••••••••• &••• &••••••••••• &•• < • ••••• 1 ••••••• ......... •••• 1 • K••••• &•• • &••••• 01 ••••••• &.3 ••• 3 ••••••. 1U .01.K.3 ••••••••• • ••• 2 ••••••• 3 ••• 2 ••• 3 •••• 0 ••• 0 •• 3 ••• 3 •••••• 01. ~. • ••••. OY •••••••• 3&&.3*.1 •••••• 3. 2 •• @3 ••• 3 ••••••• • ••• 2KP ••••• P •• < •• 1.&.3 •• @3 •• •••• 2 ••••••• 2 ••• BCEOV1 •••••••••• .. P ••••••• 1 ••• 1 ••• •••••••• 0 •• - •••• ....... •••• 1 ••• •• - ••• 1 •• •••• O. .O.-••••••••. OY O. N••• lH •• OB. 0 •• • .K ••••• K••••••• •• 0 ••• - ••• 1 ••••• • ••• N. .13 •• 1 ••• • •• 1 ••••••• K•• ................ 1 ••••••••••• N••• • &N. 1'•••• 3 •••••••••• ... ..... ·............... ••• /* •••• 00. 1LBO J ••••• 2 •••••• 00. • ••••• 4 ••• J •• •••••• 0 ••••• &••• ••••••• &1 ••• J •• 0 •• 7 ••••••••••• O. •••••• OOK •• - •••• .- ••• &.- ••• - •• 7. •• 1 ••••••• 1 ••• J. 7 ••• 1 ••• 71 •• 1 ••• •••• 7 ••••••••• &• • .1 ••••• 1 •••• *&. • ••••• 1 •••••• * •• .. ....I7J ~ CD .. ~ ~ n ~ en ~.... CD "C a i ~ ~ ~ N c.n oH\ N ...., en CD g. .... o 1:1 ~ tj CD t:r s:: 07/23/71 orACHK ~ 004340 004360 004380 0043A.O 0043CO 0043EO 004400 004420 004440 004460 004480 0044AO 0044CO 0044EO 004500 004520 004540 004560 004580 0045AO 0045CO 0045EO 004600 004620 004640 004660 004680 0046AO 0046CO 0046EO 004700 004720 004740 004760 004780 0047AO 0047CO 0047EO 004800 004820 004840 004860 004880 0048AO 004940 004960 004980 0049AO 0049CO 0049EO 004A.OO 004A20 004A40 004A60 004A80 004AAO 004ACO 004AEO 010C416D 18851288 F126D200 18E141EE 4710F2E2 80034770 9101F7AO 014447FO 4870F600 F2B258Fl 01594710 0201F600 4110F700 F2845861 F5389209 4770F37C 40005800 00605000 00FC47FO 00690065 96F04000 01059400 41900020 96040105 4710F4C4 12774780 96020105 F4EC1885 47FOF4A8 47FOF1E8 000046FO C2C304E3 00000000 07004742 0500480F 00008400 00000000 00000000 3100470C 3100470C 01004898 00000000 00000000 40404040 40404040 0000480F 40FF1800 00605810 00044A30 98150060 lB0047FO 4710F022 4780F08A F09E4780 96015001 4110FOC4 00000000 00000000 007C5870 47COF1BA 60004000 000250EO 91020159 F2444810 4710F26E F2844870 91030159 001045EF F20A4166 F6040203 4500F314 002C4166 F5385810 lB000201 00604EOO F7C04El0 F3FC1B88 F1540060 41440001 F7C91233 lEAA0690 lEAA4730 47FOF4C8 F51A9240 45EOF08A 06809240 02006001 4690F44C 00000000 FOF70000 OOOOFFOO 40000006 60000079 08000002 00000800 00000000 40000005 40000005 20000050 --SAME-00000000 --SAME-40404040 0000488F 00000000 00140A21 10481B55 07FE0008 F0184100 91204002 18350501 F0804403 47FOF080 OA021BOO 00000000 --SAME-- F7BC9101 06804480 94FE015A 01149601 4710F33E F6000610 9601F7AO F6000670 47EOF2A2 000C98E2 00014177 F7BOF7B8 000047AO 00004170 015C47F8 00604000 0060F395 00684EOO 43810001 0060F384 lB554851 4780F43C 4730F458 F4909101 45EOF08A 60004166 195747CO 60004480 600089AO 47FOF440 00008000 00000000 00000000 31004744 31004744 000047F8 002020F3 19000020 08004800 08004820 00000000 PAGE 01044710 F1CA4188 9101Dl05 010447FO 0203F7A4 lB171211 90E2D144 91048003 5860F7A4 01445860 000147FO 5810F7BO OA0298E2 00485810 00080200 48000060 00680062 0070F384 07090060 00600061 00021B45 94000106 47FOF512 01064710 4140F7C6 00010670 F4EA1277 F50C45EO 000147FO 00000000 OCOOOO03 00000800 00000000 40000005 40000005 00000000 2400488E 00000000 20000001 20000001 00000000 F1FA9812 00011A68 071E4111 F12698EC F7A80201 4770F244 4110F700 4780F284 58200118 F7A40670 F3364170 9101F7Al 01444870 015C47F8 60016000 47FOF38E 47FOF3FC 0060006B 00604150 96F00068 9601015A 47FOF440 91101000 F49047FO 41500003 47FOF51A 4770F4E4 F1B61255 F4A44111 090046FO 00004778 002010F1 13000000 08004768 08004788 00003FCO 80000000 00000051 100047EC lE004830 00000000 00FC47FO lB781B58 000A0501 010807Fl F600F602 91040105 4500F264 4160F728 02076048 06709240 004847FO 4710F322 F60047FO 00044110 91021000 95041001 501000FC 96F00068 006A1B58 41400071 47FOFOFO 96010106 4780F47E F4BC1EAA 45EOFOFO 4111000A 45EOF126 4780F504 000A0501 00000001 00004780 2600480F 00000000 20000001 20000001 320007C3 00000000 47000000 A0000008 30000059 00000000 FOF01887 4780Fl00 1000F7C4 5010015C 0203F7BO 4770F336 00004708 47FOF336 20009104 60004470 F3360203 9601F7Al F2A29104 00784111 4710F3CE 4770F39C 02070060 F3840069 06804480 91304000 02005000 58A20000 910Fl000 4730F4C4 4111000A 47FOF51A 47FOF400 47FOF400 1000F7C4 00000000 00003FCO 80000000 00000079 0100480F lE004798 C8C4E3C6 00000000 0700470A 0500488E 01004848 00000000 47FOF1AA lA4847FO 4770F08A 91030159 F7B49104 5810F7BO OA0298E2 90E20144 80034710 F3569103 F7A4F7AC 90E20144 80034780 00045010 95021001 02030060 40009801 00735810 F420F384 4740F40C 40009201 41220004 4770F47E 91010106 45EOF08A 47FOF4A4 188747FO 94010105 4770F52C 00000004 32005B5B 00000000 47000000 20000079 30000081 40400000 OOOOFFOO 40000006 60000051 20000050 00000000 00790079 0050E540 40404040 40404040 40404040 40404040 40404040 00004708 5B5BC206 18305823 43530000 FFOOOOOO 000105FO 071E5811 FOA23000 00064403 96015000 OA060000 00000000 40404040 000047AO 47FOFOOE 4B20F056 4A50104C 05F047FO 41440000 00004B50 41330002 92F05000 58FOFOA4 00000000 5B5BC2C3 40404040 00004708 07C5D540 00001832 89500001 00000000 9005FOA8 00044154 4780F04C 000A1852 9805FOA8 000005FO 00000000 40404040 00000064 C903C2C4 1B444343 89400001 FOOEC9D3 91104014 FOCC5855 47FOF03A 02065001 07FF8900 00000000 06C2C509 01000000 3B9ACAOO C90403FO 00074830 1A540200 C2C4E2Cl 4780F022 00004155 5050FOA4 50001200 00184B40 00000000 00040008 0000480F FFFF407E F3F39015 102E8830 20005000 C5FOF3F3 91084015 00001255 D5033006 4780F07C FOCE1604 00000000 00000000 ••••• lil •• 7 ••• J ••• •••••• 1 ••••• 1 ••• 1.K.- • ••• J ••• J. •••••• &••••• J •• O •• 2S •• J ••• 3.K. 7. •••• 2 ••• 6 ••••••• •• 7 ••• 2 ••• 7 •• SJ. J •• 02 ••• 6 ••••••• •• 6 ••• J ••• 2 •• -7. 2 •• 1 ••••••• SJ •• J ••• 2 •••••••••• 0 K.6.6MK.7.7 ••• 7. •• 7~ •• 3 •••••••• S 2 •• / •••••••••••• 5 ••• 5 •••• *. 8 •• K. •• 3lil •• K•• - •••• •••• - ••• -3 ••••• .- •• 7 ••••••••• 3. ••• 03 ••••••• P •• •••• 1 •• -. -3 •• -. / • 0 ••••••••••••• J ••• 71 •••• 4 ••• J. •••••••••• 4 •• 05. •• J ••••• 4 ••• J ••• •• 4D. 04H •• 0 .. 7F •••• 5 •• •• J ••• 0 ••••• 4 ••• 4 •••••• - ••• 5 ••• .04. K. -. - •••••• 0 .01Y •• 4<.04 •••• ••• 0 •••••••••••• BCMT07 •••••••••• ........... .. ... ................ ................ .... ....... ... ................ ...... .. - ............. ... . ............... • ••••. PCHO'IF • •••••••••• 8 •••• ................ ••••••••••• 3 •••• ................. ............ ... .... ........... ........................ - ..... ............... • •••••• &•••••••• ••••••••••••••• & ................ ••••••••••••• &V .. . .. .. .. .. .. .. .. .. .. .. .. .. .. .. ••••••• $$BOPEN .- ....................... • •••••••••••• &•• ...... - ....................... • •• 00 •••••• 0 •• O. •• 0 ••• ......... •• O••• N.O ••••• O< 0 ••• 0 ••••••••••• • • &•• 00 ••• &••• O. •• 00 ••••••••••• 0 ................ ................ .00. 1LB01ML033 •• •• 0 ••••••••••••• • &. <. •••• K••• &. .0.00.ILBDSAE033 • •• 0 ••• ••• &0 ••••••••••• • •••• 00. &&0. N••• .0&.K.&.& ••••. Olil • 00 •• ; ••••• 0 ••• ...... ................ $$BCOBER•••••••• ~ ~ .... ~ ....IJI'g, en N W ... 9 1 •••••• 000 ••• 01. • ••••••••• 1 •••• 0 •••••• N••• 70 •• O. 1 ••• J •• 1& •• * •• J • 7. K. 6. 6KK. 7. 7 ••• • .2 ••• J ••• 3 ••• 7. •• 7 ••• 2 •••••••• S • • 2 •• - 7 •• 03 •• SJ. •••• K. - ••••••••• 7 •••••• - ••• 3 ••• 3 •••••• 03. K. 7. 7. ..7 ••• 3 ••• 7 •• SJ. J ••• 6 •• 02 ••••••• • *.8 •••••••••• &. -. - ••••••• 3 ••••• .03 ••••••• 3.K •• .03.& ••• K•• .- ••• 0 •• 3 ••••••• • - •••••••••• 4.3. 4. • 0 •••••••• •• J •• OOOK.&. .04 •• J ••••••••• •••••• 4 ••••••• 4 • 4 •• 04 ••••• 40 •• J • • &•••• 00 •••••• O• .05 •••••• 05 •• 04. •• 4U •• 1 •• 04 •••• 0 1 ••••• 5 •• 04 ••• J. 4 ••••• N••• 70 •• 5. • •• 0 •••••••••••• •••••••••••••. $$ • •• 1 •••••••••••• - - - - - - -------~------- 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ,,.,....r-,r-N 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 :.:: 11:1 ~ Fo4 Q 0 0 0 0 0 0 0 0 0 0 I'l r.. ~ r-- 0 Figure 4.9. 232 COBOL Sample Program (Part 26 of 27) DOS System Programmer's Guide I Figure 4.9. COBOL Sample Program (Part 27 of 27) Section 4: Debugging Aids 233 Debugging FORTRAN Programs When debugging FORTRAN programs, gather the program listing, linkage editor map, main storage dump, and any system messages. The linkage editor map is the most useful documentation. Using this map together wi th the main storage dump, the programmer can locate such information as DTF tables, I/O areas, logic modules and FORTRAN subroutines used at object time. A sample FORTRAN program, linkage editor map, and storage map are included to show the relationship between the linkage editor map and the contents of main storage, and to indicate where the DTF tables and I/O areas are located (see Figure 4.10). The DTF tables are built as they are opened, starting from 'the end of main storage or the end of the partition in which the program is loaded. The I/O areas directly follow the end of the problem program. The FORTRAN program itself builds only one I/O area. 234 DOS System Programmer's Guide User-written code is always the first item in main storage followed by the object time FORTRAN subroutines to perform the functions required by the problem program. Only one logic module is accessed by all FORTRAN I/O units (except console typewriter) for each FORTRAN program. The console typewriter uses its own DTFCN that includes a logic module to handle all console typewriter functions. Each FORTRAN program includes an I/O unit table to convert a FORTRAN unit to a DOS symbolic unit. FORTRAN uses the STXIT macro to handle its own program checks. It also uses the normal DOS register conventions. In addition, register 13 is the base register for the FORTRAN in-line code and points to the register save area. Register 15 is the base register for FORTRAN object time subprograms. ~ '1iI ~. IQ c:: t1 (1) . . -'= II JOB ANYNAME II OPTION DUMP,LINK II EXEC ffORTRAN ~ 0 ~ ~ ~ en ~... (1) I'd 11 ~ t1 ~ I'd PI t1 c+ ~ 0 H\ co en (1) ~ ~. g -'= 00 t=' ~ c:: IQ IQ b' IQ ..,.:PI Q, C/) tv W U'I II FTC LIS TX, NAME= SAHP2 • Refer to hex '18' in LISTX Map. MAP YES LOAD =4 DECK NO LIST YES - Output A Listing LIS T)( YE S - Output Object Module Listing E8CDIC t-.,) w .... ~ 0\ \Q 8CIl (1) Ct:l ~ en rt (1) ~ .... • s "t1 ~ ~ ~.... en "t1 ~ (1) s (1) t; Ul ....c:: 0003 0001t 0005 0006 0007 C008 0009 0010 0011 0012 0013 0 a i . t; 0001 0002 0 .~ \Q DOS FORTRAN IV 360N-FO-1t19 3-0 ~ 2: CIl III 0014 (1) t; Internal Statement Number assigned by ~ s "t1 III FORTRAN ~ Compiler. t-.,) 0 H\ co ~ SAMP2 OUE 11/11/68 TIME C PRIME NU~BER GENERATOR WRITE (3,1) 1 FOR~AT ('IFOLLOwING IS A LIST OF PRIME NUMBERS FROM 2 TO 1000'1 119X,lH2/19X,lH3) DO It I z 5,lOOO,2 KaSQRTCFLOAT(I)) DO 2 J=3,K,2 IF C~OD(I,J) .EQ. 0) GO TO 4 2 CONTINUE WRITE (l,l) I 3 FOR~AT (120) 4 CONTINUE WRITE (3,5) 5 FORMAT (I THIS IS THE END OF THE PROGRAM') STOP END 00.00.06 PAGE 0001 .... I'Ij ~ DOS FORTRAN IV 360N-FO-419 3-0 (1) SAMP2 DATE 11/11/6B 00.00.06 TIME: PAGE 0002 -'= •~ . o SCALAR MAP SYMBOL I LOCATION A4 SYMBOL LOCATION A8 SYMBOL LOCATION LOCATION SUBPROGRAMS CALLEO LOCATION SYMBOL LOCATION SYMBOL SYMBOL LOCATION SYMBOL LOCATION SQRT Displacement to an adcon containing the address of subprograms. Check in LOCH ION SYM80L J Locate these values in storage print. P. P. begin = 2800 Variable = 2800 + DSP. SYMBOL IBCOM= 1= 1- storage- print and use Linkage Editor Map. !2: CI'l SYMBOL ~..... 1 PI LOCATION SYMBOL K I'Ij o ~ ~ SYMBOL LOCATION AO (4 3 fORMAT STATEMENT MAP LOCATION SYMBUL 108 'j LOCATION SYMBOL LOCATION SYMBOL LOCATION 10C (1) It! t; ~ ~ S I'tI PI ~ w o H\ 00 til (I) ....~ o ::s -'= '=' (I) tr ~ IQ IQ !:S. IQ ~ .... Q, en tv W ...a Displacement to symbols used on FORMAT STATEMENTS. Locate the beginning of Symbol 1 in dump and cross-reference to LISTX Map. Check the LISTX Map for the internal statement numbers 2, 9, and 12. They are not there because a Format Source Statement causes a constant to be assembled rather than machine instructions. tv IN co t:I 0 en en '< en rt ...."IiI ~ ~ a 11 0 ~ 11 III ~(1) . . ~ ~ 0 "IiI 0 ~ ~ ~ Z en III 11 a 10 en (1) . Cil ....SJ,. ~ (1) TIME 11/11/68 00.00.06 PAGE 000) (1) (1) 'tj DATE SAMP2 DOS FORTRAN IV 360N-FO-419 )-0 11 ~ "tj 11 ~ 11 III a ' tj III 11 rt ~ 0 I-h co Hex lOCHION 000000 000002 000006 \ OOOOOA eOOOOE 000012 000014 000018 00001C 000020 000024 000028 000114 000178 00011C 000180 000184 000186 ooa18A 00018C 00018E 0001CJ2 000194 000198 00019C aOOlAO OOOlA4 OeOlA8 OOOlAC 0001BO 0001B4 0001B8 0001BA 0001RE 0001C2 0001C6 0001CS 0001CA 0001CE 000100 000104 000108 0001De 0001DE 0001E2 0001E4 0001E6 OOOlEA 0001EE 000lF2 OOOlF4 OOOlF6 OOOlFA LABEL STA NUM OP 8AlR LM L Internal Statement Number l!L. .Ag lA ST BCR DC 3 uction rated nternal ment 1. oocoooee J!J.. ~g~A~~ DC DC 00000000 00000000 00000000 13,4(0.13) DC l L 12(13).255 L ST LPR ST 15,128(0,13) 14,4(0.15) 00000003 000000e4 15,128(0,13) 14,16(0.15) 0,31610.13) 0,116(0.13) STD 0.28BIO,13' LTDR 2,2 14,0 11.610.141 0.0 BAlR BC lCO~ STE LA L BALR Be SDR LER AW BUR BC LeR Program Initialization Example: IBCOM will issue STXIT macro so FORTRAN can handle its own program checks. I BCOM= Subprogram address being loaded. T Name of a subprogram (I/O) IBeOM= Decimal Refer to internal statement 3. Variable I is initialized to 5. Look at storage print. Problem program area begins at 2800. R13 = 282C 316 = 13C in hex and 116 =1!.in hex. • L AO LTR IBCOM= J.£, 13,4 14.64(0,15) 1.0 1.28010.(3) 0,276(0,13) 0,260(0.13) 0,0 14.0 1l.6(0.l't) 0,0 0,320(0,13) 1 , 136« 0, 13 ) 15,132(0,13) 14.15 0,4(0,0) 2,2 2,0 2.29210,13) 2.284(0.13) LD J 2,12.28(13) 15,14 15,128(0,13) l, DC ~Al '1 DC ~ ~Al Address constant labels are prefixed with an . A'. 14,12'0.13J BCR L LR Establish Addr.essability for Program Program Name No. of chars. A20 that can be used A36 in a CALL Stmt. A52 MVI lR SAL Inst Gen for Stat BCD OPERAND g~ LM A36 OPERAND 15,0 2,3,34(15) 13,30(0.15) 15,2(0,15) 15,4(0,13) 15,2 seRT \ 282C 282C + 13C -1!.. 2968 - Initialization 28AO - Location Value ofI The easy way to locate variables is to use the Storage Map. J-------SUbprogra.m address being loaded. Name of a subprogram (square root). INTERNAL ADCONS ~ .... I'lr:j \Q ~ (D ~ ... 0 0 • ~ 0 ~ ~ 21 en III ~~ (D to 11 ~ 11 III S to III ~ U'I 0 H\ CO en (D ....~ g ~ 00 '=' (D 8' \Q ....::s \Q \Q ....>' 0- m to.,) W \C) DOS FORTtAN IV 360N-F ~-479 ]-0 OOOlFt 000200 000204 000208 00020e 000210 000214 00021800021e OOOllE 000222 000226 000228 00022e 000230 000234 000238 00023t 000240 000244 000248 00024t 000250 000254 0002')8 0002lie 000260 000264 000268 00016t 000210 000214 000218 00021e 000280 000284 000288 00028C 000290 5 J.Z.Q. b SAHPZ O.llOI O. U) 0,32410.13. 0,12410,13) K L O,1l610,ln J SROA 0 H 0,321,0) 0,124(0,13) 0.12410,13) 1,11610,11) 1,1 1,16010, U. 14.9610.11' 8.14 O,l2'tIO,13) S Z \ ~ LA L BXLE L BAL DC DC 8 L BAL DC SAl 10 4 L L LA lA BXlE 11 1111 1/68 ST L ST LtR C l BCR 7 DATE L BAl l.ln4'n.11I 2,210,0) 3,12010, U) 0.2.0(1) 15,12810,13) 14,410,15) OOCOOO03 00000108 15,12810,13. 14,810,15. 04500074 14.1610.151 0,11610.13) 1,10010,1)) Z,210.0) 3,100010,0. O. Z.OI 1) 15,lZ810.13) 14,410.15) 00000001 0000010C 14,16(0,15) 15,IZ810,1)) 14,52(0.15) 05404040 40FO DC DC aAL L 13 SAL DC DC END T~TAL MEMORY REQUIREMENTS 000291 BYTES I HIGHEST SEVERITY LEVEL OF ERRORS FOR THIS MODULE WAS D TIME 00.00.06 PAGE 0004 J J J I 4 J LZ!l Internal Adcon used in this case fer the limits of a DO LOOP. K 18COH= IBCOM: I .1fIBCOH= IBeOM= Hex number of bytes. '" ~ 0 tj 0 CIl CIl '< CIl rt CD S to 0 ... ... \.Q i... . CD CIl (j) ..,.s:: Q, CD ..,. ~ ~CD 11/11/68 . . PHASE PHAse... ~ XFR-AD 002800 LOCORE 002800 HICORE 005FF7 DSK-AD 1A 06 The program name is contained at dis-t placement of X'IS' in LIST X Map. ~ 0 ~ 0 A member of the FORTRAN System Library that performs object time implementation of I/O source statements and handles all abnormal or normal termination of FORTRAN object time programs. ~ ~ 2: CIl PI ~I-' ESD TYPE LABEL LOADED REL-FR eSECT SAHP2 002/00 002800 ... eSEe' ENTRY • ENTRY ENTRY ENTRY ENTRY 1-. ENTRY ILFIBeOM IBCOH= OPSYS INTSW PDPAR DUHPSW= IJTlNTSW Refer to FORTRAN storage map for address 002A98 002A98 002A98 -------------------ofsubprogram. 003750 0038At 0036e4 00365A 0038A1 [eSEeT ILFSSQRT SQRT 005E48 005Ett8 005E48] .[eSEeT EN ILFF INT SAVERR 004AC8 004FA8 004AC8 eSECT ENTRY ENTRY ENTRY ENTRY ENTRY EI'HRY ENTRY lLFADCDN IlFFCVEO ILFFCVLO ILFFCVIO [lFFeVeO IlFFeVAO ILFFeVlO INT6SW 0039FO 004406 003C82 003FD4 0046FO 003RF2 003B4C 004A80 0039FO CSECT ENTRY IlFFIOCS ILFFBORG ILFBFORG IJSYSlO AOIOCR= 005098 005AFC 005AF8 005B08 00,)A54 005098 ILFU~TAB 005EF8 005EF8 IJJCPD1N IJJCPD3 005e88 005C88 005C88 IJ2L0005 005C48 005098 A member of the FORTRAN System Library used to calculate square roots. CD ...I'd ~ ~ A member of the FORTRAN System Library processes arithmetic-type and speCification program interrupts and continues EXECUTION. It also fixes any boundary alie:nment error that occurs. S to ...PIrt A member of the FORTRAN System library that performs INPUT and OUTPUT data conversion. 0\ 0 H\ 00 A member of the FORTRAN System Library that performs object time I/O data management. A member of the FORTRAN System Library that contains a Unit Table that is used to convert from a FORTRAN unit to a DOS symbolic unit. I/O LOGIC MODULE used by all I/O units except console. A control section in ILFFlOCS that is the logic module for the console. - =n ~:~:~ • ENTRY I rt= CSEC T '-r CSEeENTRY T eSECT ...:::::r- Problem Program begin. Refer to FORTRAN storage map for address of subprogram. ........ I-z;I ~. t.Q ~ OWERT PAGE 11111/«»8 CD . . ,f:: ~ 0 tor.! 0 ~ ~ 2: CIl SlJ ~.... CD ttf Ii 2Ii SlJ S t tf SlJ Ii rt' 0""'" H\ IX) CIl CD g. ~. o :::s ,f:: tj ~ ~ t.Q t.Q ~. :::s t.Q )I ....Q, til tv ,f:: ~ (OR 0- 1 (OR 8-F ~P ReG 1>00000 vOOO)O 000060 0000'10 OOOOCO OOOOFO uOO120 0001.,0 000180 00011\0 0001EO 000210 000240 000210 0002AO 000200 000300 000330 000360 000390 0003CO 0003fO 000420 000450 000480 0004BO 0004EO 000510 000540 000570 '0005AO (J00500 000600 000630 000660 000690 0006CO 0006FO 000720 000150 000780 0001BO 0001EO 000810 000840 000870 0008AO 000800 000900 000930 000960 00001«»(4 00004FAO 00002986 OA0401FI 00002810 00000000 00000000 00000000 00000000 00000000 5H~8C2C5 06DIF140 FFO~OOOE 00040000 0000020E 00040000 00000000 00010005 00010680 0«»8006BO 068006BO 41BR0017 9S~2A002 4780090C 48A0023A AOOl4510 001A07F8 42ROOOE5 42A0020F 414A88AC 4400A004 90709898 90108200 01C84400 9680AOOO 41100030 41FOOCA2 FIF161Fl F161F6F8 28002800 OOOOFFfF E8401E90 AOA07EOO 1448148E 1574158C 15940010 10000000 00000000 92380190 5880A004 90188030 48800270 000094FO 85B9D20F 85COOIC8 418001C8 45A90064 92200190 181F4860 849CIR22 43201007 00C84230 04634820 020E4322 41455000 lA444144 893895FF 9560020F 47800330 0502A005 10064770 035E92FF 04630200 49308488 47B00378 89300003 40005010 40P092FF 40004220 30029198 30060779 43203000 50164780 05200202 00491009 90988050 18984860 300045A9 4A608424 50600040 4032B91C 00480202 10091009 47F0048C 41100722 457006AO 91020044 47700580 9610B8F4 960388E( 417005~2 95500044 47700678 9~503004 4180076A 92003003 100C91FO 30044770 06484310 95003000 41700678 95FF3002 95fF3002 07879198 30060771 02021000 00410601 10040044 47100700 96203006 96401002 07F90200 07390038 0200073F 4832891E 45700160 41330008 4880024E 91F0500B 41800796 02010044 B5600202 0041B421 080694FO 08379120 100(4710 088C4A60 B9164060 849A0715 00444710 084E9130 00454170 95408904 41800918 95603004 96201002 47F00588 9120100C 45800984 9102600A 411008E( 09009701 09000201 00023000 02070040 60004580 095E41FO 091496FO 095F4830 84840257 000040~8 41~00000 00001974 00002810 00000000 00000000 80000000 00000FI2 41880071 41BR0050 49A0024E 48800270 5890A004 A0045890 96020019 00000000 00871997 19640010 909COIC8 41C88000 07f9909C 45900290 4130001A 68681A23 40004110 02594770 0403AOOO 4A300220 50004260 43228905 03000048 005C9898 47F00514 4190018A 411001(8 41900134 94713006 96801002 B7FC0670 01899198 41100490 95015016 96011004 003A4832 19340729 43805008 92040831 07F69101 60006000 08009102 4180819A 47800856 9502500B 92040000 05884400 84AC84C2 0000FF74 0000282C 8EIA1000 00000000 00002120 00000000 45700128 45100128 41AAB8AC 47F08JIA 4220AOOO A004Q818 82000018 00000000 198E19EF 5R5BC2D6 47F0028C 07F99601 01C841FO 41~0018A 18234140 95081001 038(4284 03E04111 41230008 91F03004 500B9203 48601000 50089(00 90509106 9501~00B 91060045 91390045 91100044 07F99411 9l01100( 4210R7F( 30064180 IB5~4350 47200100 91210044 891E4110 95FF3002 4188R8A( 91090045 10024710 02076000 08374780 95623004 41810010 418008F8 92E60001 09304570 44000086 FFfFFF8C 00002800 0000282C 6200290f 00000000 48170F25 000001EO FF070000 08400000 0000211A 000009F8 00040000 41A088BC 4510078~ 41800138 9640~001 071894F9 02180701 4510B31A 0205B56F. 9140AOOI 411001BO 9010989C 01C88200 00000000 FF050001 00000000 D8E6C50Q 19FOIA04 lA221A26 00020000 0100180r. 5890008C 45A90060 A0004880 027041CR 03089101 002341BO 95000023 41800384 03504130 00101823 41F0040A 472000C6 000001F9 95FF043R 00004910 B48A41BO 05001007 AOOE4780 47808076 41800001 501691FO 30044180 95003000 418004A? 000E4170 04044037 00454770 09E4913F 41800486 9101100C 471009EA 94F0003Q 4770078C91800044 41100~CC 95000044 30069104 3006478~ 4710062E 45100780 41F00648 92FF5008 069C01F9 4832891C 30024145 50001A44 58100040 4B70B424 477005F4 96803006 05740560 950(3001 078147FO 06961871 01F19180 100C4110 478007F6 92040831 08A095FF 3002478r. 00404030 600895FF 08A84186 000C4080 4180B19A 47F008DO 45100994 47F008CO 95FF0219 47800BFB 820009EO 94F3600( 099C47FO 094A4580 4870849A 4B708916 00002798 00000000 20000000 00000000 00000000 00000278 18484190 9120AOOC 02380238 85150C05 02070lC8 00389284 400020A8 E3404040 1A2A38Fl IP680000 4190054C 0OO09SFF 03089500 95230023 47800352 96801002 07891800 03E01H66 00C80403 41488000 B09647FO 9F006000 891(9680 004~4170 41100486 18224320 418005BO 417005(2 06600601 198A4100 43703002 02000689 41448938 58710000 91041002 07819500 43701003 01A6910f 58800040 08069110 30024110 B3Dl4180 91020837 47F00930 41900134 9501600( Oq~f.41FO 4070B49A Ff050r07 749017FF 00000000 01384180 411000E8 9680AOOI 856EB8AC 90086800 B90COZ07 00001000 OOOOFFFF FIFIFIF6 oeoooooo 4840020E AOOF0789 00994780 418000B( lA234220 960CI004 5000B50( 4121000F 10028918 lA444144 04165880 07694060 300601F9 050891AF 45100180 003A4322 96040044 01F90602 10040044 06264190 02003002 003AO~70 4A50024C 05011000 47800~F8 30004133 4C70830E 50084780 12884770 100C4110 08369602 83D84510 47100588 940E0044 928788FC 47100800 05789104 946F3006 40007048 007FE8S7 00000000 ODBC47FO 9250A001 9283AOOO 1BAA0006 90586820 01C8B568 Ou002000 FF150001 00040000 00000000 000806BO 9281AOOO 440003C8 856E0012 90606840 9~90B~CO 80000RSC 00005F41 F8F3F1F6 000018AC 01EOOOOO 00001AC8 44A00234 ~180AOOO 90D0!35DO 481J0G19C 03085890 008CD201 4B600022 1A664866 04634320 100147FO 07F91858 41430002 95FF043B 4780003A 4570B356 18334330 41822000 4870022C 89381858 4A50024C 87F895FF 30024170 04(49120 30064110 473007AE 47F004F2 00440789 40600034 0201B305 80024110 89054832 891C0500 91040219 477005BO 00410041 477006~A 94133006 9180100C 01349601 800047FO 40000200 4000043B 41330008 95013000 58104000 07F7D201 855E4180 06F80501 96043006 95003000 00080706 47F00678 4A100226 92007000 07904180 006041FO 07E69212 08319104 08A04860 B49A4960 08379204 600A9b90 099447FO 08C00300 91010039 47800902 95060044 47800994 47F00660 02050005 91020831 47100930 600~4180 09304180 1B224320 003A4122 0000~F47 62000002 OFOOOF54 00002508 06B006RO 920300Q5 078rl941F 43410007 90686860 820001e8 00000000 00000010 OOOOOOOK 00002188 47100282 0207B5A8 0090020E R51807Fb 040E4720 43540000 4860020E 10079501 43387000 0200043B 03864280 009A9504 5880008C 58600048 83C85070 30010036 95003004 91040044 4710060C 064894F~ 42700438 4720074C 10000046 100088FE 47700618 4842B91C 47F0060C 07900729 30064180 849847BO 30069102 B9041004 47FOO09C 9220600B 600C9706 96021003 066047FO R9054570 I'..) ' ~. c.. en IV .r:: U1 001 002 003 004 005 006 001 008 009 010 011 012 013 OH 015 016 011 018 019 020 021 022 023 024 025 026 021 028 029 030 03.1 032 033 030\ 035 036 031 038 039 040 041 042 043 044 00 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 000 010 020 010 020 030 040 050 060 010 080 090 010 020 010 020 030 040 050 060 010 080 090 100 110 120 130 lito 150 160 010 020 030 040 050 060 010 080 090 100 110 120 130 140 150 03122161 RPGSPI H IPE F 80 80 FINPUT V 132 132 FOUTPUT 0 AA 1 l01 IINPUT I I I I I I I I AOO INVAMT C 01 ADO INVAMT 01 C IP OOUTPUT H 201 OF OR 0 0 0 0 H 1P 0 OF OR 0 0 0 0 1P H 2 0 OR OF 0 0 0 0 0 01 0 2 0 0 0 0 0 0 0 0 D Ll 2 0 0 0 lR T 2 0 0 0 OF REA040 SYSIPT PRINTERSYSLST 29 NAME 3l0MONTH HODAY ]it 380lNVNO 39 430CUSTNOLl 44 450STA TE 46 480CITY 14 8021NVAMT TOTAL 12 GRPTOT 12 8 30 32 TOTAL GRPTOT A C C 0 U N T S R' 53 ' 11 ' E C E I V A B L E R E ' 88 'G 1ST E R' 25 'CUSTOMER' 80 'LOCATION 109 'INVOICE DATE 42 46 19 108 CUSTNOZ NAME STAre Z CITY I INVNO l MONTH Z DAY I INVAMT 'NUMBER 'NAME' CITY ' STATE DAY ' 140 23 53 59 61 19 90 96 109 'S o. GRPTOT B 109 'S 110 'e' O. TOTAL O. 109 'S 111 'ee' INVOICE' INVOICE' CUSTOMER ' NUMBER' AMOUNT' PAGE 0001 RPGOOI RPG002 RPG003 RPG004 RPG005 RPG006 RPGOOl RPC;008 RPG009 RPG010 RPGOll RPG012 RPG013 RPG014 RPG015 RPG016 RPGOI1 RPG018 RPG019 RPG020 RPG021 RPG022 RPG023 RPG024 RPG025 RPG026 RPG021 RPG028 RPG029 RPG030 RPG031 RPG032 RPG033 RPG034 RPG035 RPG036 RPG031 RPG038 RPG039 RPG040 RPG041 RPG042 RPG043 RPG044 RPG045 IV ~ 0\ 0 0 en en '< en rt CD a It:I t'Ij ...,c: ~ CD . ~ t-to w RESULTiNG Cj) ADDRESS RI 11 PI toO ~ . 11 en Cj) c: ...,OJ CD RPGSPI 03122167 SYM80L ::0 -1t:I en CD DOS/360*RPC*V2.LO • 11 0 ~ SAMPLE PROGRAM LISTING (CONTINUED) 11 PI a ~ CD I'd 11 0 ~ 11 PI a "tI PI ~ IV 0 INDICATORS 000011 Of 000085 HO 00008C H7 FielD NAMES ADDRESS RI ADDRESS RI ADDRESS RI ADDRESS RI ADDRESS RI ADDRESS RI 000014 IP 000086 HI 000080 H8 000015 LR 000087 H2 00008E H9 000016 00 000088 H3 000017 01 000089 H4 00007A LO 00008A H5 000078 Ll 000088 H6 ADDRESS FIelD ADDRESS FIelD ADDRESS FIelD 000121 000143 000139 00014!» 000138 0001H NAME STATE ADDRESS LITERAL DAY INVAMT ADDRESS FielD ADDRESS FIELD 000130 000148 000140 00014F INVNO TOTAL ADORE SS LITERAL ADDRESS LITERAL R 000168 000196 000183 INVOICE NUM8ER 0001C3 0001F7 000153 AC C 0 U NT S 00018E CUSTOMER" LITERALS ADDRESS LITERAL - 0001AC INVOICE DATE 0001Df STATE CITY Ll TERALS 0 MONTH CIfY LITERALS HI t-to PAGE 0002 TA8LES ADDRESS LITERAL ADDRESS LITERAL 00020C E C E I V A8 L E R E LOCATION INVOICE --,--/.-- NUM8ER MO DAY ADDRESS LITERAL CUSTOMER AMOUNT 000108 NAME ADDRESS LITERAL ADDRESS LITERAL 000217 000218 MEMORY MAP INPUT/OUTPUT INTERCEPT TABLE IINPUT AND OUTPUT) DETER"INE RECORD TYPE DATA SPECIFICATION GET INPUT RECORD DETAIL CALCULATIONS TOTAL CALCULATIONS DETAIL LINES TOTAL LINES INPUT/OUTPUT REQUEST BLOCKS POINTER LOCATION OF DTF TABLE POINTERS GIS T E R 000220 00021C 000464 000248 00078C 000904 000958 000AD2 00096C 00126C 000018 CUSTNO GRPTOT ...."IJ ~CD SAMPLE PROGRAM LISTING (CONTINUED) ~ I ~ W I ~ (jl en ~ I-' CD ttl Ii o I.Q Ii SlI S ttl SlI Ii rt w o H\ ~ o OOS/3bO-RPG-V2.l0 INPUT/OUTPUT INTERFACE ROUTINES WORK AREA POINTER OVERflOW RYPASS CONTROL lEVEl TlBLEIlSSEMBLE 4) TEST lONE 18CO) OVERFLOW LINES LINKAGE PROGRAM PROGRAM LENGTH 001699 lEND OF COMPILATION' til m ..,.~ g ~ II t:I m 0" ~ \Q \Q ..,. ts \Q ..,. )I Q, en N ~ ..,J RPGSPl 03122167 OOOOEO 001574 OOOACA 00063C OOOBAC 0012AC 0009EA 0013E4 PAGE 0003 "-> .c:- I'Zj 1-/- 00 IQ t1 0 CD en en I< en rt CD ~ . . ~ w a !:tI "0 Ci:l I.Q S1I 11 0 11 S1I § . CD 11 en Ci:l t: 1-/- Pol C\) SAMPLE PROGRAM LINKAGE EDITOR MAP .c:- "0 en ~I-' JOB CD "0 RPGSPI 03/ ..~/61 AtTW'" rAKlN 11 0 1I S T LJ ST LJ Sf I.Q 11 DISK LINKAGE EDITOR DIAGNOSTIC OF INPUT MAP INCLUDE INCLUDE RPGOOl14 RPGOO1l5 IJCFC 110 IJDFYPll FlURY S1I a ...."0 S1I ~ .c:- o HI ~ 0 OU2l1"1 -- PHASE XfR-AD lIJCORE HICORE DSK-AD ESD TYPE LABel LOADED REl-fR PIIA Sf ••• 0033£4 OOZOOO 00H8R ZI) 6 1 CSECT RPGOOI 002000 002000 CSECT ENTRY IJCfCIlO IJCFlllO 0036AO 0036AO OO~6I\0 CSECT ENTRY IJDFYPll I JOfYlZZ 00311 0 003110 003110 .... ""11 ~CD SAMPLE PROGRAM'S OUTPUT . . .p ~ w ~ CIl ~.... CD I'd 11 ~ 11 ~ ACCOUNTS ~ ~ ~ CUSTOMER NUMBER CUSTOMER NAME 10112 AMALGAMATED CORP R E C E I V A8 L LOCATION CITY STA TE H 61 REG I S r E R INVOICE NUMBER 11603 INVOICE AMOUNT I NVO ICE DA TE DAY MO 11 38 . 3. The chain forward and back addresses that allow the programmer to follow the program flow from procedure to procedure. A dummy DSA is built to indicate the beginning of a chain of DSAs when backward chaining. Figure 4.20 shows the dummy DSA. Figure 4.22 gives an example of DSA chaining. 260 DOS System Programmer's Guide Word 1 Content Flags * I AL3(Block Description) 2 Chain Back Address 3 Chain Forward Address 4 Return Address (R 14) 5 Entry Point (R15) 6 Save Area For 18 Registers '0 - 12 19 Invocation Count 20 Regi ster 0 of Call ing Block D,ynamic Storage For AUTOMATIC Data * Flag Byte XIOO I - Dummy DSA X 1011 or X 1811 - ON Entries X 103 1 or X 183 1 - No ON Entries X I05 1 - Library Work Space Figure 4.20. Dummy DSA and DSA Layout Block Description Offset to First ON Entry Static Mask Dynamic Prefix 0123.45·67 Fixed Overflow Size Error Not Used Size "'"'""'--....".-- Conversion "-----it-..,..... Fixed Overflow I:...-...;.;,--........-~- Overflow '"------.........:-..:;;;........ Underflow Zero Divide &....;,.i"--o"':;'- 1..,,----__. . . . .-.;;. . . . ON Entry Word r-----~----~~----~--------~ ON Code 2 Fi Ie Address FI'Ggs 01234567 Pointer to LABEL ON Unit is a GO TO ON Unit is SYSTEM I:...-_---:l~ ON Statement is Not Executed ............_......:O~ Last ON Entry in This Block LABEL Word 1 Word 2· Base Address Invocation Ceunt ON Code X'Ol' X'02' X'03' X'04' X'05' X'Ol>' X'09' X'OA' X'OB' X'OC' X'OD' X'OE' Fi<}ure 4.21. Offset Tol:.abel of GO TO Meaning PrO!1lram Interrupt Overflow Underflow Zero Divide Fixed C>verfl'ow Size Conversion Error Endfile Endpage Transmit Key Exponent Overflow Exponent Underflow Floating Point Divide ()ecimal/Fixed Point Overflow ~ecord Block DescriptieD Section 4: Debu99in9 Aids 261 MAIN •. PROCEDURE OPTIONS (MAIN), . SUB1 •• PROCEDURE, • CALL SUB1 -I- - . L BALR r--'-- END, • L LM BR 15,=V(SUBl) 14,15 r 13,4(13) 14,12,12(13) 14 To STOP Routine :'I~----------------~ Static Storage :I ~------------~~.~ I IL I - IAL3(Block Description) T I- L - .J 'I f T-I I I I I II - I I I- I I I _...J Figure 4.22. --- PROLOGUE -RETURN 13,4(13) L LM 14,12,12(13) BR 14 I I I I I I I~ I __ -1 DSA Chaining DOS System Programmer's Guide DSA SAVLAST ~ I I I Lr ,..- Chain FOlWard A(Next Available Core) Return Register 14 I I I I --T...J I I I Entry Register 15 I·~ I I I h I - Static Storage I Flags \AL3(Block Description) J I I Chain Back A(Call ing DSA) When debugging PL/I problem programs, the programmer must know how to locate the DTF tables. In PL/I, the DTF table has an appendage that precedes the DTF proper and contains a pointer to the DTF (Figure 4.23). The appendage can easily be found because i t is listed as the linkage editor map by filename. Figure 4.24 shows the format of the DTF used by PL/I. A sample program, linkage editor map and core dump are included in Figure 4.25 to aid the programmer in debugging his PL/I problem program. 262 PROLOGUE -- I L Return Register 14 Entry Register 15 -- I IL __ I I_ I USING *,15 14,12,12(13) I- .... STM -- DSA SAVSUB1 Chain Back A(DUMDSA} Chain FOlWard A(Next Available Core} - Static Storage DSA SAVMAIN Flags r RETURN 13,4(13} L 14,12,12(13} LM BR 14 I I USING *,15 STM 14,12,12(13} CALL LAST 15, = V(LAST) L .... BALR 14,15 DUMDSA I LAST •• PROCEDURE,. _-1 I I I I Flags AL3(Block Description' -J Chain Back A(Calling DSA) Chain FOlWard A(NextAvailable Core) Return Register 14 Entry Reg ister 15 Word Contents Word Open Mask 1 2 Flag 1 3 Flag 2 Flag 1 Chain Address 3 Flag 2 Maintenance Word 5 Buffer Address I Record Length TFLl Flag Byte 1 Record Length Maintenance Word 5 Record Add ress 0008- AL3(Disk Address Routine) 7 Print Files Current Line TFL2 Flag Byte 2 TXRR Communications Byte Stream First Time Bit TOPM Open Mask 0 File Closed 1 Input Clear Open Mask Consecutive Transm it Error 2 Output Regional Wrong Length Record 3 Update 00 - Fixed 01 - Variable 11 - Undefined 0 Sti II to Write 4 Update Next Must Be a Read Direct Still to Wait For A Regional File 5 File Has Keys Allow Page Size Sequential 6 File Has No Keys Backwards Unbuffered EOF 7 No Buffers Not End of Chain Address Table Buffered System File Print File Communications Byte 4 6 Relative Pointer Page Size Chain Address 2 4 7 AL3(DTF - T) AL3(DTF-T) Communications Byte 6 Open Mask 8 Number of Records/Track - Regional 1 9 10 11 12 13 Key Bin Bin Head Head C C 14 Number of Tracks 15 C 16 Number of Tracks C C 17 C 18 Number of Tracks Note: Meaning if Bit = 1 Figure 4.23. PL/I Consecutive File DTF-A Appendage Figure 4.24. PL/I Regional File DTF-A SUMMARY OF PL/I DEBUGGING AIDS 1. Register 13 (at the start of the dump) points to a library work space or dynamic storage area. 2. Always chain back from the library work space or DSA to find the active DSAs. 3. The DSA (main) can be located by using the value contained in the COMREG at a decimal displacement 40-43. Adjust this value to a doubleword boundary. 4. If the PL/I error signaled is a program check, use the PSW and registers located in IJKZWSI. This area has a PSW followed by the registers stored RO through R15. 5. The PL/I control program intercepts and tries to handle all errors except machine checks. The control program issues a PL/I error message, and a main storage dump is executed from the control program. Following the dump, PL/I closes all files. If a printed output is produced at the time of error, PL/I prints the last item after the dump is taken. This gives the programmer a ,starting point to the correct area of the failure. 6. PL/I program check error message codes 11 through lE are the same as the interrupt codes 01 -through OE on the IBM S/360 Reference Data card, GX20-1103. Section 4: Debugging Aids 263 7. PL/I error messages point to the approximate location where an error occurred. a. The name of the last PLII transient fetched is at the label 'CIJKS'. To find the labels CIJKS and DISPL (item 9), use register 13 and the chain back fields to locate the dummy DSA (identified by its first byte being zero). Scan backward approximately four fullwords and locate X'OA04' (load instruction). Following the load is X'47Flxxxx', which is labeled DISPL. Immediately following this is CIJKS. (PLII (D) transients are of the format 'IJKSxx' DISPL and CIJKS are in the routine IJKSZCA.) 9. 14. The following language aids are useful in debugging both source and object problems. a. Dyndump b. Display c. Display using the reply option (to halt a program) d. Null labels e. Signal statement (to force dwnp) Note: In multiphase programs, the first four characters of the phase names must be identical and unique to the program. If they are not, either the DSA is overlaid or the DSA may not fit into the available core. The branch instruction that activates a transient just fetched is at the label 'DISPL'. HANDLING COMPILE TIME ABORTS 10. 11. To locate the current file, look in 'WCFL' in the library work space. This contains a request code and pointer to a DTF-A. To find WCFL, use the label IJKZWSI in the linkage editor map. Start in the core dump at that location and scan backward until you locate a full word beginning with X'FE'. The fullword immediately preceding this is the current file address, labeled WCFL. (WCFL is in the routine IJKSZCA.) The following pointers within the control program indicate how far the compiler progressed before the abort condition occurred: 1. Register 12 points to·the start of the control program and is used as the base register. 2. The KSAVEl area contains return registers in the following order: The first word of any DTF-A points to a logical IOCS DTF. R 14 - points to last active routine R 15 R 0 12. The linkage editor map has a CSECT for each DTF-A. R 1 R 2 13. PL/I register usage is as follows: To locate KSAVE1, add X'Da' to the contents of register 12. a. b. 264 The instruction flow base registers in a procedure are 13 (11 and 10) for dynamic storage and 12 for static storage. 3. The data accessing base registers in a procedure are 13 (11 and 10) for dynamic storage and 12 for static storage. c. The instruction flow base registers in a PLII subroutine are 15 and 12. d. The data accessing base registers in a PLII subroutine are 13 and 11. e. The parameter passing registers are 0 through 5. (Register 1 is the m9st commonly used.) DOS System Programmer's Guide The K5PH area (a bytes) contains the name of the phase now in storage. The phase name is constructed in the following manner: PL/lxxxx The las.t four bytes xxxx contain the actual phase identifier such as D75. To locate K5PH, add X'2a4' to the contents of register 12. Exceptions: 000, DOS, 010. During these three phases, the phase name can be located by adding X'10a' to the contents of register 12. If K5PH contains phase C95, the actual phase may be either C95 or Dll. 4. IJKZWSI is valid only if a PSW has been stored there. ~ ~. IQ s: Ii CD . . DOS PL/I COMPILER 360N-PL-464 CL2-0 CHAiN 06/01../66 ~ IV I. EXAMPLE OF THREE EXTERNAL PROCEOURES PASSING PARAMETER *1 U1 "d t"' " 1 2 H CIl ~.... CD "d a IQ 4 - 6 1 "d AI 10 11 ~ 00 ~. ~ t:I CD tr s: IQ IQ ~. ::s IQ > ~. CI en IV 0\ U1 6 9 ~ o g. g 5 ~ HI CIl CD 3 Ii ~ EXAMPLE OF THREE EXTERNAL PROCEDURES PASSING PARAMETER */ /- THIS 15 THE MAIN PROCEDURE IT PASSES (CTR) TO PROC SUBI *1 STAHT.. PROCEOURE OPTIONS (MAIN),. DECLARE INCARD FILE INPUT RECORD ENVIRONMENT (F(7~) MEDIUM (SVSIPT,2540», OTCARD FILE OUTPUT RECORD ENVIRONMENT (F(80) MEDIUM (SVSPCH,2540», CARDIN CHARACTER (15), I CARDOUT, 2 FIRST15 CHARACTER (15), 2 SECCTR PICTURE '9QQ99',. DECLARE CTR PICTURE 'Q9999',. OPEN.. OPEN FILE (INCARD),. OPN.. OPEN FILE (OTCARO),. C.. CALL SURIlCTR),. READ.. REAU FILE ([NCARD) INTO (CAROI~),. ONE.. ON ENDFIL~ (INCARD) GO TO END,. FIR.. FIRST15-CAROIN,. SEQ.. SEQCTR=CTR,. WRITE.. WRITE FILE (OrCARO) FROM «(ARDOUr),. CC.. CALL REPEAT (CTR),. GOTO.. GO TO READ,. END.. CLOSE FILE lINCARO),. ENOl.. CLOSE FILE (OTCARD),. END,. /* 12 13 14 15 16 PAGE 001 II.) ~ ~ 8CIl CIl '< en rt In a ttl 11 0 \Q "zj s: 11 In . II.) S Y U'I , ttl t'"I t-t CIl QI In 11 In en en a ~ ttl \Q ~ B 0 L STAHr INCARD OTCARO CARDIN CARDOUT fIR S T15 SEQCTft erR UPEN llPN 0102 0100 0101 0106 0105 0104 0103 0101 0108 0109 ~EAD c 010~ ~ - rlR 010B 010e 0100 ttl ~EIJ OlOE ft~(TE 11 rt ee OIOF 0110 ~OTO Olll II.) t""O ENOl SU81 f{EPEAT 0112 0113 0114 0115 s::: 11 Q. ~. 360N-PL-464 CL2-0 Ct1A I;" , PAGE 002 06/06/66 .r= i In DOS PL/I COMPILER . .e . .' ~. \Q QI 0 H\ ~ O~E co DOS Pl/I COMPILER TAB L E 00 0.1 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 01 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ENTRY STRUCT. STRUCT. STRUCT. ENTRY ENTRY 360N-PL-464 CL2-0 LISTING ARITHM» DECIMAL FLOAT FILE FILE STRING ALIGNED CHAR. 1 PACKED 2 STRING CHAR • 2 PICTURE OECI~AL FIXED PICTURE OECIMAl FIXED LABEL CONST. LABEL CaNST. lAREl CaNST. LABEL CONST. CaNST. LABEL LABEL CaNST. LAREL CONS T. LABEL CONST. LABEL eONST. LABEL CaNST. LABEL CaNST. LAREL CONST. ARITHM. DECIMAL FLOAT ARITHM. DECIMAL flOAT L.HAIN INTERNAL NAME OfFSET TYPE MODULE OFfSET 0102 0105 0106 0107 0114 0115 0034 0148 00f4 013F 0058 0064 STATIC AUTOMATIC 000114 AUTO~ATlC AUTOMATIC STATIC STATIC 000138 000144 [:'XT EXT EXT 6 75 75 5,0 5,0 AUTO~ I~T AUT OM. INT [NT INT AUTOM. INT INT INT INT INT INT I N,T (NT (NT (NT 6 6 06/06/66 OFFSET TABLE INT (NT INT EXT EXT PAGE 003 ~ 1-" ~t1 (I) . I . DOS PLI I COMPILER CHAIN 360N-PL.-"6" Cl2-0 05/02161 PAGE 00 .. ~ t-.,) LaC. OBJECT coDe 000000 000002 000002 00000" 000008 OOOOOC 000010 000012 00001 .. 000018 00001A OOOOIE 000020 000021 00002 .. 000028 00002e 00C030 COOO 32 000038 00003(, 000040 0000 .. 2 0000 .. 6 oaOO .. A 00C04e OOOOSO 00005 .. 0000S6 00005A 0OO05E 000060 000064 000068 00006e 000010 000012 OOC016 00001A 000080 000084 000088 00008C 000092 000098 00009C OOOOAO 0000A4 OOOOA8 OOCOAA OOOOAE OSFO LABEL OPe OPERANDS BAL • L' 0102' BEGIN BCR BAL DC L LR LR L BALR LA BALR DC DC F,O PRCt.OGUE OF BLOCK 01 0,0 E,X'OOA'CF) ACN'FFFF') A (STATIC STORAGE) C,X'OOO'CEt 9.F REG 9 ALSO USED AS BASE REG 3,1 NO MEANING IN A 'MAIN' PROCEDURE DSA I NITfAl/ ZE F,N'OOII' =V (IJKSZCM) E,O E,X'OOE'IEt 1,f X' 01' DSA 'FLAG BYTE' AU.CN'01l6t) AL3 (~LOCK DESCRIPTION) LENGTH OF OSA OF BLOCK 01 ENTRY POINT MQVE I • X' 044 ' CC) =A (E NTRY POI NT TABLE) F.N'0016' =V (IJKSZlM) E,F IN If NE PROLOGUE X· 050' C04,oJ, X '000' C3) NOT USEFUL IN A 'MAl N' PROCEDURE OPEN FILE (INCARD), . I ,X' 0 10' CC) A \FllE NAME) f,N'0018' =V (JJKTOPM) 'OPEN' E,F OPEN FILE (OTCARD),. 1,X'011t' CC) A (FILE NAME) F ,N' 00 18' =V (JJKTOPM) 'OPEN' E,F CALL SUB1 (CTR),. E,N'OI07' REG 14 = ADDRESS OF 'CTR' E,E,X'OS8'(0) 0,0 F,N'0114' =V (SUB1) I,X'058'CO) E,F READ FILE (I NCARD:l INTO (CARDIN) 1,N'0106' REG 1 = ADDRESS OF 'CARDIN' 1.X'020'CC) STORE 1 TO 'WORKAREA ADDRESS' OF 'CONTROL BLOCK' I,X'018'((.) REG 1 = ADDRESS OF 'CONTROL BLOCK' F,N'0038' =V (JJKTCBM) 'TRANSMITTER' E.F ON ENDFILE (INCARD) GOTO END,. 2. N' 0116' REG 2 = ADDRESS OF BLOCK DESCRIPTION 2,X'000' (2) INCREMENT REG 2 TO POINT AT 'ON' ENTRY X'060' (02,C) ,X'OItS' (0) MOVE DSA INVOCATION COUNT TO STATIC STORAGE 5,X.OSC'CC) lA 5, o-A (STAHT) 5,X'004' (2) STORE REG 5 TO 'ON' ENTRY X'004' (2),X'S8' RESTORE FLAG BYTE IN 'ON' ENTRY FIRST 75'~ CARDIN, . N'OIOS' (4B),N'010o' SEQCTR:· CTR, . N'010S'+4BCOS),N'0101' WRITE FILE (OTCARD) FROM (CARDOUT),. I,N'OIOS' REG 1 = ADDRESS OF 'CARDOUT' l,X'02e' (C) STORE REG 1 TO 'CONTROL BLOCK' 1,X'024' (C) REG 1 = ADDRESS OF 'CONTROL BLOCK' f,N'003a' =V (JJKTCBM) 'TRANSMITTER' E,F CALL REPEAT (CTR), . E,N'0101' REG 14::: ADDRESS OF 'CTR' E,E,X'OSS' (D) VI ~ ~ t-I en ~ I-' (I) ~ t1 0 I.Q t1 ~ to SlI t1 rt W 0 H\ ~ co en (I) n rt 1-" 0 t:I ~ 00 C (I) tr s:: I.Q I.Q 1-" t:S I.Q >' 1-" 0.. en t-.,) 0\ -.J STAHT.. 0100 .. SEO FOOA OOOOOOEO 58CO EOOO 189F 1831 58FO COS .. OSEO .. lEO EOOE OSIF 01 000110 00000198 .. 110 eO .. 4 5afO COSO DC LA L BALR aSH 0203 OOSO 3000 4110 COlO OPEN •• L'010S' S8FO CO .. C OPN .. l'0109' c.. . L'010A' LA L BALR LA L BAlR LA l"OIOB' LR L LA BALR LA OSH .. 110 C014 S8FO OSEF 41EO o13F 90EE 0058 lBOo 58fO.COS8 .. 110 0058 OSEF .. 11000F.. 5010 C020 .. 110 C018 S8FO COItO co .. e READ .. STM ST OSH 4120 4A20 0201 4150 S050 9288 024A 0204 4110 SOlO Itll0 58FO OSEF 41EO 90EE C030 ONE .. 2000 C060 0048 case 2004 2004 01lt8 oOflt FIR.. 0193 D13FSEQ.. 0148 WRITE .. e02C C021t C040 013F 0058 14VC cc.. L'010C' LA L BAlR LA AH MVe LA L'0100' L'OIOE' l'010F' ST MVI MVC MVC LA ST l'0110' LA L BAlR LA STM N G\ ....tsj t:1 ~ en •N Q) g '< CD (1- m J t'it i . (I) OOS Pl/l COMPILER ~ . U1 , ·to t-4 en I t.t!S .... (I) lOC. 000082 000084 000088 00008C 00008E 0000e2 0000C6 OOOOCA OOOOce 000000 00'00'04 ti)t 000006 00 00.0 A OO:()0 O'E CQ \Q OOO:OEO ~. I OOOOEO 11 CD a: QI (0 360N-Pl-464 Cl2-0 05/02161 CHAIN PAGE 005 (I) to ., Q -l to c+ ~ Q H\ .... Q) OO(),OEC OOOOofO OO'()Ofl OOOO'f4 OOOOfS 000,OF8 OOOOF9 OOOOFC 000 "00 0!OOI'()'4 000105 0{)0'l08 000"OC OO'OllO oe,0114 00'9118 000119 eO'OlIC O,etH20 LA8El OPe OPERANDS 1800 LR 0,0 S8FO C064 4110 0058 OSEF 41FO 90SE 4110 COlO S8FO C048 O.5·EF 4110 C014 L LA 8'ALR F,N'OIIS' =V (REPEAT) I,X'OSS' 'D) REGl POINTS AT A (CTR) 8C F,N'OIOB' 1 ,X' 0 10' '·C) =A (lNCARD) F ,N'0019' =V (IJKTCLM) 'CLOSE' GO TO READ CLOSE FILE (lNCARD),. I.X'014"C) F,N'0019' E.f O,X'004'CO) 'REG 13=A(DUMMY DSA) CLOSE FILE (OTCARD),. 08JECT CODE ~fO GOTO •• END .• L'Ol1l' l '01,12' END 1 •• L'OII3' C048 00,0;"28 REG 14 == TERMI NATION A (STOP ROUTINE) F.E S TA T r.e s reR.G.E X'Oe0030004000S000' DC ~'()0007000' L' 0,00,6' ODe L'OllO' DE 000000 80 000'000 5·8 0000&0 0000004'8 0000000,0 23 000000 0000:0'05.0 000,00000 0008'OaF8 0000009·2 O.A 00090'9 80000000 00·000000 8F 000000 00000000 OOCOOOOO o,a-ol,O E,C,X·'OO.C' (0) ae 80 00000000 00000000 0000000'0 0000000·2 OOOOOlleO OCil013C 000140 000144 O(Wl48 l'FFFF' L'0004' 00003,,00'040005000 60007'0,00 00000:000 IHl0130 oa0138 LM 8'CR E,F 'END eF Bl.eeK 000l2t 0'()0134 &ALR LA L 8A'lR l OS£F 5,800 0004 98.eC oooe 07'FE a.Q.O·ll4 00'·0--124 oeO'125 LA L E,F Doooeooo L "0 l'1E' l ' 011,F' L'012'0' a.e DC DC DC ac DC ue ~'&O· Vl3'CN'OleO'» x'8'0' VL3tN'0101') x • S8 ' READ I NiO aE Vl.nN'OH)O'» FILE ADDRESS X'0000004B' DATA LENGTH X' 00'000000' ADDRESS OF WORKAREA ,)('23' ge V~3(N'0101" DC x'oooaoooo' De L'O 11,6' L'Ol().2" X' 0·0000000' ADDRESS INCREMENTS USED WHEN DATA OR BRANCHING IS FURTHER THAN 4K FROM BASE REG ge x'OOOOOOSO' X' 0(10800F8' . BLOCK DESCRI·PTION A , N' (».J 02' ) , X'S,.' 'ON'ENrRY aev,uc N' ~H00 ' ) Be BC ae x'sooooeoo' L'0038' ac' ViN' 0038' » L'OOOS' L'SQ3l' at X" IilC x'aF' EN'TRYPOINT TA8LE BIT 0 =1 MEANS 'LAST ENTRY' L' 001,9' l ' 0018·' L'0016' L'OOll' l ' 0 114' L'(H1C' &C Be DC DC DC VL3cN'a'03P) Be '.HN' 00·1 9' V Ht'00'18' VI'N' 0,016 ' VI N' 00 11 ' v 'N "0 114' AIN" 0 l02 ' ac De ) ) » ) J ) x 'ooooooeo' 2 BYTES - INVOCATION COUNT NEXT 2 BYTES 'GOTO' ADDR tN 'ON' ENTRY BC VIN'Ql1S') 0000000000000000 ll"a llS' L'eDOI' DC X 'OOOOOO·0.oeo.oooooo' , FFFFFfFFFFFFfFFF L'~H)02' DC X 'FFFFFFFFFFfFFFFF' I':I:j ""~ ~ DOS PLII COMPILER 11 360N-PL-464 CL2-0 ChAIN 06/06/66 PAGE 006 (;HAIN 06/06/66 PAGE 001 06/06/66 PAGE 008 CD . ~ LOC. OBJECT CODE LABEL OPe OPERANDS 000158 OOO15C ac OOfEFFFF L'OOO" LIOOOB' DC DC END X'OOFEFFFFI X'OC' IV V1 • ~ ~ I-t en ~ I-' DOS PLII COMPILER CD 360N-Pl-464 CLl-O I'd 11 0 SYMBOL 11 V1 INCARD I JCFllZO IJKTXCf OTClRO I JCFlOl4 STAHT I NCAItO OTCARD 0 SUB1 REPEAT TYPE ESIO AOOR LENGTH SO 0001 0002 0003 0004 0005 0001 0002 0003 0004 0005 0006 0001 0008 0009 OOOA 0008 OOOC 000000 000098 000000 OOOOFO 000000 000160 ~ ~ ~ PI 11 rt 1"1\ .... (X) IJKSICA IJKSICM I JKSllM IJKTOPM IJKTCLM IJKSYSA IJKTC8M m (1) l:S .. ~ t:I ~ ~ ....l:S ~ ~ ~ ""g, en IV 0\ \D ER SO ER SO ER ER ER ER Elt ER ER fit ER ER ER DOS PL/I COMPILER o("t ""o fit 8LOCK 01 LENGTH OF OSA 0198 ESIO 360N-PL-464 CL2-0 BLOCKTABLE EXTERNAL SYM80l TABLE CHAIN to.) o"'"' g CJl ~ 'rt ~ "C a I.Q ~ "", ~ -= •to.) ~ Q, - "", EXAMPLE OF THREE EXTERNAL PROCEDURES PASSING P~R~~ETlR ./ /_ THIS PROCEDURE ACCEPTS (CTR) ZEROES lION THE FIRST ENTRY -I I. THEN PASSES IT TO PROCEDURE 'lAST' FOR !HCREMENTING ~I /. ON SUBSEQUENT ENTRIES THIS PROCEDURE ONLY PASSES {erRl TO 'lAST ·1 SUBl.. PROCEDURE (CTR),. DECLARE CTR PICTURE '999QQ',. CTR=O,. CT •• CALL LAST (CTR),. Cl •• RETURN,. RET •• ENTRY (CTR), • REPEAT •• CALL LAST (CTRt,. CC •• RETURN,. R•• END,. END •• 1 2 en I.Q PAGE 001 06/06/66 CHAIN I. H ~ 3bON-PL-464 Cl2-0 EXAMPLE OF THREE EXTERNAL PROCEDURES PASSING PARAMETER ./ •'-" I. CD ,. CD ~..... en DOS PL/I COMPILER 11 ) It 5 6 CD 1 "tI 8 'I a 11 ~ "C DOS PL/I COMPILER ~ ~ S Y MB 0 L 0\ o 0100 0101 0102 0"103 0104 010') 0106 0107 0108 0109 ~UBI loft CTR CT CL KEf ;{EPEAT ~ (X) CC j( END LAST DOS PL/I COMPILER .- 00 01 01 01 01 01 01 01 01 01 TAB L E LISTING 0 ENTRY 1 AR ITHM. PICTURE LABEL LABEl LABEl AR ITHM. lASH DECIMAL FLOA T DECIMAL FIXED CONST. CONST. CONST. DECIMAL flOAT CONST. LABEl CONSf. LABEl CONST. 61NARY 1 1 1 0 ENTRY 1 1 1 1 ENTRY 3bON-PL-4b4 CL2-0 AR ITHM. ChAIN INTERNAL NAME OFFSET TYPE MODUL E OFF SE T 0100 0101 0105 0109 0014 STAT IC AUTOMATIC STATIC STATIC OOOODe 00~8 0018 0010 OOOOEO OOODE8 'PAGE 06/06/66 CHAIN 360N-PL-464 Cl2-0 F T XED 6 '>.0 002 EXT PARAM. iNT INT 6 INT INT FXT fNT INT INT 1.5 06/06/66 OFF SE T TA BLE ['XT PAGE 003 ~ ...."zJ ~ DOS PL/I COMPILER (1) ~ • . N U'I ttl ....\: en ~.... (1) ttl a ~ t1 ~ ttl ~ t1 r+ ....a 0 HI ~ co en (1) n r+ .... g ~ 0 (1) tr ~ .... ~ ~ ~ .... )I Q, en N ....a ~ LOC. 000000 000000 000004 000008 OOOOOC 000010 000012 000014 000018 OOOOU OOOOIE 000020 000021 000024 COO028 oOO02E 000014 000038 00001E 000041 000046 00004' UOO04t 000050 0000'.)4 0000S6 00005A OOOOSE 000060 000064 000068 oa006C 000010 000014 000018 00001' DOODlE COO080 000082 000086 .000088 000089 00008C 000090 000096 0OO09C OOOOAO 'JOOOA4 OOOOA8 OOOOU OOOOAE 08JECT COOE 90EC OOOC 4ljEO FOOC 000000C8 58CO EOOO 189F 1831 58FO COIC 05EO UEO EOOE 051F 03 000008 00000100 0203 0058 0203 0050 '.)860 0058 0204 6000 58'.)0 0058 41EO 5000 90EE 0060 1800 58FO C020 4110 0060 05EF 5800 0004 98EC DOOC 07FE 47F0 909C 90EC OOOC 45EO FOOe 000000C8 S8CO EOOO S890 C014 1831 S8FO CalC 0700 OSEO 4lEO EOOE 051F 03 000008 00000100 0203 0058 0203 0050 5860 0()58 41EO 6coo 90EE 0060 1800 58FO C020 4110 0060 360N-PL-464 CL2-0 CHA LA8EL OPe OPERANDS L'OIOO' BEGIN STH BAL DC L LR LR L BALR LA BALR DC OF 8LOCK 01 e,c,X'OOC'(O) E,X'OOC'(F) A(N'FFFF') e,X'OOO'(E) 9,F DC 3000 ]004 L'OlO2' CO 30 L'0103' DC MVC MVC l MVC L LA SUI l~ lO, 0104' l'OU2' l'Ol05' L LA BALR L LM BCR BC STH BAL L'01l4' 1000 3004 L'Ol06' DC L L LR L BCR 8ALR LA 86lR DC DC DC folVC MVC L LA STM LR L LA l~ 3.1 F,N'0012' E,O E,X'OOE'(E) 1, F X'D]' AL3eN'010A') LENGTH OF OSA OF BLOCK 01 N'0101'(04),X'OOO'I3) X'050'(04,01,X'004'(3) b,N'OlOl' X'OOO'(05,6),X'030'CC) 5,~'010I' E,X'OOO'(5) E,E,X'060'IOI 0,0 F,N'Ol09' 1,)('060'ID) E,F D~X'004' (0) E,C,X'OOC' (01 F,E F,N'Ollt' E,C,X'OOC'CD) E,X'OOC'Cfl AIN'FFFF') C,X'OOO'(E) 9,X'024'CC) 3,1 F,N'0012' 0,0 EtO E,X'OOE'(E) l,F K'03' AL1CN'OlOA' ) LENGTH OF OSA OF BLOCK 01 N'0101'(04t,X'000'(31 X'050'(04,0),X'004'(3) 6,N'0101' E,X'OOO'(6) E,E,X'060' (D) 0,0 F,N'0109' I,X'060'CO) 06/06/b6 PAGE 004 N ..., N ~ en '< en rt (D a ttl 11 0 \Q 11 III § . (D 11 en G'l ....dg, tD ....IlIj ~ DOS Pl/l COMPILER 11 360N-PL-464 CL2-0 CHAIN C6/06/66 PAGE 005 06/06/66 PAGE 006 06/06/66 PAGE 007 (D . .c:: LOC. OBJECT CODE til 000082 000084 000088 OOOOBC OOOOBE 0000C2 0000C6 0000C8 05EF S800 98EC 01FE S80t) 98EC 01fE (D 0000C8 0000300040005000 60007000 00000000 000COOF8 00000000 00000064 N U'I , • .~ t-I ~.... ttl OOOOO~ a 000008 OOOOOC OOOOEO OOOOE4 0000E4 00OGE8 oooeEC OGOOFO UOOOFB 000100 \Q 11 ~ ~ III 11 rt co 0 t"h LABEL 0004 OOOC .l' 0101' 0004 OOOC l'0108' L'FFFF' L'0004' l'0006' l'OlOA' L'OIOO' L'0105' L'OOOS' L'OOIZ' L'Ol09' L'Olll' l'OOOI' L'ooel' L'OOOA' L'OOOS' L'OlOC' 00000000 00000000 00000000 0000000000000000 FFFFFFF~FFFFFFFF OOFHFFF ooalO~ oc 000105 FOFOFOFOFO - OP • OPERANDS BALR L LM BCR E,F D,X'004' (0) E,C,X'OOC'CO) FtE D, )(1004 ' (0 ) l LM E,C,X'OOC'CO) F,E BCR END OF BLOCK STATIC STORAGE DC X'0000100040005000' DC X'60001000' DC X'OOOOOOOO' DC X'OOOCOOFS' DC AIN'OlOO') DC ACH'QI05') X' , DC DC VCN'OOIZ') DC VlN'0109') DC ACH'OIOO' » DC X'OOOOOOOOOOOOOOOO' DC X'FFFFFFFFFFFFFfFF' DC X'OOFEFFFF' DC X'OC' DC X'FOFOFOFOFO' END ~ co DOS PL/I COMP~LER SYMBOL SUBl REPEA' LAST I JKSlCN TYPE ESID ADDR LENGTH SO 0001 000000 000064 000110 LD ER ER 0002 000] DOS Pl/l COMPILER BLOCK 01 ~ ]60N-PL-~64 LENGTH OF OSA 0100 CL2-0 ESID ChAIN EXTER~AL SYMBOL TABLE 0001 360N-PL-464 Cl2-0 BlOCKTABLE CHAIN .... t'Zj ~ DOS Pl/f COMPILER ~ ~ 1 .'" ,* EXAMPLE Of THREE 360N-PL-464 CL2-0 EXT~RNAl CHAIN 06/06/66 PAGE 001 PROCEOURES PASSING PARAMETER */ '*'a THIS PROCEDURE OF THREE EXTERNAL PROCEDURES PASSING PARAMETER -I INCREMENTS FIELD (CTRI AND PETURNS IT VALUE -I IJ1 EXA~PLE LAST.. 1 I'd 2 ~ H ) en It ~ CT •• RET •• END •• 5 PROCEDURE (CTR),. DECLARE crR PICTURE 199999 1 ,. CTR=CTR+l,. RETURN •• END •• ~ CD I'd a DOS PL/I COMPILER \Q 160N-PL-464 CL2-0 CHAIN 06/06/66 PAGE 002 11 ~ ttl PI ~ ID TAB L E S Y MB 0 L 0100 0101 0102 0103 0104 LAST crR CT RET END 00 0 ENTRY 01 01 01 01 1 1 1 1 LIS TIN G AR ITHM. PICTURE LABEL LABEl LABEL BINARY FIXED DECIMAL FIXED CONST .. CONST. CONST. 15 5.0 EXT PARAM. INT INT INT INT o H\ .... 00 DOS PL/I COMPILER en ~ o .... rt g ~ 00 t:I ~ c: \.Q \.Q .... = \.Q ....Qt )I en ..., N W 360N-~L-464 CL2-0 CHAIN INTERNAL NAME OFfSET TYPE MODULE OFFSET 0100 0101 0014 0058 STATIC AUTOMATIC 000091t 06/06/66 OFFSET TABLE PAGE 003 I\J .....J .1= t::I 0 CIl en '< en rt CD S . "'Ij ~ \,Q c:: ,~ . VI ~ ~ ... CIl III III ~ . en CD 11 Cil c: ~. Q. CD CL2-0 CHAIN Lot. OBJECT CODE LABEL OPe L'OIOO' BEGIN OF BLOCK 01 E,C,X'OOC'IO) E,X'OOC'IF) AIN'FFFFt"J e,X'OOO'IE) 9,F 3,1 F,N'OOl2' E,O E,X'OOE'IE) I,F X'03' AL31N'Ol05" LENGTH OF OSA OF BLOCK 01 N'OlOl'C04',X'OOO'(3) X'050'(04,D),X'004'C3) 6,N'tHOI' X'OEO'13,O),X'000'(S,6) X'060'CO,O),X'03S'Cl,C) X'060'CO,D),X'OEO'C},n) X'OE8'(4,01,X'060'(0,DI N'OI05'+2,X'F9! X'070'C},O),X'OE8'(4,O) N'OlOS'+2,X'FS' 6,N'OI01' X'000'(5,6),X'070'C3,0) 01 X'004'(6),X'FO' L O,X'004'COI lM E,C,X'OOC'WI BeR F,E l D,X'004'CO) lM E,C,X'OOC'CO) F,E BeR END OF BLOCK OPERANDS I\J \,Q 11 36ON-PL-~64 CD ~ 11 0 DOS PL/I COMPILER 11 ~I-' CD ~ 11 0 \,Q 11 ~ I'd III 11 rt ~ 0 0 HI ~ Q) 000000 000000 OOOOO~ 000008 COOOOC 000010 000012 00001~ 000018 OOOOlA OOOOIE 000020 000021 00002~ 000028 OOOD2E 00003~ 000038 00003E OOOO~~ OOOO~A 000050 000054 000054 00005E 000062 000068 00006C 000010 00007" 000016 OOOOlA 00001E 000080 GOO080 COO08C 000090 000094 000098 000098 0OOO9C UOOOAO OOOOA8 000080 000084 000085 90EC OOOC FOOC 00000080 5BCO EeOO 189F 1831 58FO C018 05EO 'tIEO EOOE 051F 03 000090 00000110 0203 0058 0203 0050 5860 0058 F224 DOEO F8FO 0060 FAF2 0060 F83F DOE8 92F9 C012 F823 0070 92F8 C012 5860 0058 F342 6000 96FO 6004 5800 0004 98fC DOOC 01FE 5800 0004 98fC DOOC 01FE STM ~5EO 3000 3004 L'OlOZ' 6000 C035 DOEO 0060 DOES 0070 000030004000S000 60007000 00000000 000800f8 00000000 L'OIO)' l'O104' L'FFFF' L'OOO4' 00000000 L'0006' L'OlOS' l'OlOO' l'OOOS' l'OOIZ' 0000000000000000 FfFfFFfFFFfFFFFF OOFEFFFF OC IC L'OOOl' L'oe02' L'OOOA' L'OOOS' L'OI07' BAl DC L lR lR l BALR lA BAlR DC DC DC MVC MVC l PACK lAP AP lAP MVI lAP MVI l UNPK STATIC STORAGE X'0000300040005000' X'60007000' X'OOOOOOOO' X'OO0800fB' A(N'OIOO' ) DC DC DC DC DC DC nc OS De DC DC X, , V(N'OOlZ') ClOOO4 X'OOCOOOOOOOOOOOOC' X'FFFFFFFFFFfFFfFF • J('OOFEFFfF' DC X'OC' DC X'lC' END 06/06/66 PAGE 004 ..,. ~ ~CD . . DUS Pl/l COMPllE~ 160N~Pl-4b~ Cl2-0 CHA I ~~ Ob/Ob/b6 PAGE 005 06/06/66 PAGE 006 ~ N VI SVM80L TYPE ESIC AOOR LE~CTH SO 0001 0002 000000 000088 LAST ·1 JKSlCN ER ESJQ EXTERNAL SYMBOL TASlE ~ t-I en ~.... CD DOS Pl/l COMpILER BLOCK LENGTH Of OSA 360N-Pl-464 el2-0 ChAIN 8l0CKTABlE "d a 01 0110 \Q 11 ~ "d S» 11 rt ~ ~ o I'tI ~ co en CD ~ ..,. g .. ~ ~ g \Q \Q ~. \Q ..,. )I c. en N o,.J VI JOB COMPILE 06/06/66 ACTION TAKE" MAP PHASE CHAIN,S LIST AUTOllNK IJCFlllO AUTOllNK IJCFl014 LIST AUTOllNK IJKSYSA· LIST LIST AUTOllNK IJJCP1N AUTOllNK IJKSlCA LIST AUTOllNK IJKSILM liST AUTOllNK IJKTCBM LIST AUTOLINK IJKTXCF LIST ENTRY LIST LI ST DISK LINKAGE EDITOR DIAGNOSTIC OF INPUT I\,) " ~ t! 0 CI.l CI.l '< en rt ..,. !ozj I.Q s:::: LOCORE HICORE DSK-AD ESD TYPE LABEL LOADED REL-FR 002190 002000 00301F 30 1 1 CSECT INCARD 002000 002000 U'I CSECT IJCflllO 002488 0024B8 IJKTXCF IJKTXCR IJKTXCW 003008 003030 003042 003008 I'd CSECT ENTRY • ENTRY • 1-1 eSECT OTCARO 0020AO 0020AO CSECT IJCFlOl4 002508 002508 ....ro CSECT STAHr 002190 002190 ttl CSECT ENTRY SUBl REPEAT 0022FO 002354 0022FO CD . . ~ I\,) CD a ttl 11 0 I.Q 11 ~ ~ CD . 11 en PHASE XFR-AD 11 ~ CI.l ~ "0 11 0 06/06/66 CHAIN (j) I.Q s:::: 11 CSECT IJKSlLH 0020AO 002040 ~ - CSECT IJKSYSA 002580 0025BO ..,. p" ro I'd CSECI IJKTC8H 0020EO 0020EO 11 rt CSECT LAST 002400 002400 ~ I\,) eSECT ENTRY ENTRY ENTRY ENTRY • ENTRY • ENTRY ENTRY • ENTRY ENTRY ENTRY I JKSICN IJKSlCA IJKSlCH IJKTOPH IJKTCLH IJKSlCI IJKSlCP IJKSZCS IJKSlCT IJKlWSA IJKlWSI 002158 002988 002990 00298A 0029C6 0027E6 00291A 002816 0029AC 002A20 002844 002758 CSECT • ENTRY IJJCP1N IJJCP3 002680 002680 002680 ~ 0 H\ ~ co t'I:j ~. ~t; (1) . . FLOATING POINT REGISTERS I\J U'1 I'd ~ H en ~ I-' CD I'd a \Q t; ~ ~ PI ~ ~ w o H\ ~ 00 en CD C'l rt ~. o t:S .r= ~ ~ c:: \Q \Q ~. t:S \Q )I ~. 0.. en I\J ..,J ..,J o 0000000000000000 .r= REGO REGS 40-CSW 00003218 00002000 KEY-DO 1E0024l0 00002400 ADDR-002040 EXTERN~L PSW COrtTENTS r 1 ELD FORMAT-OLD 18 BIT-lll11111 SYSTEM MASK PI{OTEC TlON KEY HEX-O AMWP BIT-alaI PHERRUPT CODE HEX-OOOO INSTR LENGTH DEC-O CUNDITION CODE DEC-O PROGRAM MASK BIT-OOOO HEX-OOOOOO INSTR ADDRESS 4C-UNUSED-OOOOOODO 000022A8 00002000 2 0000000000000000 00003218 00002000 STATUS-0000I00000000000 00002270 00002480 COUNT~OOOOOO INTE~RUPT SUPERviSOR CALL -NEW 58 -OLD 20 -NEW 60 -00000000 -11111111 -00000000 -0 -0 -0 -0101 -0100 -0100 -0000 -0000 -0000 -0 -0 -1 -0 -0 -0 -l1ll -0000 -1110 -DOOGCD -0024CA ·-000B02 50-TIMER-FE9912FF 4 0000000000000000 000022ce 00003318 OOOO.3lBF 00002428 4R-CAW PROGRAM CHECK -NEW b8 -OLD 28 -11111111 -00000000 -0 -0 -0100 -0101 -0000 -0007 -3 -0 -2 -0 -0000 -1110 -00OC94 -0021t8A 54-UNUSED-00FFB342 KEy-aD 6 0000000000000000 00.0010DO 000021'>8 ADDR-OO?018 MACHINE: CHECK -OLD )0 -NEW 70 -01011011 -00000000 -0 -5 -1011 -0000 -(2C5 -0000 -3 -0 -0 -1 -0110 -0000 -OlF340 -0008F4 INPUT/OUTPUT -NEW 18 -OLD 38 -11111111 -00000000 -0 -0 -0100 -0101 -0000 -oooc -0 -2 -0 -0 -0000 -1110 -000206 -D024CA ~ ...., 00 "iI ..,0 ~ t1 8en (I) en ~ . rt ,f:: U1 ~ .... ~ til i. ~.... Gl ~ Q, ~ t1 en ~ ..,0 (I) I _. ___ ._ ~ .________ . ___ A(BUFFER) 00002050 BUF~NGTH START OF OTF oeOOOOOI TABLE 004 048 0008000 002020 00002038 00002040 00002488 02810202 00003008 02002050 20000048 002040 47000000 47000048 00000000 00000000 00002050 BUFFER C940('104 40e140C4 CIE)CI40 C3CID9C4 5C5C5C5C 5C5C5C5C 5C5C5(.5C 5C5C5(.01 Cl\34780 ~ I 002060 TO THE NEXT LINE ADDRESS CONTAINS 5C5e5C5e t\1 t\1 t1 o k ~___ ._ ~ (I) a b REMAIN IN OTF-A 'INCARO' 002000 002080 0020AO 5C5C5C5C 5C5C5C5C OTF-A 'OTCARO' 22002088 01002000 5C5C5C5C 45100050 10000000 00002140 00500050 00008400 04000002 0020CO 000020EO 00000000 00002508 04904141 00002140 40404040 01004100 00000040 0020EO 41002140 20000050 010020FO 20000050 40404040 40404040 40404040 40404040 5(.5(.5C5C 5('5C5C5C 5C5C5C5C 5C5('5C5C 58eOEOOO (I) t\1 002100 TO THE NEXT LINE ADDRESS CONTAINS 40404040 a 002140 t1 002160 TO THE NEXT LINE ADDRESS CONTAINS 5C5('5C5(' - 002180 0021AO :+ 0021CO t\1 Sl.I ~ ,f:: o H\ ~ 00 C940CI04 40C140C4 CIE3(.140 (.3(.109(.4 5e5('5('5C 5C5('5CFO FOFOFOF1 STAHT 105F00100 45EOFOOA 00002210 189F1831 58FOC054 05E041EO EOOE051F 010022AO 00000198 4110(,044 58FOC050 05EF0203 00503000 4110COI0 58FO('04(' 05EF4110 C01458FO C04C05EF 41E0013F 5C5C5('5C 0021EO 90EE0058 180058FO (,0584110 005805EF 411000F4 5010C020 4110(.018 58FOC040 002200 05EF4120 C0304A20 20000201 C0600048 4150C05C 50502004 92882004 024A0148 002220 00F40204 0193D13F 41100148 5010(,02(, 4110e024 58FOC040 05EF4'EO 013F90EE 002240 00581800 58FOC064 41100058 05EF41FO 905E4110 eOl058FO C04805EF 4110(,014 002260 58FOC.048 05EF5800 000498EC 000C01FE 00003000 40005000 60007000 00000000 002280 80002000 800020AO 58002000 00000048 00003174 230020AO 00000050 000031C8 0022AO 0008F8f8 00002192 OA002000 880022CC 000020EO 8F0025BO 00002ge6 0000298A 0022CO 00002DAO 00002990 000022FO 00002192 00000000 00000000 FFFFFFFF FFFFFFFF OOFEFFFF oeoooooo 000100CO SUB 1 190ECOOOC 00002354 0022EO 45EOFooe 00002388 58COEOOO 002300 189F 1831 58FOC01C 05E041EO EOOE051F 030023C8 00000100 02030058 30000203 002320 00503C04 58600058 02046000 C0305850 005841EO 500090E.E DOt- H800 58fOC020 OU2340 41100060 05Ef5800 000498EC OOOC01FE 47f0909C REPEAT I90ECOOOC 45EOFOOC 00002388 002360 58eoECOO '>890C024 183158fO C01C0700 05E041EO EOO€051F 030023C8 00000100 002380 02030058 30000203 00503004 58600058 41E06000 90EED060 lA0058FO e0204110 0023AO 006005EF ~800C004 98EeDooe 07FE5800 000498EC 000CQ7FE 00003000 40005000 0023CO 600070CO 00000000 000CF8F8 000022FO 00002354 00002758 00002400 000022fO 0023EO OCCOCCOO LAST 90f:COCOC 00000000 FFFFFFfF FFFfFFFF OOFEFFFF OCFOFOFO fOF002FF 03fFOQfF 45EOFOOC 00002480 58COEOOO 189F 1831 58FOCOl8 0!JE:041EO EOOE051f 03002490 00000110 02030058 30000203 00503004 586000')8 F224DOEO 6000f8fO 002400 002420 I .... I'I.j 'g 002440 0060C035 FAF20060 00EOF83F 00E8D060 92f9C012 F8230070 ·00E892F8 C0125860 000498E(. ')00,"07FE 00002158 00000",')0 11 .(1) 002460 0058F342 60000070 96F06Q04 58000004 98E(.000C 07FE5800 002480 00003000 1t0005000 60001000 00000000 0008F8F8 00002ltOO ,f:: I\J U'I • ~ ~ IJCFZIZO 0024AO OOOOOCOO 00000000 ~ fFFffFFF OOFEfFFF OC lCOOOO I0A320000 OA320000 91011004 4180F02C 91401002 58EOF04(' 0024CO 1t7FOFOI0 OA3200oo OA009180 10024710 foltOA07 0024EO 1t780FOI0 50EOFOttC 58EOI020 0501F04A E0004770 F04lt58EO 101C01FE lJCFZOZ4 002500 07FE615C 00002f4~ IOA320000 OA320000 OAl20000 50EOFOAlt OA009180 10024710 002'i20 FOICOAo7 91101003 4710F040 D2001030 10280201 1036102E 58EOI028 024FI038 002540 EOO.058EO FOAItOlFE 41El0030 50EOI008 OA009180 10024710 F0540A07 18E141l0 002560 F0780AOO 9180F07A 4710F066 OA07181E ItlE 10028 50EOI008 47FOfOl0 00000000 002580 00000000 00000004 00002590 00000000 09002598 00000000 CIl ~ FFFFFFFF (I) t'd a 11 F4Flf5FO C94009C5 00000000 81010078 00000000 I 002SAO E3D9E800 00000000 00000000 0025CO 00002600 00000000 00000000 07000700 00008400 08000003 000025F8 00000000 t'd I» 0025EO 03002b80 3100C9Dl E2E8E2D3 E2400040 90002600 47000000 01002600 20000079 rt 002600 TO THE NEXT LINE ADDRESS CONTAINS 401t04040 ~ 002660 401t0404o 40404040 40404040 40000000 00000000 o 002680 00000000 - 0026AO 00091803 ~ 11 U'I 1t0404040 40404040 40404040 00000000 47FOFOOC 9023FOOO 91031015 4770F066 58301028 06304120 1t3030~00 1t332FOCB 19034780 F0364620 F0284920 FOCA47BO F0469208 I"tI ~ co CIl OOOOOOOB A0002500 IJKSYSA \Q 0026CO 10284530 FOA09180 10154780 F056947F 10154530 FOA04122 FOCOOZOO 10282000 0026EO 06001028 101EOAOO 91041015 4780F07A 4530FOA2 92011028 OA004530 FOA29101 002700 10044.780 F09A9104 10154710 F09A9108 101F4710 FOAE58EO 10189823 F00007FE 002720 OA009180 10024710 FOACOA07 07F31821 48020006 41101016 47FOF09A 002740 OBCBE38B 0301411B 13080004 f9C3Fl4E E5E660FO 4010C128 OA021812 IJKSZCN 905CF408 I 58COF2B4 (I) 002760 58500008 50050004 18Ao1805 5A510004 5550C29C 41BOC01E 50500008 0200C28A ....rt 002780 C2884850 ('29A1255 4780(,038 485A0048 41550001 4050('29A 40500048 0203004C ~ 0027AO A0145851 00005050 00000200 50025003 91030000 4710(,078 4A550000 96405004 47FOC064 985CC408 07FE41FO COSE985C C40892~3 9680C3EE 5800C428 C3EFltll0 o o ,f:: 0027CO 91805004 t:J OOHEO U000051F 4710(,078 41550008 IIJKSZCI 210~5FO 58('OF224 t:T s:= 002800 (,2689202 C2684780 COE892fl C2959200 C28F47FO 02330014 C3F49500 IIJKSZCS C27A~OEC 000C58CO \Q \Q .... 002820 C2B8947F C3EE947f (.39492FE C1191850 91055COO 4740COfO 58550004 47FOCOD8 ~ \Q 41FOC006 58450000 9'>061COO 4720C122 02COC109 10000COO CI09C118 (I) F I Fb9200 002840 920EC 119 )I 002860 91004002 4710C122 947FC3EE 982C001C 01FEOAll 20408010 040818b5 91036000 en oe2880 4780(,198 471C(.152 58460000 4A440000 D5004000 lC0041RO C1SA9180 40()441l 0 ....QI I\J " \D ~ tX) I1:j .." 0 IQ s:: 0028AO C1524144 t:1 0 (1) 0028CO CIl 11 ~ rt . S "ttl CIl '< (J) ~ H IQ CIl QI ~~ 11 m (1) . 11 QI C124950A 10004740 C174950F 4001C3A1 4770C142 91404004 4710C142 91104004 4110C198 91084004 4780C 110 947FC394 58140004 47FOCICA 95081000 4170CU8 9640C'j'~4 47FOC110 002900 18619101 C28A92F4 C2954110 CIBA92F2 C2959200 C28F47FO C27 002920 FOf21850 91055000 4180C22A 4740CIEO 58550004 47FOC1CC 05011004 50484770 002940 C 1081805 58610000 50600038 4A610006 50600010 58550000 02005002 500.39180 O(J2960 C3EE4170 C21498EC 947fC3EE C3F 10011 5000C4,6 OA114510 COC62200 0233C3f4 IIJKSZCM .9208F082 00140202 002980 000C01FF IIJKSZCA .9207f08A 184C58CO F07C4700 C24C4510 0029AO C08E2300 9200C243 47FOC438 F03F9200 f03941FO F02 ~JKTCLM 0029CO F02045FO F012F3 F0279204 0029EO 41fl0000 58C901D2 11 0020400 F0140A04 PROG MASK OEOOOOOO. SSA2 05000000 en s:: IQ g, - ~ 10004720 CI740502 to 0 11 (1) 000447FO 0028EO (1) (J) .." C1385866 ~ c.n (1) to 11 0 000847FO 002A20 I 45FOFOOC ,IJKSZCT 05F092F3 00002844 000027E6 00002758 OOO~~ 00000000 00000000 00000000 00000000 00002840 SAVE 00000000 J!iK.:zCP OEC 000C58CO ~JKTOPM 2FO F0339200 00002868 00002830 00000000 00000000 QI to 002A40 TO THE NEXT LINE ADDRESS CONTAINS 00000000 11 rt 002A60 00000000 00000000 00000000 00000000 SSAI 05000000 00003080 00000000 0000ZF40 ~ 002A80 00002488 00003080 00002018 00002050 00002000 00000048 40002180 58002000 0 002440 00000048 000Q3174 40002192 00002000 00002A20 000020EO 00000000 00000000 - 002ACO TO THE NEXr LINE ADDRESS CONTAINS 00000000 SCALE FACTOR~ 002AEO 00000000 00000000 000000 0 FORMAT ENTRY POINT TABLE 002800 TO THE NEXT LINE ADDRESS CONTAINS 00000000 CURRENT FILE 230020AO FILE CHAIN ANCHOR FEC020AO 0'1 H\ ~ tX) 100~~0~O 002820 00000000 002840 002880 AOO02580 REG 5 000022CC REG 13 00000000 002BAO 00899001 58800088 91808000 4780COB4 91808008 4780CO'3£ 'H088004 4180C03E 002BCO 96048004 48100016 02008019 104£:9140 80044180 C04A9407 80000600 80009000 0028EO 94098009 91428008 4710COBC 58108GCO D7011000 100058?0 80104110 Cl'100202 002COO C0798001 4500C01C 0000}088 OA025QlO 80109680 800991'11 80094710 (;09A0202 0()2C20 80050080 02020080 D089947F 80009180 90004199 OC0447~O COOE5f:lDO 000,,98EC O()2C40 DOOC07FE 94FB8004 47FOC09E 91208000 4710C05C 58108000 41110000 95101014 .002e60 4770COSC 0208C144 10C00203 1000(140 CH801015 4710CCFO 9207C 138 45f:OClIE 002C80 91101015 923FC138 4180CllO 9227C138 45EOC 11E 91011C"4 4 7l0C 114 92 3 7C 138 Ou2CAO 4SEOCllE 02081000 C14447FO C0824120 C1385021 00080AOO 91801002 4.71 OC 132 002860 00000000 00000000 ,IJKZWSI - INTERRUPT SAVE ooooooooPSWoooooQQQI REG 7 REG 6 0000318F 00001000 REG 15 REG 14 00000000 00000000 00000000 AREA REG 0 00000000 REG 8 00002000 J DECIMAL INTEGER. . 00000000 a a OJH)(LQ 0 OOOCCOOO 00000000 REG 1 00000000 REG 9 00002400 START OF 65 18C11880 I 00000000 REG 2 00000000 REG 10 00002000 DOUBLE WORD 41D040RO 00000000 COO02S3C REG 3 REG 4 00000000 00000000 REG 11 REG 12 00007000 QOC02480 PVI TRANSIENT AREA 50R00004 18950202 tzj ~. \,Q ~ 002eeo Ol0701FE 00000000 01000000 20000001 00000400 00000100 00000138 00000000 . OOleEO .s858e2D6 07C50540 00000000 00000000 00000000 00000000 00000000 OOO(JOOOO (1) ~ N U1 • ~ t:"' 'en" t-I ~.... 002000 TO THE NEXT LINE IDDRESS CONTAINS 00000000 002080 002010 0020CO 0020EO 00145820 50109180 50004780 C0484510 COIE5858 00001000 05400202 90E~000C 58~OF038 41]040E4 43210000 89200019 88200011 1A210202 20011001 91801000 UllOO04 4780Fooe 98E4000C 07FE~510 C1080501 00002120 ~170C078 18CF5880 C2185000 80544100 80509868 10005060 8008949F 600943FO 18Cl9834 ,IJKSZLM IIJKTCBM 90£COOOC 002EOO 600044FO C20C4710 C03258FO C21e051F 65009140 80085820 60104110 C1309180 002£20 60094770 COAE9111 800841CO C0744970 60164700 C05E4810 60169620 60095810 (1) 60109130 60044180 C06E4lAA 0001tl898 45EOC1EA 58106000 41110000 58FlOOIO a 002E40 002£60 910C6004 4780C08E lB0045EF 00044840 601641EO C09E90fC OOOC47FF 00oC91l0 1'1 002E80 80084780 e0819608 600041FO C1C6947F 60094830 600A4133 00049610 60094970 002EAO 60014180 C0024740 COC£4870 600A9620 60099130 60044740 CI004070 60169101 002ECO 80084110 COF45020 80980202 80018099 47FOC1C6 189818A2 45EOCIEI 47FOCIEO ~ \,Q ~ ~ S» 1'1 rt ~ 002EEO 41970004 19934100 C1115810 60004111 000058F1 001045EF 00148990 00105090 20008098 41220004 47FOCOOE 947F6009 91026009 4780C144 58FOC21C 41110000 4840600A 41EOC160 90ECOOOC 47FFOO08 002FOO 80980203 0 002F20 051FOAOO 58106000 58F10010 - 002F40 50206010 94F76tlOO 91306004 4780C182 02018098 20004840 80984840 C2204122 OU2F60 00044040 60169101 80084110 C19C5020 80980202 10018099 47FOC184 19744780 002F80 C1IC4100 C1I81814 96206009 18921818 45EOClEA 58FOC21C 91406009 4780CIC6 002FIO 4110C222 05EF58FO C21C9130 60044710 C1E09120 60094180 elE04110 C221t05EF 002FCO 58000004 98ECOOOC 01FEltIFO 0100197F 4700e204 187F02FF 10009000 1I9FUAF ..J H\ ~ eo en (1) n rt ~. 002FEO 41FOC1EE 06104470 003000 00040COO OEOOOOOO 003020 000t01FE 58FOE06£ 91008008 02001000 90000000 00002120 00002816 ,05E05880 E0729140 80084710 E01A5850 80089602 500998Et 980COO14 051FOAOO 05E05880 E04A5850 80089640 500947fO 05E09101 50084780 EOIE9130 50044190 ~940CI04 40C140C4 C tE3C 140_ 5C5C5C'iC 5cse5C5C 5C5C5C5C C21007FE ,IJKTXCF 0 t:I ~ 98ECOOOC 00 t:I (1) tr ~ \Q \,Q ~. t:I \Q ~ ~. QI en N co ~ REG 15 00002354 REG 7 0030AO 0030CO 0030EO TO THE NEXT LINE ACORESS CONTAINS 00000000 003160 00000000 00000000 00000000 OOOOCOOO 00000000 003180 C3~4__ ~L5C5t5' _ 5C5C5C5' _5C5C5C~_C 5CSC5C5C I CARDIN tv co tv t-:j ..... I.Q s::: t; t:I 0 C/) CIl '< en rt (t) . ~ . ttl t; 0 I.Q t; III ~(t) . t; en (j) s::: ..... 0.. (t) 5C5C5C5C 0031CO CTR FOFOfOF2. I SCSC5C5C oooooeoo SCSC5C5C CARDOUT C940CI04 5C5C5C5C 5CSC5CSC SC5C5CljC SC 5CSC5C ~TR 5C5C5C_ Q 40C140C4 CIE3Cl40 C3CI09C4 S("SC5C5C 5CSC5C5C tv U'I 003lEO TO THE NEXT LINE ACORESS CONTAINS 5C5C5C5C 003200 5C5C5C5C 5C5C5C5C 5C5C5CSC 5C5C5C5C 5C5C5CFO fOFOFOFl DSA 'SUB l' 030023(.'3 00C03080 003220 00003318 1E0023A4 00002400 00003218 00003218 000022A8 '00003008 00002270 III OU3240 000022CC 000031BF 00001000 00002000 000022FO 00002000 00002000 00002388 ..... OU3260 00020000 00003080 00000000 00000000 00003lBF 00000000 00003lBF 00000000 ttl 003280 TO THE NEXT LINE ACORESS CONTAINS 00000000 (t) a 0031AO ttl ~ H C/) a "0 (t) t; I.Q t; 003300 00000000 00000000 00000000 00000000 00000000 oocooono DSA 'LAST ' 03002490 00003218 - 003320 00003428 00000000 00000000 00000000 00000000 00000000 00000000 00000000 0 ~ ttl III 003340 TO THE NEXT LINE ACORESS CONTA1NS 00000000 rt 003360 00030000 00003218 00000000 00000000 00003lBF 00000000 00000000 00000000 OU3380 00000000 0000002C 00002COO 00000000 00000000 00000000 00000000 00000000 t; ~ co 0 I-h ~ co OU33AO TO THE NEXT LINE AOORESS CONTAINS 00000000 0033EO 00000000 00000000 00000000 00000000 00000000 00000000 COOOIFOO 00000000 003400 0000002C 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 003420 TO THE NEXT LINE ADDRESS CONTAINS 00000000 007FEO 00000000 00000000 00000000 00000000 Glossary For a more complete list of data processing terms, refer to IBM Data processing Techniques, A Data Processing Glossary, GC20-1699. access method: Any of" the data management techniques (sequential, indexed sequential, or direct) available to the user for transferring data between main storage and an input/output device. ASCII (American National Standard Code for Information Interchange): A 128-character, 7-bit code. The high-order bit in the system/360 8-bit environment is zero. asynchronous: Without regular time relationship. The user's programs run asynchronously with the I/O interrupts. BTAM's channel appendage routine runs synchronously with the I/O interrupts. background program: In multiprogramming, the background program is the program with lowest priority. Background programs execute from a stacked job input. batched job: Programs that execute from a stacked job input. Batched jobs run under the control of job control. block: r:--To group records physically for the purpose of conserving storage space or increasing the efficiency of access or processing. 2. A physical record on tape or DASD. BTAM (Basic Telecommunications Access Method): A basic access method that permits a READ/wRITE communication with remote devices. catalog: To enter a phase, module, or book into one of the system libraries. CCB: See Command Control Block. CCH: See Channel Check Handler. Channel Check Handler (CCH): A feature that assesses system/370 channel errors to determine if the system can continue operations. channel program: One or more Channel Command Words (CCWs) that control(s) a specific sequence of channel operations. Execution of the specific sequence is initiated by a single start I/O instruction. checkpoint record: A record containing the status of the job and of the system at the time the checkpoint routine writes the record. This record provides the necessary information for restarting a job without returning to the beginning of the job. checkpoint/restart: A means of restarting execution of a program at some point other that the beginning. When a checkpoint macro instruction is issued in a problem program, checkpoint records are created. These records contain the status of the program and the machine. When it is necessary to restart a program at a point other than the beginning, the restart procedure uses the checkpoint records to reinitialize the system. checkpoint routine: A routine that records information for a checkpoint. Command Control Block (CCB): A 16-byte field required for each channel program executed by physical IOCS. This field is used for communication between physical IOCS and the problem program. communications region: An area of the supervisor set aside for interprogram and intraprogram communication. It contains information useful to both the supervisor and the problem program. control program: A group of programs that provides functions such as the handling of input/output operations, error detection and recovery, program loading, and communication between the program and the operator. IPL, supervisor, and job control make up the control program in the Disk and Tape Operating systems. core storage: See main storage. data file: A collection of related data records organized in a specific manner. For example, a payroll file (one record for each employee, showing his rate of pay, deductions, etc) or an inventory file (one record for each inventory item, showing the cost, selling price, number in stock, etc). data protection: A safeguard inVOked to prevent the loss or destruction of customer data. data set security: A feature that provides protection for disk files. A data secured file cannot be accidentally accessed by a problem program. Glossary 283 Disk Operating System (DOS): A disk resident programmdng system that provides operating system capabilities for 16K and larger IBM System/360 and IBM system/310. DOS: See Disk Operating system. DOS Volume Statistics: A facility that monitors and records the number of temporary read and write errors on currently accessed tape volumes. This facility has two options, Error statistics by Tape Volume (ESTV) and Error Volume Analysis (EVA). OTF (define the file) macro instruction: A macro instruction that describes the characteristics of a logical input/output file, indicates the type of processing for the file, and specifies the main storage area and routines to process the file. To do this, use the appropriate entries in the keyword operands associated with the DTF macro instruction. Environmental Recording, Editing, and Printing (EREP): A program that edits and prints data that has been stored on the system recorder file. 4. To transfer control to·the system loader. Fetch/Load Trace (F/L Trace): A program that records information about phases and transients as they are called from the core image libra'ry. file: See data file. fixed length record: A record having the same length as all other records with which it is logically or physically associated. F/L Trace: See Fetch/Load Trace. foreground initiation: A set of system routines to process operator commands for initiation of a foreground program. foreground program: In multiprogramming, foreground programs are the highest priority programs. Foreground programs may be executed from a job stack or in an SPI environment. EREP: See Environmental Recording, EdIting, and Printing. Forms Control.Buffer (FCB): The buffer in the IBM 3811 Printer Control Unit that stores carriage control information for the IBM 3211 Printer. Error Statistics by Tape Volume (ESTV): One of the two options of the DOS volume Statistics. With ESTV support, the system collects data on tape errors by volume for any tape volumes used by the system. 'Generalized supervisor Calls' Trace" (GSVC Trace): A program that records SVC interrupts as they occur. Allor a selected group of SVcs can be traced. Error Volume Analysis (EVA): One of the two options of the DOS Volume statistics. With this option, the system issues a message to the operator when a number of temporary read or write errors (specified by the user at system generation time) has been exceeded on a currently accessed tape volume. ESTV: EVA: See Error Statistics by Tape Volume. See Error Volume Analysis. extent: The physical locations on Input/Output devices occupied by or reserved for a particular file. fetch: r:--To bring a program phase into main storage from a core image library for immediate execution. 2. 3. 284 The routine that retrieves requested phases and loads them into main storage (see system loader). The name of a macro instruction (FETCH) used to tranfer control to the system loader. DOS System Programmer's Guide GSVC Trace: See Generalized supervisor Calls Trace. lORA: Area. See Independent Directory Read-in Independent Directory Read-in Area (IDRA): A resident area, created by supervisor option, into which the system reads core image library directories for fetch and load operations. Using IDRA frees the physical transient area to perform error recovery procedures. Initial Program Load (IPL): The initialization procedure that causes Disk and Tape Operating Systems to commence operation. interrupt: A break in the normal sequence of instruction execution. It causes an automatic transfer to a preset storage location where appropriate action is taken. IOCS (Input/Output Control system): A group of macro instruction routines provided by IBM for handling the transfer of data between main storage and external storage devices. I/O (inpUt/output) error logging: The process of recording OBR and SDR records or the system recorder file. I/O Trace (Input/Output Trace): A program that records I/O device activity for all or a selected group of I/O devices. IPL: See Initial Program Load. data files. LSERV (label cylinder display): A program that formats a listing of the label cylinder located on SYSRES. LSERV can run in and partition any outputs the list on SYSLST, which may be assigned to disk, tape, or printer. Job Accounting Interface: A program that accumulates accounting information for each job step to: charge usage of the system, help plan new applications, and help supervise system operation more efficiently. Machine Check Analysis and Recording (MCAR): A feature that records System/370 machine check interrupt error information on the system recorder file and then attempts to recover from the interrupt. Job Accounting Table: An area in the supervisor where accounting information is accumulated for the user. main storage: All addressable storage from which instructions can be executed or from which data can be loaded directly into registers. job control: A program that is called into storage to prepare each job or job step to be run. Some of its functions are to assign I/O devices to certain symbolic names, set switches for program use, log (or print) job control statements, and fetch the first program phase of each job step. job step: The execution of a single processing program. ~: 1024. language translators: A general term for any assembler, compiler, or other routine that accepts statements in one language and produces equivalent machine language instructions. For example, Assembler, COBOL, etc are language translators. librarian: The set of programs that maintains, services, and organizes the system libraries. MPS: multiplexer channel: A channel designed to operate with a number of I/O devices simultaneously on a byte basis. That is, several I/O devices can be transferring records over the multiplexer channel, time sharing it on a byte basis. multiprogramming system: A system that controls more than one program simultaneously by interleaving their execution. multitask operation: Multiprogramming; called multitask operation to express not only concurrent execution of one or more programs in a partition, but also of a single reenterable program used by many tasks. OBR: OLTEP: library: An organized collection of programs, source statements, or object modules maintained on the system resident device. Three libraries are used by the Disk and Tape operating systems: core image library, source statement library, and relocatable library. linkage editor: A system service program that edits the output of language translators and produces executable program phases. It relocates programs or program sections and links together separately assembled (or compiled) sections. load: TO fetch, i.e., to read a phase into main storage returning control to the calling phase. lo.gical loeS: A comprehensive set of macro instruction routines provided to handle creation, retrieval, and maintenance of See multiprogramming system. See outboard recorder. See On-Line Test Executive Program. On-Line Test Executive Program (OLTEP): The control program of the on-line test system. OLTEP is the interface between the on-line test and the operating system. outboard recorder (OBR): A feature that records pertinent data on the system recorder file when an unrecoverable I/O error occurs. overlap: To do something at the same time that something else is being done; for example, to perform input/output operations while instructions are being executed by the central processing unit. overlay: A program segment (phase) that is loaded into main storage. It replaces all or part of a previously retrieved section. PCIL: See Private Core Image Library. Glossary 285 PDAID: See Problem Determination Aids. phase: The smallest complete unit that can be referenced in a core image library. Each program overlay is a complete phase. If the program has no overlays, the program itself is a complete phase. physical IOCS: Macro instructions and supervisor routines (Channel Scheduler) that schedule and supervise the execution of channel programs. Physical IOCS controls the actual transfer of records between the external storage medium and main storage, and provides I/O device error recovery. Private Core Image Library (peIL): A file reference in the same manner and for the same purpose as the system core image library, but distinct from the system core image library. PCIL increases available core image library space to enable compiling, linkage editing, and executing in the foreground partition, when a private core image library is assigned to that foreground partition. private library: A core image, relocatable, or source statement library that is separate and distinct from the system library. problem determination: A procedure or process (provided by IBM) that the user can follow after an error message to determine the cause of the error. Problem Determination Aids (PDAID): Programs that trace a specified event when it occurs during the operation of a program. The traces provided are: QTAM Trace, I/O Trace, F/L Trace, and GSVC Trace. QTAM Trace: A program that records certain supervisor and I/O activities on tape or in main storage. RDE: See Reliability Data Extractor. record: A general term for any unit of data that is distinct from all others when considered in a particular context. o Recovery Management Support (RMS): A feature for System/370 that consists of the MCAR (Machine Check Analysis and Recording) and CCH (Channel Check Handler) functions. RMS gathers information about System/370 hardware reliability and attempts certain error recovery operations. RMS is a part of the entire reliability, availability, and serviceability support for System/370. Reliability Data Extractor (ROE): A function that provides hardware reliability data that is analyzed by IBM. 286 DOS System Programmer's Guide ,relocatable: A module or control section whose address constants can be modified to compensate for a change in origin. ,restart: RMS: See checkpoint/restart. See Recovery Management Support. SDR (statistical data recorder): A feature 'that records the cumulative error status of an I/O device on the system recorder file. ,selector channel: A channel designed to operate with only one I/O device at a time. Once the I/O device is selected, a complete record is transferred one byte at a time. self-relocating: A programmed routine that is loaded at any doubleword boundary and can adjust its address values so as to be executed at that location. self-relocating program: A program that is able to run in any area of storage by having an initialization routine to modify all address constants at object time. Single Program Initiator (SPI): Under DOS, a program that is called into storage to perform job control type functions for foreground programs not executing in batch job mode. SORTED DSERV: A program that gives you an alphamerically sorted listing of any or all of the library directories. SPI: See Single Program Initiator. stand-alone dump: A program that displays the contents of main storage from a minimum of 8K bytes to a maximum of 16384K bytes. It helps to determine the cause of an error. supervisor: A component of the control program. It consists of routines to control the functions of program loading, machine interruptions, external interruptions, operator communications and physical loes requests and interruptions. The supervisor alone operates in the privileged (supervisor) state. It coexists in main storage with' problem programs. system residence: The external storage space allocated for storing the basic operating system. It refers to an on-line tape reel or disk pack that contains the necessary programs required for executing a job on the data processing system. task selection: The supervisor mechanism for determining which program should gain control of CPU processing. telecommunications: A general term expressing data transmission between remote locations. supervisor) into the transient area when needed for execution. teleprocessing: A term associated with IBM telecommunications systems expressing data transmission between a computer and remote devices. UCS: UCSB: trace: r:--To record a series of events as they occur. undefined record: A record having an unspecified or unknown length. 2. The record of a series of events. track hold: A function for protecting DASD tracks that are currenbly being processed. When track hold is specified in the DTF, a track that is being modified by a task in one partition cannot be concurrently accessed by a task or subtask in another partition. transient area: This is a main storage area (within the supervisor area) used for temporary storage of transient routines. transient routines: These self-relocating routines are permanently stored on the system residence device and loaded (by the See Universal Character Set. See Universal Character Set Buffer. Universal Character Set: A printer feature that permits the use of a variety of character arrays. Universal Character Set Buffer (UCSB): buffer in a printer control unit that stores the code equivalents of the characters on an interchangeable print chain or train cartridge. A variable length record: A record having a length independent of the length of other records with which it is logically or physically associated. (Contrasted with fixed length record.) It contains fields specifying physical and logical record lengths. Glossary 287 288 DOS System Programmer's Guide Index Indexes to systems reference library manuals are consolidated in the publication DOS Master Index, GC24-5063. For additional information about any subject listed below, refer to other publications for the same subject in the Master Index. AB (abnormal termination) support description of 67 multitasking 39,44 option table 57 ACTION statement 141,143 ACTR instruction 183 ADCON (see relocating address constants) adding records to indexed sequential file 132 AGO instruction 183 AIF instruction 182 ALLOC macro 84 Am. Natl. Std. Code for Info. Interchange (see ASCII) ANOP instruction 183 AP (asynchronous processing) (see multitasking) ASCII generation guidelines 29 support 28 system considerations 28 assembler program debugging aids 204 asynchronous processing (AP) (see multitasking) ATTACH macro cancel conditions 40 considerations 39 example 45 use of 39 attributes, macro writing 178 background (BG) communications region extension 35 BJF (batch job foreground) 27 blocking records 99 bypassing checkpoint records 172 cancel codes, description of 198 cancel, system action 198 card (DTFCD/CDMOD) files 122 catalog CI library example 156 catalog for phase overlay example catalog private CI library example causes for message OS041 200 CBF (console buffering) support channel considerations 63 description of 63 table 64 162 158 CC (command chaining) (see CCW) CCB (command control block) CCW address 102 CCW address in CSW 103 count field 102 102 CSW status bits definition of 100 format of 104 optional sense CCW 103 symbolic unit number 102 transmission information 102 3211 error indicators 173 CCH (channel check handler) 189 CCHAIN (command chaining) support 64 CCW (channel command word) command chaining (CC) 107 106 command code count 108,111 data address 106 data chaining (CD) 107 flags 107 format of 106 PCI 108 SKIP 108 SLI 107 CD (chain data) (see CCW) chaining (DAM) 127 channel check handler (CCH) 189 channel command word (see CCW) channel queue (see CHANQ) channel rescheduling considerations 87 CHANQ (channel queue) format of 59,85 size of 84 table 85 checkpoint file 99 checkpoint/restart bypassing checkpoint records 172 checkpoint file 168 checkpoint on disk 168 checkpoint on tape 168 CHKPT macro, format of 167 CHKPT macro, use of 166 DASD and MICR files 168 DASD operator verification table 172 multitasking considerations 166,167 problem program responsibilities 166 repositing magnetic tape 170 repositioning I/O files 170 restarting checkpointed programs 173 RSTRT statement 173 checkpoints 168 on disk 168 on tape CHKPT macro format of 167 use of 166 choosing file organization and retrieval method 133 choosing file organization activity 133 criteria 133 random retrieval need 136 response time 136 Index 289 choosing file organization (CONT.) size 134 volatility 134 COBOL program debugging aids 121,204-206 COBOL sample program 207 COCR (cylinder overflow control record) 130 command chaining support 64 command control block (see CCB) COMMON pool 154,160 communication between tasks 42 communications region BG extension 35 SDR 190 system 30 compile and execute example 160 concatenation 181 concurrent peripheral operation (CPO) 27 conditional assembly instructions ACTR 183 AGO 183 AIF 182 ANOP 183 consecutive spill overflow technique (DAM) 127 console buffering (CBF) table 64 console buffering (see CBF support) console typewriter (DTFCN) 122 CPO (concurrent peripheral operation) 27 cylinder index (ISFMS) 129 cylinder overflow area (ISFMS) 132 cylinder overflow control record (ISFMS) 130 DAM (see direct access method) DASD address specification, READ/WRITE (DAM) 128 DASD file protect support (see DASDFP support) DASDFP (DASD file protect) support mode of operation 70 SYSGEN 73 data file definition 93 data management concepts 91-138 data manipulation 99 debugging aids 167-282 assembler 204 COBOL 204 FORTRAN 234 gathering documentation 189 PL/I 255,263 RPG 243 system action under CANCEL 198 wait states 202 declarative macros 111,113 DEQ macro cancel condition 42 considerations 42 use of 42 DETACH macro cancel condition 41 considerations 40 example 47 290 DETACH macro (CONT.) use of 40 device type codes 90 DIB (disk information block) definition of 74 format of 75 direct access method file organization 124 prime number division 126 random addressing formula 125 random addressing techniques 124 synonym records 127 disk information block (see DIB) divide remainder (see prime number division) DOS stand-alone dump generator (DUMPGEN) 189 double buffering 27 DTF (define the file) macros DTFBG 114 DTFCD 114 DTFCN 114 DTFDA 114 DTFDI 114 DTFEN 114 DTFIS 114 DTFMR 114 DTFMT 114 DTFOR 114 DTFPH 114 DTFPR 114 DTFPT 114 DTFSD 114 DTFSR 114 DUMPGEN (stand-alone dump generator) 189 duplicate addresses, DAM, (see synonyms) DVCGEN macro channel rescheduling considerations 87 system generation guidelines 88 ECB (event control block) 39,41 end of day (EOD) 189 ENQ macro cancel conditions 42 considerations 42 use of 42 ENQ/DEQ and RCB macros example 48 ENTRY statement 141,146 environmental recording, editing, and printing (EREP) 189 EOD (end of day) 189 EREP (environmental recording, editing, and printing) 189 error logging 189 error recovery techniques for IBM 3211 printer 174 error statistics by tape volume (ESTV) 58 error volume analysis (EVA) 58 ESTV (error statistics by tape volume) 27 ESTV utilities (ESTVFMT,ESTVUT) 58 EVA (error volume analysis) 58 event control block (see ECB) DOS System Programmer's Guide .~ EXCP (execute channel program) 23,100 extended capabilities MEXIT 183 MNOTE 184 extending an indexed sequential file 132 external interrupt 56 F/L (Fetch/Load) traqe 194 FAVP (first available pointer) table 59 FETCH macro, use of 149 FICL (first in class) table 59 file definition (DTF) macros 113 file activity 133 definition 93,99 need for random retrieval 136 organization 122-133 processing methods 113 response time consideration 136 size 134 volatility 134 fixed length records ASCII 93 blocked 95 unblocked 94 FLPTR (free list pointer) 59 FOCL (first on channel list) table 59 FOPT macro abnormal termination (AB) 67 64 command chaining (CCHAIN) console buffering (CBF) 63 DASD file protect (DASDFP) 70 ESTV 58 EVA 58 Independent Directory Read-In Area (IDRA) 64 interval timer (IT) 56 job accounting interface 81 multiple wait (WAITM) 70 operator communications (OC) 56 physical transient overlap (PTO) 62 private core image libraries (PCIL) 76 program check (PC) 58 seek separate (SKSEP) 62 system files on disk (SYSFIL) 74 system generation guidelines 58 tape error block (TEB) 58 tape error recording 58 track hold (TRKHLD) 65 FORTRAN program debugging aids 234 FORTRAN sample program 234 global SET symbols 180 GSVC (Generalized Supervisor Calls) trace 194 , halt analysis, RPG 243 header labels, checkpoint 168,172 header statement, macro 178,179 home addresses (DAM) I/O I/O I/O IBM 127 (Input/Output) trace 194 error logging 189 table interrelationship 59 3211 Printer support error recove~y techniques 174 system considerations 173 IDRA definition 64 system generation guidelines 64 imperative macros 111,119 INCLUDE statement 141,145 Independent Directory Read-In Area (IDRA) 64 independent overflow area (ISFMS) 132 index (ISFMS) cylinder 129 master 129 track 129 indexed sequential file management system add function 129,132 COCR 130 129 cylinder load 131 load extend 131 master index 129 prime data 129 random 132 sequential 132 track index 129 interrelationship of DTF and module macro instructions 118 interrupts 23 42 intertask communication interval timer support concept 56 option table 57 IOCS (input/output control system) logical 111 physical 99 IOTAB macro channel queue (CHANQ) 84 84 job information block (JIB) ISFMS (see indexed sequential file management system) IT (interval timer) support concept 56 option table 57 JIB (job information block) definition of 84 format of 59,72 job accounting interface support prog. considerations 82 table 83 job information block (see JIB) 81 label cylinder display (LSERV) 189 LBLTYP statement 146 line printers (DTFPR/PRMOD) 122 Index 291 link edit and execute ~xample 154 link editing, examples of 154 link editing ACTION statement 143 control statements 143 definition of 141 ENTRY statement 146 INCLUDE statement 145 LBLTYP statement 146 OPTION LINK and CATAL 147 overlay structures 147 PHASE statement 144 private core image libraries 141 program considerations 146 program name 141 symbolic units required 143 system flow 141 linkage editor examples catalog CI library 156 catalog phase overlay 162 catalog private CI library 158 compile and execute 160 link edit and execute 154 link editing 165 submodular structure 162,163 LIOCS (see logical input/output control system) LOAD macro, use of 149 loading an indexed sequential file 131 local SET symbols 180 logic module name structure 116 logical file definition 99 Logical Input/Output Control System (LIOCS) devices 121 logical input/output control system DAM 124 DTF macros 113 file organization 133 function 111 imperative macros 119 ISFMS 129 macros and devices 121 macros and DTFS 120 MOD macros 114 modular/tabular 113 processing methods 111 sequential file 122 storage required 113 logical IOCS (see logical input/output control system) low core error bytes 203 LSERV (label cylinder display) 189 LUB (logical unit block) table 59,71 LUBDSP (LUB displacement) table 59,85 LUBID (LUB identification) table 59,85 machine check analysis and recording (MCAR) 189 machine check recording and recovery (MCRR) 189 macro definition 177 macro instruction keyword 176 292 DOS System Programmer's Guide macro instruction (CONT.) mixed 177 positioning 177 macro writing attributes 178 concatenation 181 conditional assembly 182 definition 177 extended capabilities 183 header statement 178,179 macro instruction 176 model statement 178,179 prototype statement 178,179 sample MSG coding 186 sample MSG macro 185 sequence symbols 182 sublist notation 179 trailer statement 178,179 variable symbols 179 macros declarative 111 imperative 111 magnetic ink character re~ognition (see MICR) magnetic tape (DTFMT/MTMOD) files 122 main storage requir~ments (LIOCS) 113 master index (ISFMS) 129 MCAR (machine check analysis and recordin~) 189 MCAR linkage area 193 MCRR (machine check recording and recovery) 189 MCRR linkage table 192 MEXIT instruction 183 MICR (magnetic ink character recognition) SYSGEN 36 table 37 MNOTE instruction 184 MOD (module generation) macros 114 model statement 178,179 modular/tabular system, definition of 113 module generation (MOD) macros 114 MPS, multiprogramming support (see multiprogramming) multiple link edits example 165 multiple wait facility (see WAITM) multiprogramming (MPS) concepts 18 control method 20 CPO concept 27 operational considerations 27 partitioning 20 programming considerations 28 storage map 19 system considerations 27 system generation guidelines 28 task selection 20 multitasking considerations for checkpoint 166,167 multitasking examples 45 ATTACH macro 47 DETACH macro 47 ENQ/DEQ and RCB 48 POST macro 51 multitasking examples (CONT.) STXIT AB macro 53 track hold 55 WAITM macro 52 multitasking abnormal termination 39,44 access to communication region 43 checkpoint consideration 43 definition of 38 examples 45 intertask communication 42 macro usage 39 maximum tasks 43 multiple wait 39 operator intervention 43 priorities 38,43 reentrant modules 39 register usage 43 resource contention 44 resource protection 41,43 storage protection 43 STXIT macro usage 43 subtask cancelation 44 subtask initiation 39 subtask termination 39 system generation guidelines 44 system logical units 43 track hold 38,43 wait considerations 44 NICL (number in class) table 59 OC (operator communications) support concept 56 considerations 56 option table 57 OLTEP (On-Line Test Executive Program) 194 OLTEP OLTS 194 RETAIN/370 194 OLTS (On-Line Tests) 194 On-Line Test Executive Program (OLTEP) 194 On-Line Tests (OLTS) 194 OPTION statement 141,147 option tables; IT,PC,OC,AB 57 organization file 122-133 system residence 15 overflow area (ISFMS) cylinder 132 independent 132 overflow record handling (DAM) chaining 127 127 consecutive spill 127 preassigned tracks overflow records (ISFMS) 130,132 overlay 147 communication 149 techniques 148 tree design 147 overlay (CONT.) tree structure 147 packing factor (DAM) 127 paper tape (DTFPT/PTMOD) files 122 partition size specification 84 partition definition of 18,20 types of 20 PC (program check) support concept 58 option table 57 PCI (program controlled interrupt) 141 PCIL (private core image libraries) 76 PDAID (problem determination aids) 194 PHASE statement 141,144 phase, definition of 147 Physical I/O Control System (PIOCS) CCB 100,102 CCW 106 EXCP 100 sample program 110 WAIT 100 physical IOCS sample program 110 physical transient overlap support 62 physical unit block (see PUB) physical unit, definition of 99 PIB (program information block) table 195 PIOCS (see physical input/output control system) PL/I program debugging aids 255 PL/I program compile time aborts 264 debugging aids 263,264 debugging summary 263 sample 265 POST macro 23 cancel conditions 43 example 51 use of 42 preassigned tracks overflow technique (DAM) 127 prime data area (ISFMS) 129 prime number _division ,126 prime number, definition of 126 Printer, IBM 3211 173 priority system multiprogramming 20 multitasking 38 private core image libraries link edit considerations 141,144 sysgen guidelines 81 system considerations 76 problem determination aids DUMPGEN 189 EREP 189 LSERV 189 MCAR/CCH 189 MCRR 189 OLTEP 194 PDArD 194 RMS 189 processing methods direct access method 112 Index 293 processing methods (CaNT.) ISFMS 112 sequential 111 program check support concept 58 option table 57 program design 139-186 program overlay structure 147 prototype statement, macro 178 PTa (physical transient overlap) support 62 PUB (physical unit block) format of 59,89 use of 87 QTAM trace 194 random addressing formula 125 techniques 124 random retrieval (ISFMS) 132 randomizing, definition of 126 RCB (resource control block) 41,43 RCB and ENQ/DEQ macros example 48 ROE (reliability data extractor) 189 RDONLY parameter 118 record definition 93 record types fixed length, blocked 95 fixed length, unblocked 94 undefined 96 variable length, blocked 96 variable length, unblocked 96 recovery management support (RMS) 189 reentrant modules 39,118 relative track addressing 128 reliability data extractor (RDE) 189 relocatable module name prefixes 118 relocating address constants 151 repositioning I/O files DASD 171 magnetic tape 170 REQID (requestor identification) table 85 rescheduling multiplexor channel 87 rescheduling selector channel 87 resource contention 44 resource control block (see RCB) resource protection 41,43 restarting checkpointed programs 173 RETAIN/370 194 RMS (recovery management support) 189 RPG program debugging aids 243 halt analysis 243 RPG sample program 245 RSTRT statement 173 SAB (seek address block) definition of 62 format of 59 294 DOS System Programmer's Guide 59 sample file organizations 136 sample programs COBOL 207 FORTRAN 234 physical laCS 110 PL/I 265 RPG 245 self-relocating 153 STXIT 69 SDR communications region 190 seek address block (see SAB) seek separate support concept 62 system generation guidelines 62 self-relocating programs advantages 150 disadvantages 150 programming techniques 150 rules for writing 149 sample program 153 self-relocating example 165 sample program 153 sequence symbols 182 sequential DASD 123 sequential files DASO 123 magnetic tape 122 unit record 122 111 sequential processing method sequential retrieval (ISFMS) 132 SET symbols defining of 180 global 180 local 180 versus symbolic parameters 180 single program initiator 28 SKSEP (see seek separate support) SLI (suppress incorrect length indication) (see CCW) 28 SPI (single program initiator) STXIT AB macro example 53 STXIT macro AB parameter 57,67 IT parameter 56,57 OC parameter 56,57 PC parameter 57,58 sample program 69 use of 43,67 STXIT sample program 69,157 sublist notation 179 submodular structure example 163 subtask cancelation 44 definition of 38 initiation 39 priority 38,43 termination 39 supervisor calls (SVC), list of 21 supervisor calls list 21 o (EXCP) 23 23 7 O"lAIT) supervisor communications region 218 supervisor planning concepts 13-90 superv1sor tables AB option 57 BG communications region 35 CBF 64 CHANQ 59 device type codes 90 DIB 75 ECB 41 FAVP 59 FICL 59 FLPTR 59 FOCL 59 IT option 57 JIB 59,72 job accounting 83 LUB 59,71 LUBDSP 59,85 LUBID 59,85 MCAR linkage area 193 MCRR linkage table 192 MICR 37 NICL 59 OC option 57 PC option 57 PIB 195 PUB 59,89 RCB 41 REQID 59,85 SAB 59 SDR communications 190 SVC list 21 system communications 30 TEB 59,60 TEBV 59,61 THFLPTR 59 TKHDTAB 59 TKREQID 59,85 SUPVR macro MICR 36 multiprogramming 18 multitasking 38 SVC 0 (EXCP) 23 SVC 7 (WAIT) 23 symbolic parameter 179 synonyms definition of 125 techniques for handling 127 SYSBUFLD 173 SYSFIL (system files on disk) support concept of 74 considerations 75 sysgen 76 SYSRES (system residence) organization 15 system communications region 30 system files on disk support (see SYSFIL support) system residence organization 15 system variable symbols 181 tape error block (see TEB) tape error recording ESTV 58 tape error recording (CONT.) EVA 58 TEB 58 task selection 20 TEB (tape error block) concept of 58 format of 59,60 TEBV (to specify ESTV) 58 TEBV table format of 59,61 THFLPTR ( track hold free list pointer) 59 TKHDTAB (track hold table) table 59 TKREQID (track requestor identification) table 59,85 trace F/L trace 194 GSVC trace 194 I/O trace 194 QTAM trace 194 track hold 129 track hold example 55 track hold facility (see TRKHLD) track index (ISFMS) definition of 129 normal entry 129 overflow entry 130 trailer labels, checkpoint 168,172 trailer statement 178,179 tree, definition of 147 TRKHLD (track hold) facility LIOCS considerations 65,66 supervisor considerations 65 system generation 67 types of file organization direct access method 124 ISFMS 129 sequential DASD 123 sequential tape 122 sequential unit record 122 undefined records 96 unit record files card 122 console typewriter line printers 122 paper tape 122 122 variable length records ASCII 96 blocked 96 unblocked 96 variable symbols SET 180 symbolic parameter 179 system variable 181 WAIT macro multitasking considerations opera tion 23 use of 70 wait states hard waits 202' 44 Index 295 GC24-5073-2 wait states (CONT.) low core error bytes 203 soft waits 202 WAITM (multiple wait) facility concept of 70 considerations 70 multitasking 39 WAITM macro example 52 3211, IBM Printer 173 llrnoo Internation! Business Machines COl')loratioll Data Processing Division tt!! Westchester Avenue, White Plains, New York 10894 [U.S.A. only] IBM World Trade Corperatioll 821 United Nations Plaza, New Yurk, New Yark 10017 [International] DOS System Programmer's Guide READER'S COMMENT FORM GC24-S073-2 This sheet is for comments and suggestions about this manual. We would appreciate your views, favorable or unfavorable, in order to aid us in improving this publication. This form will be sent directly to the author's department. Please include your name and address if you wish a reply. Contact your IBM branch office for answers to technical questions about the system or when requesting additional publications. Thank you. Name How did you use this manual? Address As a reference source As a classroom text As a self-study text What is your occupation? Your comments· and suggestions: * We would especially appreciate your comments on any of the following topics: Clarity of the text Organization of the text Accuracy Cross-references Index Tables Illustrations Examples Appearance Printing Paper Binding GC24-5073-2 YOUR COMMENTS, PLEASE .•• This manual is part of a library that serves as a reference source for systems analysts, programmers and operators of IBM systems. Your answers to the questions on the back of this form, together with your comments, will help us produce better publications for your use. Each reply will be carefully reviewed by the persons responsible for writing and publishing this material. All comments and suggestions become the property of IBM. n c -I » r- o Z G) -I ::t: en Please note: Requests for copies of publications and for assistance in utilizing your IBM system should ,be directed to your.IBM representative or to the IBM sales office serving your locality. r- Z n1 Fold Fold , .......................................................................................................................·: ·· FIRST CLASS PERMIT NO. 1359 WHITE PLAINS. N. Y. BUSINESS REPLY MAIL NO POSTAGE STAMP NECESSARY IF MAILED IN THE UNITED STATES POSTAGE WILL BE PAID BY .•. I BM Corporation 112 East Post Road White Plains, N.Y. 1060.1 ., a cc iil Attention: Department 813 U 3 3 ......................................................................................................................... · Fold / International Business Machines Corporation Data Processing Division 1133 Westchester Avenue, White Plains, New York 10604 [U.S.A. only] IBM World Trade Corporation 821 United Nations Plaza, New York, New York 10017 [International] Fold ., CD ui
Source Exif Data:
File Type : PDF File Type Extension : pdf MIME Type : application/pdf PDF Version : 1.3 Linearized : No XMP Toolkit : Adobe XMP Core 4.2.1-c043 52.372728, 2009/01/18-15:56:37 Create Date : 2012:06:01 10:28:04-08:00 Modify Date : 2012:06:01 12:52:47-07:00 Metadata Date : 2012:06:01 12:52:47-07:00 Producer : Adobe Acrobat 9.51 Paper Capture Plug-in Format : application/pdf Document ID : uuid:3fee1d4e-997d-4ffb-b0e3-866fde654eb6 Instance ID : uuid:9dc065c7-d914-426e-bc10-3c70b2272417 Page Layout : SinglePage Page Mode : UseNone Page Count : 298EXIF Metadata provided by EXIF.tools