Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

NEW,CATLG,DELETE run for the first time and then rerun

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
jennybrahma

New User


Joined: 17 Mar 2010
Posts: 3
Location: Hyderabad

PostPosted: Thu Mar 18, 2010 4:22 pm    Post subject: NEW,CATLG,DELETE run for the first time and then rerun
Reply with quote

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
View user's profile Send private message

gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Thu Mar 18, 2010 4:26 pm    Post subject:
Reply with quote

Hi,

instead of asking, it's should not be too difficult to test it.


Gerry
Back to top
View user's profile Send private message
jennybrahma

New User


Joined: 17 Mar 2010
Posts: 3
Location: Hyderabad

PostPosted: Thu Mar 18, 2010 4:47 pm    Post subject: Reply to: JCL DISP
Reply with quote

I would've if I could've. Will be grateful if you do that for me please. Thanks.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7904
Location: Bellevue, IA

PostPosted: Thu Mar 18, 2010 4:55 pm    Post subject:
Reply with quote

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
View user's profile Send private message
jennybrahma

New User


Joined: 17 Mar 2010
Posts: 3
Location: Hyderabad

PostPosted: Thu Mar 18, 2010 5:02 pm    Post subject: Reply to: JCL DISP
Reply with quote

In the first case what would be the abend? S0C1 or S0C4?
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Thu Mar 18, 2010 5:05 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1738
Location: Bloomington, IL

PostPosted: Thu Mar 18, 2010 5:17 pm    Post subject: Re: Reply to: JCL DISP
Reply with quote

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
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Thu Mar 18, 2010 5:25 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Thu Mar 18, 2010 7:43 pm    Post subject:
Reply with quote

jennybrahma - Please read through the DISP parameter in the manuals.
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1738
Location: Bloomington, IL

PostPosted: Thu Mar 18, 2010 7:55 pm    Post subject:
Reply with quote

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
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Mar 18, 2010 11:36 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1738
Location: Bloomington, IL

PostPosted: Fri Mar 19, 2010 12:00 am    Post subject:
Reply with quote

dick scherrer wrote:
Hello,

Quote:
I respectfully disagree.
Please reconsider. . .

I respectfully decline icon_wink.gif

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
View user's profile Send private message
MBabu

Active User


Joined: 03 Aug 2008
Posts: 401
Location: Mumbai

PostPosted: Fri Mar 19, 2010 3:50 am    Post subject:
Reply with quote

Just a matter of symantics. Say... 000-FFF and we'll all be happy icon_smile.gif 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
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Mon Mar 22, 2010 9:25 pm    Post subject:
Reply with quote

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
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Mon Mar 22, 2010 10:10 pm    Post subject:
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts JCL to delete component in a package sundaram.naveen Compuware & Other Tools 14 Tue Nov 29, 2016 6:21 pm
This topic is locked: you cannot edit posts or make replies. Get a job submitted itself every time... arunsoods JCL & VSAM 3 Tue Nov 22, 2016 4:05 pm
No new posts Check System time(Minute) Using TIME1... balaji81_k DFSORT/ICETOOL 5 Fri Nov 11, 2016 10:53 am
No new posts How to delete second instance from Fl... Gunapala CN DFSORT/ICETOOL 6 Tue Oct 18, 2016 11:42 pm
This topic is locked: you cannot edit posts or make replies. Get correct date and time when curren... balaji81_k DB2 24 Fri Oct 14, 2016 10:40 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us