Run DB2 Program
Run DB2 Program
IKJEFT01 utility is used to run the DB2 program. The program should have bound successfully to the DB2 plan in the system before executing the program.
Syntax -
...
//STEP01 EXEC PGM= IKJEFT01
//SYSTSIN DD *
DSN SYSTEM (db-system-name)
RUN PROGRAM (db2-prog-name) -
PLAN (db2-plan-name) -
LIBRARY ('program-load-library')
END
/*
...
Practical Example -
Scenario - JCL to execute program (SELECT1) using IKJEFT01 utility.
RUN JCL -
----+----1----+---2---+---3---+----4---+---5---+
...
//STEP01 EXEC PGM=IKJEFT01,
// DYNAMNBR=20,REGION=4096K
//STEPLIB DD DISP=SHR,DSN=DSNA10.DBAG.SDSNEXIT
// DD DISP=SHR,DSN=DSNA10.SDSNLOAD
//SYSTSIN DD *
DSN SYSTEM (DBAG)
RUN PROGRAM (SELECT1) -
PLAN (MATEPKA ) -
LIBRARY ('MATEPK.COBDB2.LOADLIB')
END
/*
...
Note!
Change the STEPLIB libraries, SYSTEM, and PLAN according to the system setup, and change the LIBRARY and PROGRAM name to the program that needs to run. Once the details are updated, the above JCL can directly submit to run the program.