IKJEFT01 - Run Db2 Program


IKJEFT01 utility used to run the cobol + db2 program.

The only prerequisite before executing the program is, the program should have bounded successfully to the plan in the system.


Syntax: -


//STEP01 EXEC PGM= IKJEFT01
//SYSPRINT DD  SYSOUT=*
//SYSTSPRT DD  SYSOUT=*
//SYSUDUMP DD  SYSOUT=*
//SYSTSIN DD *
DSN SYSTEM (db-system-name   )  			 
  RUN PROGRAM   (db2-prog-name) - 		 
      PLAN      (db2-plan-name  ) -  	 
      LIBRARY   ('program-load-library) 	
END                                
/*
//SYSOUT   DD  SYSOUT=*

Example: -


Below example to execute program COBOLDB to plan DBPLAN using IKJEFT01 utility.


Job: -

----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
***************************** Top of Data ******************************
//MTHUSRI  JOB (123),'MTHUSR',CLASS=A,MSGCLASS=A,MSGLEVEL=(1,1),        
//             NOTIFY=&SYSUID                                           
//**********************************************************************
//*  COBOL DB2 RUN JCL                                                  
//**********************************************************************
//BIND     EXEC PGM=IKJEFT01,DYNAMNBR=20,REGION=4096K                   
//STEPLIB  DD  DSN=XXXXXX.DB2.SDSNEXIT,DISP=SHR                         
//         DD  DSN=XXXXXX.DB2.SDSNLOAD,DISP=SHR                         
//SYSPRINT DD  SYSOUT=*                                                 
//SYSTSPRT DD  SYSOUT=*                                                 
//SYSUDUMP DD  SYSOUT=*                                                 
//SYSTSIN  DD  *                                                        
DSN SYSTEM (DB01   )                                                    
  RUN PROGRAM   (COBOLDB) -                                             
      PLAN      (DBPLAN  ) -                                            
      LIBRARY   ('MTHUSR.LOADLIB')                                      
END                                                                     
/*                                                                      
//SYSOUT   DD  SYSOUT=*                                                 
**************************** Bottom of Data ****************************

Explaining Solution: -

  • SYSPRINT DD - specifies a sysout class where all product usage reports produced by IBM are written.
  • SYSTSPRT DD - Used to control the output from the background job.
  • SYSUDUMP - specifies the output class where the dump is placed in the event of an ABEND. A data set name may be used instead of a sysout class.
  • SYSTSIN DD *- Used to specify the data to follow which consists of executable commands and/or subcommands.

Note:

Change the STEPLIB libraries, SYSTEM, PLAN and LIBRARY according to the system setup and change PROGRAM name with the program that is running.

Once the details updated, the above JCL can directly submit to run the program.