[◀ JCL Batch Jobs]
- Assembling, linking and executing
//*
//* +----1----+----2----+----3----+----4----+----5----+----6----+----7-
//*
//* Assemble
//STEP1 EXEC PGM=ASMA90,
// PARM=(NOTERM,'LIST,NODECK,OBJECT,XREF(FULL),NORENT')
//SYSLIB DD DISP=SHR,DSN=SYS1.MACLIB
// DD DISP=SHR,DSN=SYS1.MODGEN
// DD DISP=SHR,DSN=other.lib.name
//SYSUT1 DD UNIT=VIO,SPACE=(CYL,(5,5))
//SYSUT2 DD UNIT=VIO,SPACE=(CYL,(5,5))
//SYSUT3 DD UNIT=VIO,SPACE=(CYL,(5,5))
//SYSLIN DD DISP=SHR,DSN=object.code.lib.name(progname)
//SYSPRINT DD DISP=SHR,DSN=asm.output.lib.name(progname)
//SYSIN DD DISP=SHR,DSN=asm.source.lib.name(progname)
//*
//* Link
//STEP2 EXEC PGM=IEWL,
// PARM=(,'SIZE=(1000K,100K)',
// 'LET,LIST,MAP,XREF,AC=1,NORENT')
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD UNIT=VIO,SPACE=(1024,(20,20))
//SYSUT2 DD UNIT=VIO,SPACE=(1024,(20,20))
//SYSUT3 DD UNIT=VIO,SPACE=(1024,(20,20))
//SYSLIB DD DISP=SHR,DSN=SYS1.CSSLIB
//OBJECT DD DISP=SHR,DSN=object.code.lib.name
//SYSLMOD DD DISP=SHR,DSN=loadlib.name
//SYSLIN DD *
INCLUDE OBJECT(progname)
ENTRY progname
MODE AMODE(31),RMODE(24)
NAME progname(R)
/*
//*
//* Execute
//STEP3 EXEC PGM=progname,PARM='parameter1 parameter2'
//STEPLIB DD DISP=SHR,DSN=loadlib.name
//SYSUDUMP DD SYSOUT=*
//SYSPRINT DD SYSOUT=*