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
 

 

Creating report using GDG version - complicated

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Creating report using GDG version - complicated
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    Post subject:
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    Post subject: Re: Creating report using GDG version - complicated
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    Post subject:
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    Post subject: Re: Creating report using GDG version - complicated
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    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 COBOL Version 6.1 Virendra Shambharkar COBOL Programming 5 Tue Nov 01, 2016 11:24 am
No new posts Detailed Transaction History report f... Kyle Carroll CICS 5 Tue Oct 18, 2016 12:42 am
No new posts Easytrieve - Report writing - Only 1 ... Abhi Nature CA Products 2 Wed Sep 14, 2016 11:40 am
No new posts Is there a time Version of DATEDIFF ? Bill Woodger DFSORT/ICETOOL 1 Wed Aug 17, 2016 7:06 pm
No new posts Syncsort version supporting FINDREP c... juares castro SYNCSORT 9 Tue Aug 09, 2016 6:54 pm


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