MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

(NEW,CATLG,DELETE) incase of User Abend

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
Dasarij
Beginner


Joined: 01 Mar 2006
Posts: 2
Topics: 1

PostPosted: Tue Aug 15, 2006 8:54 am    Post subject: (NEW,CATLG,DELETE) incase of User Abend Reply with quote

Hi,

As far as I know DISP=(NEW,CATLG,DELETE) means the file will be deleted incase of an abend. But in my case when a User Abend occurs the file was not deleted (basically its a GDG version).

Is there any special processing for USER Abend case ? Someone please clarify this.

Regards,
Jay
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Tue Aug 15, 2006 9:06 am    Post subject: Reply with quote

Dasarij,

The GDG version WILL be deleted if the job abended. If the Job issues a user return code and does not abend then the GDG version will be retained. To test it run the following job and see the JESYSMSG. It would say that the GDG is allocated and later deleted.

Code:

//STEP0100 EXEC PGM=SORT,PARM='RC16=ABE'   
//SYSOUT   DD SYSOUT=*                     
//SORTIN   DD *                             
abcd                       
//SORTOUT  DD DSN=your gdg base(+1),           
//            DISP=(NEW,CATLG,DELETE),           
//            UNIT=SYSDA,                         
//            SPACE=(TRK,(1,1),RLSE)             
//SYSIN    DD *                             
  SORT FIELDS=COPY                           
  INCLUDE=(1,4,CH,EQ,C'abcd')         
/*


Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Dasarij
Beginner


Joined: 01 Mar 2006
Posts: 2
Topics: 1

PostPosted: Tue Aug 15, 2006 12:55 pm    Post subject: Reply with quote

Thanks Kolusu.
Back to top
View user's profile Send private message
mrinalsolanki
Beginner


Joined: 02 May 2006
Posts: 56
Topics: 16

PostPosted: Tue Jul 17, 2007 6:02 am    Post subject: Reply with quote

Hello,
I have a JCL with 2 steps in it. In my first step i am incrementing the version of my GDG. The next step is a program call where i am calling some fictitious program. In case the second step abends should the JCL be incrementing version of GDG?

Though i have read the GDG version does not get incremented until job completes successfully but for some reason GDG version gets incremented even though step 2 abended.

ANY HELP

I used following JCL for testing this:

//STEP1 EXEC PGM=IEFBR14
//GDGDD2 DD DSNAME=DEVP.GDG01.TEST(+1),
// DISP=(NEW,CATLG,DELETE),
// SPACE=(TRK,(50,100),RLSE),
// DCB=(SC.MODEL.DSCB,RECFM=VB,BLKSIZE=10796,LRECL=10792)
//SYSPRINT DD SYSOUT=A
//SYSIN DD *
/*
//STEP2 EXEC PGM=ABEND
//
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Tue Jul 17, 2007 6:13 am    Post subject: Reply with quote

Quote:

I have a JCL with 2 steps in it. In my first step i am incrementing the version of my GDG. The next step is a program call where i am calling some fictitious program. In case the second step abends should the JCL be incrementing version of GDG?


mrinalsolanki,

The moment the job abends in step2 marks the end of the job completion for step1 as step1 execueted successfully. so the GDG is catalogued. So if you are restarting the job in step2 then you need to refer to 0 gen of the gdg

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Tue Jul 17, 2007 6:21 am    Post subject: Reply with quote

I believe that if the STEP creating the GDG ABnormally ENDS or terminates, the DISP parameters of NEW, CATLG, DELETE (as Kolusu has said) will take effect.

But those DISP parms are for a STEP, not the JOB. So, if you create a DS in one step and it terminates normally, the DISP parm of CATLG takes effect. IF you ABEND in a subsequent step that does not allocate the DS the DS stays.

Other scenarios exist:
If you were to code DISP=(OLD,DELETE,KEEP) in a subsequent step that was to copy the previously created DS and then delete it: If the copy step abends, the DS would still exist for a restart. If the copy step terminates normally, then the DS would be copied and then deleted.

You have to plan for restart as well as successful conclusion and continued processing.

Sorry, Kolusu, I noticed that you already answered and maybe I am providing too much info.
_________________
Dick Brenholtz
American living in Varel, Germany
Back to top
View user's profile Send private message
mrinalsolanki
Beginner


Joined: 02 May 2006
Posts: 56
Topics: 16

PostPosted: Tue Jul 17, 2007 7:08 am    Post subject: Reply with quote

Thank you much Very Happy
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
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


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group