HLASM V1R6 Programmer's Guide - IBM ... Chapter 12. CMS system services and programming...

Click here to load reader

  • date post

    05-Jul-2020
  • Category

    Documents

  • view

    1
  • download

    0

Embed Size (px)

Transcript of HLASM V1R6 Programmer's Guide - IBM ... Chapter 12. CMS system services and programming...

  • High Level Assembler for z/OS & z/VM & z/VSE

    Programmer's Guide Version 1 Release 6

    SC26-4941-08

    IBM

  • High Level Assembler for z/OS & z/VM & z/VSE

    Programmer's Guide Version 1 Release 6

    SC26-4941-08

    IBM

  • Note Before using this information and the product it supports, be sure to read the general information under “Notices” on page 427.

    This edition applies to IBM High Level Assembler for z/OS & z/VM & z/VSE, Release 6, Program Number 5696-234 and to any subsequent releases until otherwise indicated in new editions. Make sure that you are using the correct edition for the level of the product.

    Order publications through your IBM representative or the IBM branch office serving your locality.

    IBM welcomes your comments. For information on how to send comments, see “How to send your comments to IBM” on page xxi.

    © Copyright IBM Corporation 1992, 2017. US Government Users Restricted Rights – Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.

  • Contents

    Figures . . . . . . . . . . . . . . . ix

    Tables . . . . . . . . . . . . . . . xi

    About this document . . . . . . . . xiii Who should use this document . . . . . . . xiii Programming interface information . . . . . . xiii Organization of this document. . . . . . . . xiii High Level Assembler documents . . . . . . . xv

    Documents . . . . . . . . . . . . . xv Collection kits . . . . . . . . . . . . xvi

    Related publications . . . . . . . . . . . xvii Syntax notation . . . . . . . . . . . . xvii

    How to send your comments to IBM xxi If you have a technical problem . . . . . . . xxi

    Summary of changes. . . . . . . . xxiii

    Chapter 1. Introduction . . . . . . . . 1 Requirements . . . . . . . . . . . . . . 1

    System requirements. . . . . . . . . . . 1 Machine requirements . . . . . . . . . . 1 Storage requirements . . . . . . . . . . 2

    Compatibility . . . . . . . . . . . . . . 2 Assembler language support . . . . . . . . 2 Migration considerations . . . . . . . . . 3

    Chapter 2. Using the assembler listing . 5 High Level Assembler option summary . . . . . 6 External Symbol Dictionary (ESD) . . . . . . . 10 Source and object . . . . . . . . . . . . 13 Relocation dictionary (RLD) . . . . . . . . . 19 Ordinary symbol and literal cross reference. . . . 20 Unreferenced symbols defined in CSECTs . . . . 22 Macro and copy code source summary . . . . . 22 Macro and copy code cross reference . . . . . . 23

    Effects of LIBMAC and PCONTROL(MCALL) options . . . . . . . . . . . . . . . 24

    DSECT cross reference . . . . . . . . . . . 27 USING map . . . . . . . . . . . . . . 27 General Purpose Register cross reference . . . . 29 Diagnostic cross reference and assembler summary 30 Terminal output . . . . . . . . . . . . . 33

    Chapter 3. Controlling your assembly with options . . . . . . . . . . . . 35 The sources of assembler options . . . . . . . 35

    Precedence of assembler options . . . . . . 35 Fixed installation default options . . . . . . 36 *PROCESS OVERRIDE Statement Options . . . 36 ASMAOPT options . . . . . . . . . . . 36 Invocation options . . . . . . . . . . . 36

    *PROCESS statement options . . . . . . . 37 Default options . . . . . . . . . . . . 37 Invoking the assembler dynamically . . . . . 38 Coding rules . . . . . . . . . . . . . 38

    Assembler options . . . . . . . . . . . . 39 ADATA. . . . . . . . . . . . . . . 39 ALIGN . . . . . . . . . . . . . . . 39 ASA (z/OS and CMS) . . . . . . . . . . 40 BATCH. . . . . . . . . . . . . . . 40 CODEPAGE . . . . . . . . . . . . . 41 COMPAT . . . . . . . . . . . . . . 42 DBCS . . . . . . . . . . . . . . . 43 DECK . . . . . . . . . . . . . . . 44 DISK (CMS) . . . . . . . . . . . . . 44 DXREF . . . . . . . . . . . . . . . 44 ERASE (CMS) . . . . . . . . . . . . 45 ESD . . . . . . . . . . . . . . . . 45 EXIT. . . . . . . . . . . . . . . . 46 FAIL. . . . . . . . . . . . . . . . 49 FLAG . . . . . . . . . . . . . . . 51 FOLD . . . . . . . . . . . . . . . 55 GOFF (z/OS and CMS) . . . . . . . . . 55 ILMA . . . . . . . . . . . . . . . 57 INFO . . . . . . . . . . . . . . . 57 LANGUAGE . . . . . . . . . . . . . 58 LIBMAC . . . . . . . . . . . . . . 59 LINECOUNT . . . . . . . . . . . . . 59 LIST . . . . . . . . . . . . . . . . 60 MACHINE . . . . . . . . . . . . . 61 MXREF . . . . . . . . . . . . . . . 62 OBJECT . . . . . . . . . . . . . . 63 OPTABLE . . . . . . . . . . . . . . 64 PCONTROL . . . . . . . . . . . . . 66 PESTOP . . . . . . . . . . . . . . 68 PRINT (CMS). . . . . . . . . . . . . 68 PROFILE . . . . . . . . . . . . . . 69 RA2 . . . . . . . . . . . . . . . . 70 RENT . . . . . . . . . . . . . . . 70 RLD . . . . . . . . . . . . . . . . 71 RXREF . . . . . . . . . . . . . . . 71 SECTALGN . . . . . . . . . . . . . 72 SEG (CMS) . . . . . . . . . . . . . 72 SIZE. . . . . . . . . . . . . . . . 73 SUPRWARN . . . . . . . . . . . . . 74 SYSPARM . . . . . . . . . . . . . . 75 TERM . . . . . . . . . . . . . . . 76 TEST . . . . . . . . . . . . . . . 77 THREAD . . . . . . . . . . . . . . 77 TRANSLATE . . . . . . . . . . . . . 78 TYPECHECK . . . . . . . . . . . . . 78 USING . . . . . . . . . . . . . . . 80 WORKFILE . . . . . . . . . . . . . 82 XOBJECT (z/OS and CMS) . . . . . . . . 83 XREF . . . . . . . . . . . . . . . 83

    © Copyright IBM Corp. 1992, 2017 iii

    ||

  • Chapter 4. Providing user exits . . . . 85 Exit types . . . . . . . . . . . . . . . 85 Specifying user exits . . . . . . . . . . . 86 Loading user exits . . . . . . . . . . . . 87 Calling user exits . . . . . . . . . . . . 88 Exit parameter list . . . . . . . . . . . . 88

    Request info pointer . . . . . . . . . . 89 Buffer pointer . . . . . . . . . . . . 97 Error buffer pointer. . . . . . . . . . . 97 Exit-specific information pointer . . . . . . 97 DCB pointer . . . . . . . . . . . . . 97 Static assembler information pointer . . . . . 98 HLASM Services Interface pointer . . . . . . 98

    Error handling . . . . . . . . . . . . . 98 Exit-Specific Information Block . . . . . . . . 99 SOURCE exit processing. . . . . . . . . . 102

    OPEN . . . . . . . . . . . . . . . 102 CLOSE . . . . . . . . . . . . . . 103 READ . . . . . . . . . . . . . . . 103 PROCESS . . . . . . . . . . . . . 104

    LIBRARY exit processing . . . . . . . . . 105 OPEN . . . . . . . . . . . . . . . 105 CLOSE . . . . . . . . . . . . . . 106 READ . . . . . . . . . . . . . . . 106 PROCESS MACRO or PROCESS COPY . . . 107 FIND MACRO or FIND COPY . . . . . . 107 END OF MEMBER . . . . . . . . . . 109

    LISTING exit processing . . . . . . . . . . 111 OPEN . . . . . . . . . . . . . . . 112 CLOSE . . . . . . . . . . . . . . 113 WRITE . . . . . . . . . . . . . . 113 PROCESS. . . . . . . . . . . . . . 113

    OBJECT (z/OS and CMS) and PUNCH exit processing . . . . . . . . . . . . . . 115

    OPEN . . . . . . . . . . . . . . . 116 CLOSE . . . . . . . . . . . . . . 117 WRITE . . . . . . . . . . . . . . 117 PROCESS. . . . . . . . . . . . . . 117

    ADATA exit processing . . . . . . . . . . 118 OPEN . . . . . . . . . . . . . . . 119 CLOSE . . . . . . . . . . . . . . 120 WRITE . . . . . . . . . . . . . . 120 PROCESS . . . . . . . . . . . . . 120

    TERM exit processing . . . . . . . . . . 121 OPEN . . . . . . . . . . . . . . . 122 CLOSE . . . . . . . . . . . . . . 122 WRITE . . . . . . . . . . . . . . 122 PROCESS . . . . . . . . . . . . . 123

    Sample user exits . . . . . . . . . . . . 124 User exit coding example . . . . . . . . . 124

    OBJECT and PUNCH exit—OBJEXIT . . . . 125 ADATA Exit—ADEXIT . . . . . . . . . 125 TERM exit—TRMEXIT . . . . . . . . . 125

    Chapter 5. Providing external functions . . . . . . . . . . . . . 145 External function processing . . . . . . . . 145 Linkage conventions . . . . . . . . . . . 146 External function parameter list . . . . . . . 146

    Request information list . . . . . . . . . 148

    Pointer to user work area . . . . . . . . 150 Pointer to static assembler information . . . . 151 Pointer to msg buffer . . . . . . . . . . 151 Pointer to return string (SETCF) . . . . . . 151 Pointer to parm string n (SETCF) . . . . . . 151

    Chapter 6. Diagnosing assembly errors. . . . . . . . . . . . . . . 153 Assembly error diagnostic messages. . . . . . 153 MNOTE statements . . . . . . . . . . . 155 Alerting to assembly warnings . . . . . . . 157 Suppression of error messages and MNOTE statements . . . . . . . . . . . . . . 157 Reference information for statements in error. . . 157 Abnormal assembly termination . . . . . . . 157 MHELP - macro trace facility . . . . . . . . 158

    Chapter 7. Assembling your program on z/OS . . . . . . . . . . . . . . 159 Input to the assembler . . . . . . . . . . 159 Output from the assembler . . . . . . . . . 159 Invoking the assembler on z/OS . . . . . . . 159 Invoking the assembler on TSO . . . . . . . 161 Invoking the assembler dynamically. . . . . . 162 Batch assembling . . . . . . . . . . . . 164 Input and output data sets . . . . . . . . . 165

    Specifying the source data set: SYSIN . . . . 168 Specifying the option file: ASMAOPT . . . . 168 Specifying macro and copy code libraries: SYSLIB . . . . . . . . . . . . . . 168 Specifying the listing data set: SYSPRINT . . . 169 Directing assembler messages to your terminal: SYSTERM . . . . . . . . . . . . . 169 Specifying object code data sets: SYSLIN and SYSPUNCH . . . . . . . . . . . . . 169 Specifying the associated data data set: SYSADATA . . . . . . . . . . . . . 170 Specifying the utility data data set: SYSUT1 . . 170

    Return codes . . . . . . . . . . . . . 170

    Chapter 8. Linking and running your program on z/OS . . . . . . . . . . 171