Generating programs with batch JCL
Programs can also be generated using batch JCL. The batch JCL executes TSO (IKJEFT01) and issues the ISPSTART command to run the main program named RAAMAIN under ISPF. The input query, or query and form, are passed as parameters into RAAMAIN.
About this task
The option settings usually displayed and set on the Program Generator panels are obtained from the ISPF profile data set allocated to the ISPPROF DD. Generating programs in batch is like generating programs using the short dialog. After the input query and form are specified, the program is generated, compiled, and run according to the default settings.
CO— required=BATCH— required=QUERY=query name — optional=FORM=form name — optional
&VARNAME=VARVALUEwhere &VARNAME is
the name of the variable and VARVALUE is the value
to supply for that variable. Do not insert spaces on either side of
the equal sign (=). The RAAVARS file must be sorted alphabetically.
Any variables for which values are not supplied use the default value.
The following JCL sample generates a program from a query named QUERY1 and a form named FORM1. The first parameter passed to RAAMAIN is CO. This tells RAAMAIN to run Program Generator. This JCL contains values for two variables in the RAAVARS DD, &VAR1 and &VAR2. This JCL also allocates the necessary DDs for QMF and Db2®. Because the facility may have to start QMF and export objects, the QMF and Db2 libraries must be allocated appropriately.
//QMFHPOC EXEC PGM=IKJEFT01,DYNAMNBR=30,REGION=2M
//SYSTSIN DD *
ISPSTART PGM(RAAMAIN) NEWAPPL(RAAX) +
PARM(CO =BATCH =QUERY=QUERY1 =FORM=FORM1)
/*
//RAAVARS DD *
&VAR1=20
&VAR2=:HOSTVAR1 SMALLINT
/*
//SYSTSPRT DD SYSOUT=*
//STEPLIB DD DSN=QMFHPO.SRAALOAD,DISP=SHR
// DD DSN=QMF.SDSQEXIT,DISP=SHR
// DD DSN=QMF.SDSQLOAD,DISP=SHR
// DD DSN=DSN.SDSNLOAD,DISP=SHR
//SYSPROC DD DSN=QMFHPO.SRAACLST,DISP=SHR
// DD DSN=QMFHPO.SRAAEXEC,DISP=SHR
// DD DSN=QMF.SDSQCLTE,DISP=SHR
// DD DSN=DSN.SDSNCLST,DISP=SHR
//SYSEXEC DD DSN=QMFHPO.SRAAEXEC,DISP=SHR
// DD DSN=QMF.SDSQEXCE,DISP=SHR
//ISPLOG DD SYSOUT=*,
// DCB=(LRECL=133,RECFM=VBA,BLKSIZE=137)
//ISPPROF DD DSN=USER.ISPF.ISPPROF,DISP=SHR
//ISPMLIB DD DSN=QMFHPO.SRAAISPM,DISP=SHR
// DD DSN=QMF.SDSQMLBE,DISP=SH
// DD DSN=DSN.SDSNSPFM,DISP=SHR
//ISPPLIB DD DSN=QMFHPO.SRAAISPP,DISP=SHR
// DD DSN=QMF.SDSQPLBE,DISP=SHR
// DD DSN=DSN.SDSNSPFP,DISP=SHR
//ISPTLIB DD DSN=QMF.SDSQTLBE,DISP=SHR
//DSQDEBUG DD SYSOUT=*,
// DCB=(RECFM=FBA,LRECL=121,BLKSIZE=12100)
//RAADEBUG DD SYSOUT=*,
// DCB=(RECFM=FBA,LRECL=121,BLKSIZE=12100)
//ADMGGMAP DD DSN=QMF.DSQMAPE,DISP=SHR