HLASM V1R6 Programmer's Guide Running Your Assembled Program on TSO
Total Page:16
File Type:pdf, Size:1020Kb
High Level Assembler for z/OS & z/VM & z/VSE IBM Programmer's Guide Version 1 Release 6 SC26-4941-08 High Level Assembler for z/OS & z/VM & z/VSE IBM Programmer's Guide Version 1 Release 6 SC26-4941-08 Note Before using this information and the product it supports, be sure to read the general information under “Notices” on page 425. 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 *PROCESS statement options ....... 37 Default options ............ 37 Tables ............... xi Invoking the assembler dynamically ..... 38 Coding rules ............. 38 Assembler options ............ 39 About this document ........ xiii ADATA............... 39 Who should use this document ....... xiii ALIGN ............... 39 Programming interface information ...... xiii ASA (z/OS and CMS) .......... 40 Organization of this document........ xiii BATCH............... 40 High Level Assembler documents ....... xv CODEPAGE ............. 41 Documents ............. xv COMPAT .............. 42 Collection kits ............ xvi DBCS ............... 43 Related publications ........... xvii DECK ............... 44 Syntax notation ............ xvii DISK (CMS) ............. 44 DXREF ............... 44 How to send your comments to IBM xxi ERASE (CMS) ............ 45 If you have a technical problem ....... xxi ESD ................ 45 EXIT................ 46 Summary of changes........ xxiii FAIL................ 49 FLAG ............... 50 Chapter 1. Introduction ........ 1 FOLD ............... 53 GOFF (z/OS and CMS) ......... 54 Requirements .............. 1 | ILMA ............... 55 System requirements........... 1 INFO ............... 56 Machine requirements .......... 1 LANGUAGE ............. 57 Storage requirements .......... 2 LIBMAC .............. 57 Compatibility .............. 2 LINECOUNT ............. 58 Assembler language support ........ 2 LIST ................ 59 Migration considerations ......... 3 MACHINE ............. 60 MXREF ............... 62 Chapter 2. Using the assembler listing . 5 OBJECT .............. 63 High Level Assembler option summary ..... 6 OPTABLE .............. 64 External Symbol Dictionary (ESD) ....... 10 PCONTROL ............. 66 Source and object ............ 13 PESTOP .............. 68 Relocation dictionary (RLD) ......... 19 PRINT (CMS)............. 68 Ordinary symbol and literal cross reference.... 20 PROFILE .............. 68 Unreferenced symbols defined in CSECTs .... 22 RA2 ................ 69 Macro and copy code source summary ..... 22 RENT ............... 70 Macro and copy code cross reference ...... 23 RLD ................ 70 Effects of LIBMAC and PCONTROL(MCALL) RXREF ............... 71 options ............... 24 SECTALGN ............. 71 DSECT cross reference........... 27 SEG (CMS) ............. 72 USING map .............. 27 SIZE................ 72 General Purpose Register cross reference .... 29 SUPRWARN ............. 74 Diagnostic cross reference and assembler summary 30 SYSPARM .............. 75 Terminal output ............. 33 TERM ............... 75 TEST ............... 76 Chapter 3. Controlling your assembly THREAD .............. 77 with options ............ 35 TRANSLATE ............. 77 The sources of assembler options ....... 35 TYPECHECK ............. 78 Precedence of assembler options ...... 35 USING ............... 79 Fixed installation default options ...... 36 WORKFILE ............. 81 *PROCESS OVERRIDE Statement Options ... 36 XOBJECT (z/OS and CMS) ........ 82 ASMAOPT options ........... 36 XREF ............... 82 Invocation options ........... 36 © Copyright IBM Corp. 1992, 2017 iii Chapter 4. Providing user exits .... 85 Pointer to user work area ........ 150 Exit types ............... 85 Pointer to static assembler information .... 151 Specifying user exits ........... 86 Pointer to msg buffer.......... 151 Loading user exits ............ 87 Pointer to return string (SETCF) ...... 151 Calling user exits ............ 88 Pointer to parm string n (SETCF) ...... 151 Exit parameter list ............ 88 Request info pointer .......... 89 Chapter 6. Diagnosing assembly Buffer pointer ............ 97 errors............... 153 Error buffer pointer........... 97 Assembly error diagnostic messages...... 153 Exit-specific information pointer ...... 97 MNOTE statements ........... 155 DCB pointer ............. 97 Alerting to assembly warnings ....... 157 Static assembler information pointer ..... 98 Suppression of error messages and MNOTE HLASM Services Interface pointer ...... 98 statements .............. 157 Error handling ............. 98 Reference information for statements in error... 157 Exit-Specific Information Block ........ 99 Abnormal assembly termination ....... 157 SOURCE exit processing.......... 102 MHELP - macro trace facility ........ 158 OPEN ............... 102 CLOSE .............. 103 Chapter 7. Assembling your program READ ............... 103 PROCESS ............. 104 on z/OS .............. 159 LIBRARY exit processing ......... 105 Input to the assembler .......... 159 OPEN ............... 105 Output from the assembler ......... 159 CLOSE .............. 106 Invoking the assembler on z/OS ....... 159 READ ............... 106 Invoking the assembler on TSO ....... 161 PROCESS MACRO or PROCESS COPY ... 107 Invoking the assembler dynamically...... 162 FIND MACRO or FIND COPY ...... 107 Batch assembling ............ 164 END OF MEMBER .......... 109 Input and output data sets ......... 165 LISTING exit processing .......... 111 Specifying the source data set: SYSIN .... 168 OPEN ............... 112 Specifying the option file: ASMAOPT .... 168 CLOSE .............. 113 Specifying macro and copy code libraries: WRITE .............. 113 SYSLIB .............. 168 PROCESS.............. 113 Specifying the listing data set: SYSPRINT ... 169 OBJECT (z/OS and CMS) and PUNCH exit Directing assembler messages to your terminal: processing .............. 115 SYSTERM ............. 169 OPEN ............... 116 Specifying object code data sets: SYSLIN and CLOSE .............. 117 SYSPUNCH ............. 169 WRITE .............. 117 Specifying the associated data data set: PROCESS.............. 117 SYSADATA ............. 169 ADATA exit processing .......... 118 Specifying the utility data data set: SYSUT1 .. 170 OPEN ............... 119 Return codes ............. 170 CLOSE .............. 120 WRITE .............. 120 Chapter 8. Linking and running your PROCESS ............. 120 program on z/OS .......... 171 TERM exit processing .......... 121 The program management binder ...... 171 OPEN ............... 122 The loader .............. 173 CLOSE .............. 122 Creating a load module .......... 173 WRITE .............. 122 Creating a load module on z/OS ...... 173 PROCESS ............. 123 Creating a load module on TSO ...... 173 Sample user exits ............ 124 Input to the binder ........... 174 User exit coding example ......... 124 Data sets for binder processing ...... 175 OBJECT and PUNCH exit—OBJEXIT .... 125 Additional object modules as input ..... 176 ADATA Exit—ADEXIT ......... 125 Output from the binder .......... 176 TERM exit—TRMEXIT ......... 125 Binder processing options ........ 177 Specifying binder options through JCL .... 177 Chapter 5. Providing external Specifying binder options using the TSO LINK functions ............. 145 command ............. 178 External function processing ........ 145 AMODE and RMODE attributes ...... 178 Linkage conventions ........... 146 Overriding the defaults ......... 179 External function parameter list ....... 146 Detecting binder errors ......... 179 Request information list ......... 148 Running your assembled program ...... 179 Running your assembled program in batch .. 180 iv HLASM V1R6 Programmer's Guide Running your assembled program on TSO .. 180 Passing parameters to your assembler language program ............... 210 Chapter 9. z/OS system services and programming considerations .... 181 Chapter 13. Assembling your program Using cataloged procedures ........ 181 on z/VSE ............. 213 Cataloged procedure for assembly (ASMAC) 181 Input to the assembler .......... 213 Cataloged procedure for assembly and link Output from the assembler ......... 213 (ASMACL) ............. 182 Invoking the assembler in batch ....... 213 Cataloged procedure for assembly, link, and run Invoking the assembler on ICCF ....... 214 (ASMACLG) ............ 184 Invoking the assembler dynamically...... 217 Cataloged procedure for assembly and run Batch assembling ............ 217 (ASMACG) ............. 186 Controlling your assembly ......... 218 Overriding statements in cataloged procedures 187 Input and output files .......... 219 Examples of cataloged procedures ..... 188 Specifying the source file: SYSIPT ..... 221 Operating system programming conventions ... 189 Specifying macro and copy code libraries: Saving and restoring general register contents 190 LIBDEF job control statement ....... 222 Ending program execution ......... 190 Specifying the