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


Invoking the assembler in batch

HLASM Programmer's Guide
SC26-4941-06

The JCL for running an assembly includes:
  • A job description.
  • Definitions for the files needed.
  • A statement to run the assembler.
The following example shows how to run the assembler.
Figure 1. JCL to assemble a program
// JOB jobname                                              1 
// DLBL IJSYS03,'HLASM.WORK.IJSYS03',0,VSAM,RECSIZE=4096,   2 
               RECORDS=(100,50),DISP=(NEW,KEEP),CAT=VSESPUC
// DLBL IJSYSLN,'HLASM.WORK.IJSYSLN',0,VSAM,RECSIZE=322,    3 
               RECORDS=(100,50),DISP=(NEW,KEEP),CAT=VSESPUC
// LIBDEF PHASE,SEARCH=(PRD2.PROD)                          4 
// LIBDEF SOURCE,SEARCH=(lib.sublib)                        5 
// OPTION LINK                                              6 
// EXEC ASMA90,SIZE=ASMA90                                  7 
⋮
Assembler source statements
⋮
/*                                                          8 
/&                                                          9 
 1 
Identifies the beginning of your job to the operating system. jobname is the name you assign to the job.
 2 
Defines the work file to be used by the assembler. The work file must be on a direct-access storage device. The work file can be a SAM file or a SAM-ESDS file. This statement is not required if IJSYS03 is defined in the System Standard or Partition Standard labels.
 3 
Defines the SYSLNK file that receives the object records produced from the LINK option. This statement is not required if IJSYSLN is defined in the System Standard or Partition Standard labels.
 4 
Specifies the sublibrary where the assembler resides.
 5 
Specifies the sublibraries that are to be searched to locate any macro and copy members, and the ASMAOPT.USER member (if required).
 6 
Sets the LINK option and the Assembler OBJECT option which causes the assembler to write the object records produced to SYSLNK.
 7 
Invokes the assembler to process the assembler source statements that follow the EXEC statement.

The SIZE parameter of the EXEC statement specifies SIZE=ASMA90. This sets the size of program storage to the size of the phase ASMA90 and makes all the remaining storage in the partition GETVIS storage. High Level Assembler does not use program storage.

 8 
The end-of-data statement indicates the end of input to the assembler (source code), and separates data from subsequent job control statements in the input stream.
 9 
The end-of-job statement indicates the end of the job.

These statements cause the assembler to assemble your program and to produce a listing (described in Using the assembler listing) and an object module (described in Object deck output).

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014