|
View previous topic :: View next topic
|
| Author |
Message |
NithyaSiva
New User
Joined: 26 Nov 2006 Posts: 10 Location: Bangalore
|
|
|
|
Hello,
I have a report job which runs end of the day. i have another job which runs 4 times a day and produces a GDG version. at end of the day i have to consolidate the versions (which are created on that particular day) to produces the dataset for the report job.
Not sure whether the job runs exactly for 4 times. it may run 2 times also in a day.
so how do i concatenate the GDG version created on a particular day. |
|
| Back to top |
|
 |
tampakenny
New User
Joined: 15 Feb 2006 Posts: 11 Location: Tampa, FL
|
|
|
|
| You could reference the gdg base on the dd which would get you any and all levels created that day, whether there was 2 versions, 4 versions, etc. Using DISP=(OLD,DELETE) when referencing the base will delete all versions, but keep the base. That way, you'll have an empty base after reporting, ensuring you'll always only have levels in the base created since you last ran the report. And, of course, you'll need to back up the data first if it needs to be retained. |
|
| Back to top |
|
 |
Kevin
Active User

Joined: 25 Aug 2005 Posts: 234
|
|
|
|
I guess that great minds think alike! That's exactly what I was going to propose.
Otherwise, you'd have to run LISTCAT to find the creation dates for all of the generations, pull out the ones that match the current date, and INCLUDE those dataset names dynamically. |
|
| Back to top |
|
 |
TizMe
New User

Joined: 05 Jan 2006 Posts: 72
|
|
|
|
Job A: Runs any number of times per day:
Create non-vsam, non-gdg dataset
| Code: |
| dd dsn=new.data,disp=(,catlg).... etc |
add one step to job A:
| Code: |
//JOIN EXEC PGM=ICEGENER
//SYSIN DD DUMMY
//SYSUT1 DD DISP=SHR,DSN=gdg.data(0)
// DD DISP=SHR,DSN=new.data
//SYSUT2 DD DSN=gdg.data(+1),
// DISP=(,CATLG,DELETE),
// UNIT=SYSDA,SPACE=......,
// DCB=*.SYSUT1
//SYSPRINT DD SYSOUT=* |
also add one step to end of job B that creates the report from data to create a new empty gdg:
| Code: |
//NEWDS EXEC PGM=ICEGENER
//SYSIN DD DUMMY
//SYSUT1 DD DUMMY,DCB=....
//SYSUT2 DD DSN=gdg.data(+1),
// DISP=(,CATLG,DELETE),
// UNIT=SYSDA,SPACE=......,
// DCB=*.SYSUT1
//SYSPRINT DD SYSOUT=* |
The advantage over previous suggestions is that it is much easier to track backups because we always have an incremental generation number, (not always G0001V00, G0002V00, G0003V00, G0004V00) and it also allows you to keep as many days data as you want, without the need for deletion. |
|
| Back to top |
|
 |
NithyaSiva
New User
Joined: 26 Nov 2006 Posts: 10 Location: Bangalore
|
|
|
|
| Thanks so much. I think both are good solutions. |
|
| Back to top |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|