HLASM Programmer's Guide
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Batch assembling

HLASM Programmer's Guide
SC26-4941-06

A sequence of separate assembler programs can be assembled with a single invocation of the assembler when the BATCH option is specified. The object programs produced from this assembly can be linked into either a single program module or separate program modules.

When the BATCH option is specified, each assembler program in the sequence must be terminated by an END statement, including the last program in the batch. If an END statement is omitted, the program is assembled with the next program in the sequence. If the END statement is omitted from the last program in the sequence, an END statement is generated by the assembler. When the BATCH option is specified, and more than one assembler program exists in the sequence, a summary line is printed after the final assembly listing. The summary line summarizes the number of assembler programs in the sequence, and the highest return code from the assemblies.

If you want to produce more than one program module, you must either separate the object modules, or write a NAME linkage editor control statement for each load module. The NAME statement must be written at the end of the object module. The following example shows how to create two program modules, SECT1 and SECT2.
SECT1    CSECT          Start of first load module
         ⋮
         Source instructions
         ⋮
         END            End of first load module
         PUNCH ' NAME SECT1(R)'
         END
SECT2    CSECT          Start of second load module
         ⋮
         Source instructions
         ⋮
         END            End of second load module
         PUNCH ' NAME SECT2(R)'
         END

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014