Whether it means it will allocate some space and then delete it ?
Why it always return RC 0,Even file is New?
I hope this time i quoted corectly.
Please let me know the reasons.
By the JCL that u have showed, the Job will delete the Dataset if it is present and wont delete if it is not present. DISP=(MOD,DELETE) MOD will work in both the situations. If you had given
DISP=(SHR,DELETE,DELETE) and if the file is not present then u would get a JCL ERROR and if it is present then u would get RC=0 and the file wud be deleted.
If you have DISP=(NEW,DELETE,DELETE) and if the DS is not present it will be created and deleted with a RC=0. But if it is present u wud get a JCL ERROR.