View previous topic :: View next topic
|
Author |
Message |
Escapa
Senior Member
Joined: 16 Feb 2007 Posts: 1399 Location: IL, USA
|
|
|
|
Systems programmers are checking about this issue but I thought i would post here too.
We have a job for which STEP140 creates dataset and is used in STEP145
Step 145 runs quickjob program and creates an output dataset. Below is snipet of jcl
Code: |
28 XXSTEP140 EXEC PGM=SORT
29 XXSORTIN01 DD DSN=A.B.C.D1(0),
XX DISP=OLD
30 XXSORTIN02 DD DSN=A.B.C.D2,
XX DISP=(OLD,DELETE,KEEP)
31 XXSORTIN03 DD DSN=A.B.C.D3(0),
XX DISP=OLD
32 XXSORTIN04 DD DSN=A.B.C.D4(0),
XX DISP=OLD
33 XXSORTOUT DD DSN=A.B.C.D5,LABEL=EXPDT=99000,
XX DISP=(,CATLG,DELETE),
XX UNIT=CART,
XX VOL=(,RETAIN,,35),
XX RECFM=FB,LRECL=168,DSORG=PS
34 XXSYSIN DD DSN=HLQ.PARMLIB(XYZ),
XX DISP=SHR
35 XXSYSOUT DD RECFM=VBA,
XX LRECL=125,SYSOUT=V
36 XXSYSUDUMP DD SYSOUT=D
XX*___________________________________________________
37 XXSTEP145 EXEC PGM=QUIKJOB
38 XXSYSUT1 DD DSN=A.B.C.D5,
XX DISP=(OLD,DELETE,KEEP)
39 XXSYSUT2 DD DSN=A.B.C.D6,LABEL=EXPDT=99000,
XX DISP=(,CATLG,DELETE),
XX UNIT=CART,
XX VOL=(,RETAIN,,35),
XX RECFM=FB,LRECL=168,DSORG=PS
40 XXERRORRPT DD SYSOUT=(W,ERPT),
XX RECFM=FBA,LRECL=166
41 XXSUMRPT DD SYSOUT=O,
XX RECFM=FBA,LRECL=133
42 XXSYSIN DD DSN=HLQ.VISION(ABC),
XX DISP=SHR
43 XXSYSOUT DD SYSOUT=V
44 XXSYSPRINT DD RECFM=FBA,
XX LRECL=133,SYSOUT=V
45 XXSYSUDUMP DD SYSOUT=D
|
Now when A.B.C.D6 is in catalogue and if I restart the job,
I am not understanding why A.B.C.D5 is getting uncatalogued\deleted.
Code: |
this is from step 140
.IGD108I A.B.C.D5 CATALOGED, DDNAME=SORTOUT
. VOLUME SERIAL NUMBERS =
. 917840
|
Code: |
IEF236I ALLOC. FOR PCMPSD STEP145 PCMPSD
IGD100I 06A9 ALLOCATED TO DDNAME SYSUT1
IGD100I 06BA ALLOCATED TO DDNAME SYSUT2
STORCLAS (VTSREG) MGMTCLAS (VTSBOTH) DATACLAS (VTS4GB)
IEF237I JES3 ALLOCATED TO ERRORRPT
IEF237I JES3 ALLOCATED TO SUMRPT
IGD103I SMS ALLOCATED TO DDNAME SYSIN
IEF237I JES3 ALLOCATED TO SYSOUT
IEF237I JES3 ALLOCATED TO SYSPRINT
IEF237I JES3 ALLOCATED TO SYSUDUMP
IEC205I SYSUT2,PCMPSD,STEP145,FILESEQ=1, COMPLETE VOLUME LIST,
DSN=A.B.C.D6,VOLS=918408,TOTALBLOCKS=177334
IEF142I PCMPSD STEP145 PCMPSD - STEP WAS EXECUTED - COND CODE 0000
IEF285I A.B.C.D5 UNCATALOGED
IEF285I VOL SER NOS= 917840.
IEF285I A.B.C.D5 DELETED
IEF285I VOL SER NOS= 917840.
IGD17101I DATA SET A.B.C.D6
NOT DEFINED BECAUSE DUPLICATE NAME EXISTS IN CATALOG
RETURN CODE IS 8 REASON CODE IS 38 IGG0CLEH
|
|
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Because A.B.C.D5 has DISP=(OLD,DELETE,KEEP) and the step ran to zero completion code, so it is deleted. The presence of A.B.C.D6 in the catalog does NOT cause an abend hence the KEEP will not occur. |
|
Back to top |
|
|
Escapa
Senior Member
Joined: 16 Feb 2007 Posts: 1399 Location: IL, USA
|
|
|
|
But shouldn't step not execute as output dataset is present in catalogue?
Whats the way out in such case?
Today, we had this case where input A.B.C.D5 got deleted and output A.B.C.D6 did not get created as duplicate name was present.
We were lucky that A.B.C.D5 was tape dataset and wasnt scratched yet so we could re-catalogue to rerun the job. |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
that seems to only apply to disk datasets ie. step would have not executed and failed with JCL error.
The only suggestion I have is to change to a GDG.
Gerry |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
or insert a clean-up step before step 145 |
|
Back to top |
|
|
David Robinson
Active User
Joined: 21 Dec 2011 Posts: 199 Location: UK
|
|
|
|
Shouldn't this result in a NOT CATLGD 2 ?
I seem to recall an option somewere that then determines whether these cause the job to fail with a JCL error or not. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Quote: |
But shouldn't step not execute as output dataset is present in catalogue?
Whats the way out in such case? |
Why would the presence of an output data set in the catalog keep the step from running? If this were the case, system programmers would have a harder time since it is not uncommon for a system programmer to create a data set on a disk volume EVEN THOUGH THAT DATA SET IS CATALOGED ON ANOTHER DISK VOLUME so the system programmer can then uncatalog the data set and catalog the data set just created.
There actually is not much of a way out in this case, since your system is working precisely as IBM designed it. A system may have MANY data sets with the exact same name -- only one of them can be in the catalog but there is no limit on how many can be created -- so your expectation that the job will not run if an output data set is cataloged is, quite simply, totally unrealistic. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Suggest some invest the time to review / revise the process so this "out of sync" condition cannot occur. . . |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
by the way DISP=(OLD,DELETE,KEEP) will delete the dataset regardless of what the completion code is.
Gerry |
|
Back to top |
|
|
Gary McDowell
Active User
Joined: 15 Oct 2012 Posts: 139 Location: USA
|
|
|
|
Possibly change DISP of A.B.C.D5 in STEP145 to OLD
and then delete A.B.C.D5 as the last step of your job.
A.B.C.D5 will still be CATLGed for any restarts. |
|
Back to top |
|
|
Escapa
Senior Member
Joined: 16 Feb 2007 Posts: 1399 Location: IL, USA
|
|
|
|
Disp of A.B.C.D5 is changed to OLD,KEEP,KEEP AND IEFBR14 at end to DELETE it. |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
Quote: |
Disp of A.B.C.D5 is changed to OLD,KEEP,KEEP |
does not change its disposition - it still remains catalogued. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Until the IEFBR14 at the end to delete it? |
|
Back to top |
|
|
Gary McDowell
Active User
Joined: 15 Oct 2012 Posts: 139 Location: USA
|
|
|
|
dick scherrer wrote: |
Hello,
Until the IEFBR14 at the end to delete it? |
Yes, dataset A.B.C.D5 will remain CATLG-ed from STEP145 and then deleted in last step.
I like this non-GDG setup/technique in case any restarts are needed. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
With SMS, KEEP is equivalent to CATLG - the data set will be kept on the volume when the step ends normally. And KEEP is the only valid termination disposition for a VSAM data set.VSAM files shouldn't be cataloged, uncataloged, passed, or deleted - and I hope you are at an SMS shop.(no - ) |
|
Back to top |
|
|
|