View previous topic :: View next topic
|
Author |
Message |
guptae
Moderator
Joined: 14 Oct 2005 Posts: 1208 Location: Bangalore,India
|
|
|
|
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 |
|
|
muthuvel
Active User
Joined: 29 Nov 2005 Posts: 217 Location: Canada
|
|
|
|
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 |
|
|
guptae
Moderator
Joined: 14 Oct 2005 Posts: 1208 Location: Bangalore,India
|
|
|
|
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 |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
maybe with symbolics in the disp parms |
|
Back to top |
|
|
guptae
Moderator
Joined: 14 Oct 2005 Posts: 1208 Location: Bangalore,India
|
|
|
|
Hi Dick,
Would you please explain further |
|
Back to top |
|
|
muthuvel
Active User
Joined: 29 Nov 2005 Posts: 217 Location: Canada
|
|
|
|
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 |
|
|
paray2x
New User
Joined: 28 Dec 2005 Posts: 21
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
paray2x
New User
Joined: 28 Dec 2005 Posts: 21
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
|