DSNDELETE with SIMULATE fails with Message 2003 COMMAND REJECTED
search cancel

DSNDELETE with SIMULATE fails with Message 2003 COMMAND REJECTED

book

Article ID: 188876

calendar_today

Updated On:

Products

Disk Backup and Restore - MVS DISK BACKUP AND RESTORE- ADD-ON OPTIO DISK BACKUP AND RESTORE

Issue/Introduction

The Disk tech doc has the following syntax for DSNDELETE command:

DSNDELETE SIMULATE,DSNAMES=,VOLUMES=,COPIES=,DATE=,LIST=,SCRATCH=,DELPROF=,SMSNOSMS,PRIMARY2=, NOVALIDATE

However, trying this command:

//SYSIN DD *
DSNDELETE
SIMULATE,
DSN=USERID.REPORT.JCL

returns an error:

DSNDELETE                                                               CMD00001             
SIMULATE,                                                               CMD00002            
ADSDM118 2003 COMMAND REJECTED - (SIMULATE,   ) IS NOT A VALID COMMAND NAME                 
USERID.REPORT.JCL                                                       CMD00003            
ADSDM117 2009 COMMAND REJECTED - COMMAND NAME (USERID.REPORT) IS LONGER THAN MAXIMUM NAME LENGTH OF (     10)

Resolution

If there is no command option following the DSNDELETE command on the same line, then whatever is found in the next line is considered another command.

For example,

//SYSIN DD *
DSNDELETE
SIMULATE,
DSN=USERID.REPORT.JCL

Here DSNDELETE is considered a command without any other option and SIMULATE on the next line is also considered a separate command, which is an invalid, the same as the DSN= statement.

At least one command option must be in the same line as the command it-self. Other options can then be continued on the next line. Following are valid examples:

//SYSIN DD *
DSNDELETE SIMULATE,DSN=USERID.REPORT.JCL

//SYSIN DD *
DSNDELETE SIMULATE,
DSN=USERID.REPORT.JCL

//SYSIN DD *
DSNDELETE SIMULATE,
          DSN=USERID.REPORT.JCL