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


Invoking the assembler on z/OS

HLASM Programmer's Guide
SC26-4941-06

The JCL for running an assembly includes:
  • A job description.
  • A statement to run the assembler.
  • Definitions for the data sets needed.
The simplest way to assemble your program on z/OS is to code JCL that uses the cataloged procedure shown in Figure 1.
Figure 1. JCL for assembly, using cataloged procedure
//jobname  JOB accountno,progrname,MSGLEVEL=1   1 
//stepname EXEC ASMAC                           2 
//SYSIN    DD   *                               3 
⋮
Assembler source statements
⋮
/*
 1 
Identifies the beginning of your job to the operating system. jobname is the name you assign to the job. accountno specifies the account to which your job is charged, and progrname is the name of the programmer responsible for the job. MSGLEVEL=1 specifies that the job control statements connected with this job are to be listed. Check what parameters are required at your installation and how they must be specified.
 2 
Calls the cataloged procedure ASMAC. As a result, a number of job control statements are included in the job from the procedure library. ASMAC is described under Cataloged procedure for assembly (ASMAC); an expanded job stream is shown there.
 3 
Specifies that the assembler language source program follows immediately after this statement.
These statements cause the assembler to assemble your program, produce a listing, and write an object module to the SYSLIN data set. If you do not want an object module written to the SYSLIN data set, use the following job control statements to assemble the program:
Figure 2. JCL for assembly, using cataloged procedure, with NOOBJECT
//jobname  JOB  accountno,progrname,MSGLEVEL=1
//stepname EXEC ASMAC,PARM=NOOBJECT
//SYSIN    DD   *
⋮
Assembler source statements
⋮
/*

Assembler Options: The second parameter (PARM) specifies the assembler option NOOBJECT, which tells the assembler not to write the object module to SYSLIN. For a full discussion of assembler options, see Controlling your assembly with options.

Using your own JCL: The cataloged procedures might not comply with your data processing requirements. Figure 3 shows sample job control statements that you can use instead to assemble your program.
Figure 3. JCL for assembly
//ASMJOB   JOB  1,MSGLEVEL=1
//ASSEMBLY EXEC PGM=ASMA90,PARM=OBJECT
//SYSPRINT DD   SYSOUT=A
//SYSTERM  DD   SYSOUT=A
//ASMAOPT  DD   DSNAME=PROG.OPTIONS,DISP=OLD
//SYSLIN   DD   DSNAME=PROG.OBJ,DISP=OLD
//SYSPUNCH DD   DSNAME=PROG.DECK,DISP=OLD
//SYSADATA DD   DSNAME=PROG.ADATA,DISP=OLD
//SYSIN    DD   DSNAME=PROG.SOURCE,DISP=SHR

Refer to Bibliography for a list of JCL documents that describe additional techniques for specifying job control statements and overriding cataloged procedures.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014