Here is an example of the JCL/program needed when running an IVP job for an Easytrieve Report Generator DB2 program which is run statically.
Easytrieve Report Generator, release 11.6
Pan/SQL 2.4C (0203)
//your job card
//**********************************************************
//EZTPLUS EXEC PGM=EZTPA00
//STEPLIB DD DISP=SHR,DSN=your.eztplus.loadlib
//***********************************************************
//* PANSQL LIBRARIES
// DD DSN=DISP=SHR,your.pansql.loadlib
//***********************************************************
//* DB2 LIBRARIES
// DD DISP=SHR,DSN=your.db2.sdsnexit.library
// DD DISP=SHR,DSN=your.db2.sdsnload.library
//SYSUDUMP DD SYSOUT=*
//SYSSNAP DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSLIN DD DISP=(NEW,PASS),DSN=&&SYSLIN,
// UNIT=SYSDA,
// DCB=(BLKSIZE=3120,LRECL=80,RECFM=FB),
// SPACE=(CYL,(1,1),RLSE)
//GENDATA DD DISP=(NEW,PASS),DSN=&&EZTDB2,
// DCB=(BLKSIZE=3120,LRECL=80,RECFM=FB),
// UNIT=SYSDA,SPACE=(3120,(100,50),RLSE)
//EZTVFM DD UNIT=SYSDA,SPACE=(CYL,(10,10))
//SYSIN DD *
PARM LINK(eztpgm-name (R)) PLAN your-plan-name BIND STATIC-ONLY
FILE SQLFILE SQL +
(SELECT NAME, CREATOR +
FROM SYSIBM.SYSTABLES +
INTO :NAME, :CREATOR)
SQL INCLUDE LOCATION * FROM SYSIBM.SYSTABLES
DEFINE WS-COUNT W 2 N 0
*
JOB INPUT SQLFILE
WS-COUNT = WS-COUNT + 1
IF WS-COUNT GT 10
STOP
END-IF
PRINT RPT1
REPORT RPT1 LINESIZE 80
TITLE 'TEST FOR PANSQL INSTALL'
LINE NAME CREATOR
/*
//*
//**********************************************************
//*
//* STEP 2: GENERATE A COMMAND PROGRAM
//* (PAN/SQL PRECOMPILE)
//**********************************************************
//GEN EXEC PGM=DQSCGEN
//STEPLIB DD DSN=DISP=SHR,your.program.loadlib
// DD DSN=DISP=SHR,your.pansql.loadlib
//GENDATA DD DISP=(OLD,DELETE),DSN=&&EZTDB2
//CMDPGM1 DD DISP=(NEW,PASS),DSN=&&CPGM1,
// UNIT=SYSDA,
// DCB=(BLKSIZE=3120,LRECL=80,RECFM=FB),
// SPACE=(TRK,(1,1))
//CMDPGM2 DD DISP=(NEW,PASS),DSN=&&CPGM2,
// UNIT=SYSDA,
// DCB=(BLKSIZE=3120,LRECL=80,RECFM=FB),
// SPACE=(TRK,(2,1))
//CMDPGM3 DD DISP=(NEW,PASS),DSN=&&CPGM3,
// UNIT=SYSDA,
// DCB=(BLKSIZE=3120,LRECL=80,RECFM=FB),
// SPACE=(TRK,(2,1))
//CMDPGM4 DD DISP=(NEW,PASS),DSN=&&CPGM4,
// UNIT=SYSDA,
// DCB=(BLKSIZE=3120,LRECL=80,RECFM=FB),
// SPACE=(TRK,(2,1))
//SYSPRINT DD SYSOUT=*
//ERRREPT DD SYSOUT=*
//**********************************************************
//*
//* STEP 3: PREPROCESS THE COMMAND PROGRAM BY DB2
//* (DB2 PRECOMPILE)
//**********************************************************
//DB2PRE EXEC PGM=DSNHPC,
// PARM='HOST(ASM),XREF,SOURCE'
//STEPLIB DD DISP=SHR,DSN=your.db2.sdsnexit.library
// DD DISP=SHR,DSN=your.db2.sdsnload.library
//DBRMLIB DD DISP=SHR,DSN=your.dbrmlib(your-plan-name)
//SYSIN DD DISP=(OLD,DELETE),DSN=&&CPGM1
// DD DISP=(OLD,DELETE),DSN=&&CPGM2
// DD DISP=(OLD,DELETE),DSN=&&CPGM3
// DD DISP=(OLD,DELETE),DSN=&&CPGM4
//SYSCIN DD DSN=&&DB2OUT,DISP=(NEW,PASS),
// UNIT=SYSDA,DCB=BLKSIZE=3120,
// SPACE=(TRK,(3,3))
//SYSUT1 DD SPACE=(800,(1000,1000)),UNIT=SYSDA
//SYSUT2 DD SPACE=(800,(1000,1000)),UNIT=SYSDA
//SYSPRINT DD SYSOUT=*
//SYSTERM DD SYSOUT=*
//**********************************************************
//*
//* STEP 4: ASSEMBLE THE COMMAND PROGRAM
//*
//**********************************************************
//ASM EXEC PGM=ASMA90,
// PARM='OBJECT,NODECK,RENT,LIST'
//SYSIN DD DISP=(OLD,DELETE),DSN=&&DB2OUT
//SYSLIN DD DSN=&&LOADSET,
// DISP=(MOD,PASS),
// UNIT=SYSDA,DCB=BLKSIZE=3120,
// SPACE=(TRK,(10,5))
//SYSLIB DD DISP=(NEW,DELETE),DSN=&&SYSLIB,
// UNIT=SYSDA,DCB=BLKSIZE=80,
// SPACE=(TRK,(1,1,1))
//SYSUT1 DD DSN=&&SYSUT1,UNIT=SYSDA,
// SPACE=(TRK,(10,5))
//SYSPUNCH DD DUMMY
//SYSPRINT DD SYSOUT=*
//**********************************************************
//*
//* STEP 5: LINK EDIT THE COMMAND PROGRAM
//*
//**********************************************************
//LINK EXEC PGM=IEWL,
// PARM='LET,LIST,CALL,RENT,MAP'
//SYSLIN DD DISP=(OLD,KEEP),DSN=&&LOADSET
//SYSLMOD DD DSN=your.program.loadlib(your-plan-name),
// DISP=SHR
//SYSUT1 DD UNIT=SYSDA,SPACE=(CYL,(1,1))
//SYSPRINT DD SYSOUT=*
//**********************************************************
//*
//* STEP 6: BIND AND GRANT AUTHORIZATION TO THE
//* COMMAND PROGRAM'S APPLICATION PLAN
//*
//**********************************************************
//AUTH EXEC PGM=IKJEFT01,DYNAMNBR=20
//STEPLIB DD DISP=SHR,DSN=your.db2.sdsnexit.library
// DD DISP=SHR,DSN=your.db2.sdsnload.library
//DBRMLIB DD DISP=SHR,DSN=your.dbrmlib
//SYSPRINT DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//REPORT DD SYSOUT=*
//SYSTSIN DD *
//SYSTSIN DD *
DSN SYSTEM(xxxx)
BIND PACKAGE(your-package-name) MEMBER(your-plan-name) VALIDATE(RUN) -
ACT(REPLACE) ISOLATION(CS)
BIND PLAN(your-plan-name) PKLIST(your-package-name.*) -
ACT(REPLACE) ISOLATION(CS)
RUN PROGRAM(DSNTIAD) PLAN(DSNTIA10) -
LIB('your.db2.runlib')
END
/*
//SYSIN DD *
GRANT EXECUTE ON PLAN your-plan-name TO PUBLIC;
/*
//**********************************************************
//*
//*
//* STEP 7: EASYTRIEVE PLUS LINK
//*
//**********************************************************
//LKEDEZT EXEC PGM=IEWL,COND=(0,NE,EZTPLUS)
//SYSPRINT DD SYSOUT=*
//SYSLIN DD DISP=(OLD,DELETE),DSN=&&SYSLIN
//SYSLMOD DD DISP=SHR,DSN=your.program.loadlib(your-eztpgm)
//SYSUT1 DD UNIT=SYSDA,SPACE=(CYL,(1,5))
//**********************************************************
//*
//* STEP 8: EXECUTE THE EASYTRIEVE PROGRAM
//*
//**********************************************************
//EZTPGO EXEC PGM=your-eztpgm
//***************************************************
//STEPLIB DD DISP=SHR,DSN=your.eztplus.loadlib
// DD DSN=DISP=SHR,your.pansql.loadlib
// DD DISP=SHR,DSN=your.program.loadlib
// DD DISP=SHR,DSN=your.db2.sdsnexit.library
// DD DISP=SHR,DSN=your.db2.sdsnload.library
//SYSUDUMP DD SYSOUT=*
//SYSSNAP DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//EZTVFM DD UNIT=SYSDA,SPACE=(TRK,(5,5))
//*PAN$SQL DD *
//*
10/13/2023: Removed incorrect product name and placed Resolution in latest format. Diana Shaw