Please see below for a sample IVP program to test a Db2 Easytrieve program.
Please note: This example is running against release 8.1 of DB2.
Easytrieve Report Generator, release 11.6
Pan/SQL 2.4C
Please edit JCL with appropriate loadlibs.
//JOBCARD // //STEP1 EXEC PGM=EZTPA00 //EZOPTBL DD DISP=SHR,DSN=YOUR.R11.x.EZOPTBL //* PANSQL 2.4 0203 //STEPLIB DD DSN=your.R11.x.CAILIB,DISP=SHR // DD DSN=your.D81B.PRIVATE.SDSNEXIT,DISP=SHR // DD DSN=your.DB2.DB2810.SDSNLOAD,DISP=SHR // DD DSN=your.PSDB2V8C.CAILIB,DISP=SHR //SYSPRINT DD SYSOUT=* //SYSOUT DD SYSOUT=* //SORTWK01 DD DSN=&&SORTWK01,DISP=(NEW,DELETE), // UNIT=SYSDA,SPACE=(CYL,(10,10)) //SYSSNAP DD SYSOUT=* //SYSUDUMP DD SYSOUT=* //GENDATA DD DSN=&&EZTPDB2,DISP=(NEW,PASS), // UNIT=SYSDA, // SPACE=(3120,(100,50),RLSE), // DCB=(RECFM=FB,LRECL=80,BLKSIZE=3120) //EZTVFM DD UNIT=SYSDA,SPACE=(4096,(100,100)) PARM SQLID('SYSIBM') SSID('D81B') DEFINE WKNAME W 18 A DEFINE WKCREATOR W 8 A SQL DECLARE C1 CURSOR FOR + SELECT NAME, CREATOR + FROM SYSPLAN + ORDER BY NAME JOB INPUT NULL SQL SET CURRENT SQLID= 'SYSIBM' SQL OPEN C1 PERFORM CHECK-SQL-CODE DO WHILE SQLCODE EQ 0 SQL FETCH C1 INTO :WKNAME, :WKCREATOR PERFORM CHECK-SQL-CODE IF SQLCODE = 0 PRINT REPORT1 END-IF END-DO SQL CLOSE C1 PERFORM CHECK-SQL-CODE STOP CHECK-SQL-CODE. PROC END-PROC REPORT REPORT1 LINESIZE 65 LINE WKNAME