MVSFORUMS.com A Community of and for MVS Professionals
View previous topic :: View next topic
Author
Message
mainframemouli Beginner Joined: 23 Feb 2005 Posts: 87 Topics: 33
Posted: Mon Aug 01, 2005 9:09 am Post subject: Why PDS is deleted instead of the Member if JOB step abends.
Code:
//PSTEP010 EXEC PGM=SORT
//SORTLIB DD DSN=SYS1.SORTLIB,
// DISP=SHR
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=XT2.SMS.HR3903.REPORT.G0135V00,
// DISP=SHR
//SORTOUT DD DSN=XT2.PAY.MYC.SRC(ABC),
// DISP=(NEW,CATLG,DELETE),
// DCB=(SYS2.MODEL,BLKSIZE=0,LRECL=133,RECFM=FB),
// UNIT=SYSDA,SPACE=(CYL,(25,10),RLSE)
//SYSIN DD *
SORT FIELDS=(4,5,CH,A,15,4,CH,A,23,11,BI,A)
/*
If the JCL abended the dataset(PDS) XT2.PAY.MYC.SRC will be deleted.
But according to theory only the PDS member has to be deleted if the job ends abnormally.But why the PDS will be deleted can anybody explain??
Back to top
kolusu Site Admin Joined: 26 Nov 2002 Posts: 12370 Topics: 75 Location: San Jose
Posted: Mon Aug 01, 2005 9:32 am Post subject:
Mainframemouli,
Most shops have a utility to delete all the Datasets with disp=(new,catlg,delete). ex: CA11
make sure that your JCL does not have that step.
Also Does your PDS already exist? If so your DISP parameter on sortout should be disp=old instead of disp=(new,catlg,delete).
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu
Back to top
semigeezer Supermod Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
Posted: Mon Aug 01, 2005 1:54 pm Post subject:
DISP=delete always refers to the data set and never to the member. It is a mistake we have all made ... once.
Back to top
taltyman JCL Forum Moderator Joined: 02 Dec 2002 Posts: 310 Topics: 8 Location: Texas
Posted: Tue Aug 02, 2005 7:50 am Post subject:
Yep, about 20 years ago I deleted our production JCL library. Reminds me of the airline commercial that says "want to get away?"
Back to top
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum