1 //ENCIP01 JOB ENCIPJCL
2 //STEP1 EXEC PGM=IDCAMS
3 //INPUT DD DSNAME=&SYSUID..RECORDS,DISP=SHR
5 //OUTDD DD DSN=&SYSUID..ZOWEPS,DISP=SHR
6 //SYSIN DD *
REPRO -
INFILE(INPUT) -
OUTFILE(OUTDD) -
COUNT(20)
/*
When I submitted above JCL. I received error "IEC130I AMSDUMP DD STATEMENT MISSING". But when i added //SYSPRINT DD SYSOUT=A, I didn't get the error. So, do AMSDUMP DD and SYSPRINT DD serve the same purpose?
No.
Sometimes, when IDCAMS encounters an error it attempts to produce a snap dump, which it writes to the AMSDUMP DD. You didn't supply the required SYSPRINT DD, which caused an error, which made IDCAMS want to write a snap dump but you also didn't supply an AMSDUMP DD, hence the message.
On your second run, you supplied a SYSPRINT DD, so IDCAMS did not need to write a snap dump, so it didn't need the AMSDUMP DD.