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

Creating report using GDG version - complicated


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

New User


Joined: 26 Nov 2006
Posts: 10
Location: Bangalore

PostPosted: Wed Dec 13, 2006 2:31 pm
Reply with quote

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
View user's profile Send private message
tampakenny

New User


Joined: 15 Feb 2006
Posts: 11
Location: Tampa, FL

PostPosted: Wed Dec 13, 2006 9:18 pm
Reply with quote

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
View user's profile Send private message
Kevin

Active User


Joined: 25 Aug 2005
Posts: 234

PostPosted: Wed Dec 13, 2006 9:24 pm
Reply with quote

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
View user's profile Send private message
TizMe

New User


Joined: 05 Jan 2006
Posts: 72

PostPosted: Thu Dec 14, 2006 6:11 am
Reply with quote

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
View user's profile Send private message
NithyaSiva

New User


Joined: 26 Nov 2006
Posts: 10
Location: Bangalore

PostPosted: Thu Dec 14, 2006 1:36 pm
Reply with quote

Thanks so much. I think both are good solutions.
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 isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
No new posts Creating Unix Directory using COBOL i... COBOL Programming 2
No new posts Need help on formatting a report DFSORT/ICETOOL 14
No new posts Creating Report using SORT DFSORT/ICETOOL 7
No new posts How to copy the -1 version of a membe... TSO/ISPF 4
Search our Forums:

Back to Top