Running the following job results in an abend S66D with reason code 31, 'no TSO environment available'.
//DELETE EXEC PGM=PDSM19 //PDSMPDS DD DISP=SHR,DSN=my.pds.dataset //PDSMRPT DD SYSOUT=* //SYSIN DD * DELETE ABC /*
PDSM19 is a TSO Command Processor that requires a TSO environment for execution.
This document describes how to properly execute PDSM19 in the batch environment.
The PDSMAN (alias of PDSM19) TSO Command Processor provides a useful set of subcommands to display and modify library members.
PDSM19 is intended primary for use from the TSO ready prompt, ISPF Option 6, or option 1 from the PDSMAN ISPF Master Menu.
However, it can be executed in batch as shown in the following JCL:
//PDSM19 EXEC PGM=IKJEFT01,TIME=1440,DYNAMNBR=30,REGION=3072K //SYSTSPRT DD SYSOUT=A //SYSTSIN DD * PDSM19 'my.pds.dataset' DELETE ABC /*
Note that there are other options for deleting members in a batch job, such as the PDSMAN FastCopy EDITDIR function, that are preferred to using PDSM19.
For more information about PDSM19 please refer to the chapter "PDSMAN Command Processor" in the CA-PDSMAN PDS Library Management - Productivity Tools Reference.