IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

GDG generation related


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
guptae

Moderator


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

PostPosted: Thu Aug 09, 2007 6:16 pm
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: Canada

PostPosted: Thu Aug 09, 2007 6:28 pm
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: 1208
Location: Bangalore,India

PostPosted: Thu Aug 09, 2007 6:39 pm
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
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: 1208
Location: Bangalore,India

PostPosted: Thu Aug 09, 2007 6:49 pm
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: Canada

PostPosted: Thu Aug 09, 2007 6:54 pm
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
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

Moderator Emeritus


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

PostPosted: Thu Aug 09, 2007 10:51 pm
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
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

Moderator Emeritus


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

PostPosted: Fri Aug 10, 2007 7:59 am
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts DFHPI1008 JSON generation failed COBOL Programming 0
No new posts Started task using a generation dataset JCL & VSAM 7
No new posts Report generation JCL & VSAM 18
No new posts How can I get Generation Nbr of GDG f... IBM Tools 1
No new posts Sequence number generation for multip... DFSORT/ICETOOL 2
Search our Forums:

Back to Top