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

According to the DSNDELETE command description in the user guide r12.5 second edition, page 422 the DSNDELETE command syntax is:

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)

 

 

 

 

Environment

Release : 12.5

Component : CA Disk Backup and Restore

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.

If you use:

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

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

At least one command option must be in the same line as the command itsself. 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