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
 

 

GDG generation related

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

Moderator


Joined: 14 Oct 2005
Posts: 1187
Location: Bangalore,India

PostPosted: Thu Aug 09, 2007 6:16 pm    Post subject: GDG generation related
Reply with quote

Hi There,

There is a requirement : there is a job with a proc.
Proc contains two steps.
1. delete the existing file
2.Check the proc FC20560. In step010 its call the LCP809 program and creates about 7 GDG versions of 7 different file, which get uses in different process.

Now while running the process, if the job gets abended, we can't restart the job as if we run the job once more the new GDG version of the file will get created. And the new versions doesn't have the old records of the 1st version. As per the Client this is happening because the DISP position of all the GDG file is "NEW" so how to modify the jcl so that if we run the job with RESTART parameter it will not create the new GDG file but it should append then abendaid generation.

Hope it is clear.
Back to top
View user's profile Send private message

muthuvel

Active User


Joined: 29 Nov 2005
Posts: 217
Location: Chennai

PostPosted: Thu Aug 09, 2007 6:28 pm    Post subject: Re: GDG generation related
Reply with quote

guptae,
For a generation creation please code as below for new generation creation,
Code:
//SYSUT2   DD  DSN=xxxx.BKUP(+1),
//             DISP=(NEW,CATLG,DELETE),                   
//             UNIT=SYSDA,                               
//             STORCLAS=SEQWARP,                         
//             DATACLAS=COMPRESS,                         
//             AVGREC=K,                                 
//             SPACE=(400,(1000,150),RLSE),               
//             DCB=(DLJ.MODLDSCB,RECFM=FB,LRECL=400)     


So if the step abends as per DISP parameter the file( GDG generation) will be deleted(abnormal disposition) and when you restart the new generation created will be fine.
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1187
Location: Bangalore,India

PostPosted: Thu Aug 09, 2007 6:39 pm    Post subject:
Reply with quote

Hi muthuvel,

Thanks for your suggestion but i dont want to delete the generation in case of abend but i want to keep it & append it with the new output when restart .

Hope I am clear enough
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Aug 09, 2007 6:41 pm    Post subject:
Reply with quote

maybe with symbolics in the disp parms
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1187
Location: Bangalore,India

PostPosted: Thu Aug 09, 2007 6:49 pm    Post subject:
Reply with quote

Hi Dick,

Would you please explain further
Back to top
View user's profile Send private message
muthuvel

Active User


Joined: 29 Nov 2005
Posts: 217
Location: Chennai

PostPosted: Thu Aug 09, 2007 6:54 pm    Post subject: Re: GDG generation related
Reply with quote

This means that your program needs to have the generations opened in I-O mode.Aslo your regular PROC/JCL will have DISP paramenter as (MOD,CATLG,KEEP) for abnormal disposition in output GDG creation.But still apppending to an existing generation means you have to change the generation number to +0 for the RESTART JCL .
If this doesnot can happen then you must have GDG in seperate step
Back to top
View user's profile Send private message
paray2x

New User


Joined: 28 Dec 2005
Posts: 21

PostPosted: Thu Aug 09, 2007 10:18 pm    Post subject:
Reply with quote

guptae,

don't allocate the gdg output of your step directly. Instead, allocate an intermediate dataset with (MOD,CATLG,CATLG). This will retain the dataset even if the job Abends and append data when you restart.

Add one more step with a COND parameter which will execute only if the above step is successful. In this step, copy the intermediate file to ur GDG.

Remember, you'll have to code a mechanism to clean up the above intermediate dataset when you want to start a fresh run.

Hope this helps.
Para
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 Aug 09, 2007 10:51 pm    Post subject:
Reply with quote

Hello,

Or delete it when the copy to the gdg is successful. My preference is to delete it when the copy is successfully done as well as have an "insurance" (mod,delete) at the start of the run to make sure there is nothing "left over".
Back to top
View user's profile Send private message
paray2x

New User


Joined: 28 Dec 2005
Posts: 21

PostPosted: Fri Aug 10, 2007 6:56 am    Post subject:
Reply with quote

Dick,

When you code a (MOD,DELETE) at the start of the run, won't it refresh when the job is re-started to fix an ABEND?...or the delete step has to be bypassed when the job is restarted for any reason because guptae wants to append data when he restarts the job.

The best way is to delete the dataset after a succesful copy as you mentioned.

--Para
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: Fri Aug 10, 2007 7:59 am    Post subject:
Reply with quote

Hello,

Yes, if the "housecleaning step" was at the beginning of the job, any restart would need to start after the delete step.

As the rerun with data "in flight" should be the exception (rather than the norm), i would have the normal run clean up at both ends.

Also, if the run abends and an attempt is made to "continue", there are other considerations of how to re-syncronize all of the files.

When i've needed to do something similar, i write everyhing to non-gdg files and when all of the processing has been successfully completed, i copy the final files to new gdg's and do not worry about salvaging partially created new gdg generation(s).
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 Random Password (in string format) ge... ezhavendhan COBOL Programming 10 Mon Aug 29, 2016 3:18 pm
No new posts alphanumeric sequence generation sivaprasad.gadhi COBOL Programming 6 Wed Mar 30, 2016 3:03 am
No new posts alphanumeric sequence generation sivaprasad.gadhi DFSORT/ICETOOL 8 Mon Mar 21, 2016 1:09 am
No new posts SQL Order By related question Joseph K Thomas DB2 8 Fri Mar 18, 2016 12:53 pm
No new posts JCL sort related Mani453 DFSORT/ICETOOL 13 Sun Dec 20, 2015 1:04 pm


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