Submit TSO Commands Example


Scenario - JCL to execute the TSO command to delete the dataset using IKJEFT01 utility.

JCL -

----+----1---+---2---+---3---+----4---+---5---+
//MATEPKR JOB MSGLEVEL=(1,1),NOTIFY=&SYSUID
//***********************************************
//*  EXECUTE TSO COMMAND
//***********************************************
//STEP01   EXEC PGM=IKJEFT01,
//             DYNAMNBR=20,REGION=4096K
//STEPLIB  DD  DISP=SHR,DSN=DSNA10.DBAG.SDSNEXIT
//         DD  DISP=SHR,DSN=DSNA10.SDSNLOAD
//SYSTSIN  DD  *
    DEL 'MATEPK.TEST.PDS'
/*
//SYSPRINT DD  SYSOUT=*
//SYSTSPRT DD  SYSOUT=*
//SYSUDUMP DD  SYSOUT=*

SYSTSPRT Output -

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

Submit TSO Commands

Explaining Example -

  • SYSTSIN – Used to specify the executable commands or subcommands.
  • DEL 'MATEPK.TEST.PDS' - Specifies the TSO command to delete the MATEPK.TEST.PDS.