Summary -

In this topic, we described about the Submit TSO Commands with detailed example.

IKJEFT01 is used to execute TSO commands via batch jobs. REXX can also be executed via batch Job.

Syntax -

//Job Card
//*
//STEP01   EXEC PGM=IKJEFT01                                   
//SYSPRINT DD  SYSOUT=*                                        
//SYSTSPRT DD  SYSOUT=*                                        
//SYSUDUMP DD  SYSOUT=*                                        
//SYSTSIN  DD  *                                               
  <TSO-Commands>                                  
/*

Example: -

Below example to execute the TSO command to delete the dataset 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                              
//********************************************************************
//* TSO EXECUTION USING IKJEFT01 UTILITY            
//*******************************************************************
//STEP01   EXEC PGM=IKJEFT01                        
//SYSPRINT DD  SYSOUT=*                                
//SYSTSPRT DD  SYSOUT=*                         
//SYSUDUMP DD  SYSOUT=*                         
//SYSTSIN  DD  *                              
  DEL 'MTHUSR.TEST.PDSFILE'                      
/*                                                  
//*                                                  
**************************** Bottom of Data ****************************

Submit TSO Commands

SYSTSPRT Output: -

Submit TSO Commands

The TSO command execution status will get displayed in Spool(STSTSPRT).

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.
  • DEL 'MTHUSR.TEST.PDSFILE' - Specifies the TSO command to delete the MTHUSR.TEST.PDSFILE.