Module 12: DBRM, Package, Plan and DB2 JCL
IKJEFT01
IKJEFT01 is the TSO Terminal Monitor Program. It lets a batch job run TSO commands, which is how almost every DB2 batch utility executes.
What IKJEFT01 is
- IKJEFT01 is the TSO Terminal Monitor Program: it runs TSO commands inside a batch job step.
- Nearly every DB2 batch action, BIND, RUN, DSNTEP2 SQL, DSNTIAUL unload, runs under PGM=IKJEFT01.
- It reads the commands from the SYSTSIN DD statement.
- It writes all output to the SYSTSPRT DD statement, which is where you check results and return codes.
Standard DD statements
- SYSTSIN - the TSO and DB2 commands to run, usually starting with DSN SYSTEM(...).
- SYSTSPRT - the output listing. Code SYSOUT=* so you can read DB2 messages and SQL codes.
- SYSTERM - optional terminal output, rarely needed in batch.
- STEPLIB - must point to the DB2 load library (SDSNLOAD), plus SDSNEXIT if your shop uses exits.
- DYNAMNBR=20 on the EXEC card gives enough dynamic allocation slots for DB2 data sets.
Common DB2 uses of IKJEFT01
- BIND PACKAGE and BIND PLAN jobs.
- RUN PROGRAM jobs that execute DB2 programs in batch.
- DSNTEP2 steps that run ad-hoc SQL in batch.
- REBIND and FREE maintenance jobs.
Example: IKJEFT01 skeleton JCL
- Every DB2 batch step follows this shape. Only the SYSTSIN commands change:
//DB2BATCH JOB (ACCT),'IKJEFT01',CLASS=A,MSGCLASS=X //STEP1 EXEC PGM=IKJEFT01,DYNAMNBR=20 //STEPLIB DD DSN=DB2A.SDSNLOAD,DISP=SHR //SYSTSPRT DD SYSOUT=* //SYSTSIN DD * DSN SYSTEM(DB2A) ... DB2 subcommands ... END /*
