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


Batch assembling

HLASM Programmer's Guide
SC26-4941-06

You can assemble a sequence of separate assembler programs with a single invocation of the assembler, using the BATCH option. The object programs produced from this assembly can be link-edited into either a single load module or separate load 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 assembles with the next program in the sequence. If the END statement is omitted from the last program in the sequence, the assembler generates an END statement.

If separate executable modules are to be produced, 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. Figure 1 shows how to create two load modules, SECT1 and SECT2.
Figure 1. Example of creating two load modules on CMS
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

If separate TEXT files are required, you must either manually separate the BATCH- produced object modules into separate TEXT files, or issue two separate ASMAHL commands for separate source modules.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014