View previous topic :: View next topic
|
Author |
Message |
jennybrahma
New User
Joined: 17 Mar 2010 Posts: 3 Location: Hyderabad
|
|
|
|
What happens if the JCL that has a Disp parameter like this DISP = (NEW,CATLG,DELETE) is run for the first time and then is rerun? |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
instead of asking, it's should not be too difficult to test it.
Gerry |
|
Back to top |
|
|
jennybrahma
New User
Joined: 17 Mar 2010 Posts: 3 Location: Hyderabad
|
|
|
|
I would've if I could've. Will be grateful if you do that for me please. Thanks. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
If the job abended the first run, the data set was deleted so the rerun will go without any issues.
If the job completed successfully the first run, then the data set was cataloged and when the rerun is submitted, since you cannot have duplicate names in the catalog .... |
|
Back to top |
|
|
jennybrahma
New User
Joined: 17 Mar 2010 Posts: 3 Location: Hyderabad
|
|
|
|
In the first case what would be the abend? S0C1 or S0C4? |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
the answer will vary depending on whether the dataset is a GDG or not,
if it's a disk or tape dataset.
Gerry |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
jennybrahma wrote: |
In the first case what would be the abend? S0C1 or S0C4? |
You have have the concept completely backwards.
If the problem program abended with any non-zero completion code -- 1 to 4095 -- JES will delete the data set and its catalog entry. |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi Akatsukami,
you have return codes and abends confused.
If the job abends it will not complete with a completion code of 1 to 4095,
it will be an abend code such as S*** or U***.
The DELETE in DISP=(NEW,CATLG,DELETE) will only delete the dataset if the step ABENDS and not if a 0 to 4095 completion code is returned.
Gerry |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
gcicchet wrote: |
Hi Akatsukami,
you have return codes and abends confused.
If the job abends it will not complete with a completion code of 1 to 4095,
it will be an abend code such as S*** or U***. |
I respectfully disagree.
If you look at z/OS V1R10.0 MVS System Codes you will see that IBM does indeed refer to abend codes as "system completion codes". There are other features (bits set in the TCB, I think) that distinguish between a non-abending return code, a user abend, and a system abend; the range of the code turned is not one of them (hex FFF = decimal 4095). |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
I respectfully disagree. |
Please reconsider. . .
"S" abends are covered by "system completion code", but "return- codes" are not. Neither are "U" abends.
It really doesn't matter that
Quote: |
If the problem program abended with any non-zero completion code -- 1 to 4095 -- JES will delete the data set and its catalog entry |
is technically correct. . . It does matter that this is not the commonly accepted way to mention such.
I suspect less that 1/2 of 1% of the people here ever called an s0c1 a 193 abend . . . Or an sb37 a 2871 abend. . .
@jennybrahma:
Quote: |
In the first case what would be the abend? S0C1 or S0C4? |
In the first case, it would be any Sxxx or Unnnn ABEND (not a return code). Either the SOC1 or SOC4 would cause the file to be deleted. So would an SB37 or S806 or etc. . . |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
dick scherrer wrote: |
Hello,
Quote: |
I respectfully disagree. |
Please reconsider. . . |
I respectfully decline
Quote: |
"S" abends are covered by "system completion code", but "return- codes" are not. |
I entirely agree, and I hope that I did not write so unclearly that anyone could come to think so, or that I think so.
Quote: |
Neither are "U" abends. |
I agree; IBM refers to them as "user completion codes". Really.
Quote: |
I suspect less that 1/2 of 1% of the people here ever called an s0c1 a 193 abend . . . Or an sb37 a 2871 abend. . . |
Probably not. To the left, I do know SAS messages report its user abends as hexadecimal numbers, rather than as decimal numbers as is usual for user abends. I doubt if any SAS programmer has been confused by so much as a microfortnight by this, but I feel that it is illustrative of the fact that every completion(=abend) and return code is a three-nybble binary number, and that other means than range or internal representation must be used to distinguish them. |
|
Back to top |
|
|
MBabu
Active User
Joined: 03 Aug 2008 Posts: 400 Location: Mumbai
|
|
|
|
Just a matter of symantics. Say... 000-FFF and we'll all be happy For what it is worth, the reason that hex is useful is that system abends XYY usually (well, at least often) mean that YY was an SVC number, eg 806 is a problem with SVC x'06' (LOAD, if I recall). Using decimal hides that fact so that is why no one does it. I suspect that the only time you'd ever see a system abend listed as decimal is when a programmer who traps it is too lazy to do the conversion in a message. User abends are often in decimal (like LE user abends) because, by definition, there are no established standards for the meanings of user abends. |
|
Back to top |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
Robert sample wrote:
Quote: |
If the job completed successfully the first run, then the data set was cataloged and when the rerun is submitted, since you cannot have duplicate names in the catalog .... |
If I'm not mistaken, just the step w/the (NEW,CATLG,DELETE) must complete successfully, after that the job can abend, JCL out, etc. and the DS will remain Cataloged, if not explicitly deleted or uncated.
Jenny,
If the NEW DS still exists when you attempt to run the job again, you'll get a JCL error.
The most popular way to aviod that is to put an IEFBR14 step before the NEW step to delete the NEW DSN if it exists. An example is below:
Code: |
//STEPnnn EXEC PGM=IEFBR14
//DD1 DD DSN=XXX.XX.XXXXX,DISP=(MOD,DELETE)
|
if your site doesn't use SMS, include space and DCB info in the DD stmt. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
If the NEW DS still exists when you attempt to run the job again, you'll get a JCL error. |
Or the dataset may be allocated to a different volume and then there will be a "not catlgd 2" error.
If you use IEFBR14 to "housekeep", you can use:
Code: |
//DD1 DD DSN=MY.DATASET.NAME,DISP=(MOD,DELETE),
// UNIT=xxxxx,SPACE=(TRK,0) |
|
|
Back to top |
|
|
|