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

How to pick the unprocessed GDG


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

New User


Joined: 12 Mar 2009
Posts: 21
Location: chennai

PostPosted: Wed Jan 20, 2010 5:42 pm
Reply with quote

I have a requirement like

Need to do JCL changes to puickup the all the unprocesed previous generation.

In the JCl currently my job is picking up the current generation of GDG and processing the output file. In existing process suppose if it is holiday the file QC.S.DP is received but we didnt process the file. Next day another file received with new generation . In my job since I have give input file as 0 generation it will pickup the current generation and process the file so we missed out the holiday version file. Please see JCL below.

Code:

//sstep   EXEC PGM=xxx                             
//Dd1 DD DSN=xxx.PS.DP005020.CTL.CARD,DISP=SHR
//Pp1 DD DSN=QC.S.DP.(+0),DISP=SHR   
//DPRW     DD DSN=QC.PC.D.RE.KSDF,DISP=SHR 
//OUT  DD DSN=QC.PRDS.QDP740D1,                 
//           DISP=(NEW,CATLG,DELETE),             


Let me know if you need any other details.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Wed Jan 20, 2010 5:53 pm
Reply with quote

Terminology note: version and generation are both valid constructs for a GDG and mean vastly different things. Your post used the term version but it appears you meant generation. The perception of your abilities is much lower by making such elementary mistakes.

There is no easy way to determine if a given generation has been processed -- there is nothing the system will provide to tell you this.

I suggest your process be redesigned so all unprocessed generations are handled at one time by using the GDG base name instead of a given generation. Once the processing is successfully completed, use an IDCAMS DELETE to get rid of all generations of the GDG. So each time your program runs, you will know that all generations represent unprocessed data. This may require an additional sort since processing of all generations is done in reverse generation order (i.e., most recent first).
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Wed Jan 20, 2010 5:54 pm
Reply with quote

looks like an infrastructure issue...

You will have to implement an infrastructure to keep track of the processed datasets

and process <the logs> to build the proper jcl

nothing builtin into the system
Back to top
View user's profile Send private message
balajipradeep

New User


Joined: 12 Mar 2009
Posts: 21
Location: chennai

PostPosted: Wed Jan 20, 2010 5:57 pm
Reply with quote

Ok Thanks
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Wed Jan 20, 2010 5:58 pm
Reply with quote

I've always used a process where I log each generation processed, so each time the job uses the NEXT generation, which may not necessarily be the CURRENT generation.
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Wed Jan 20, 2010 6:06 pm
Reply with quote

You could use a scheduler to trigger a job to process a new generation
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Jan 20, 2010 6:53 pm
Reply with quote

My usual practice is for the first job of the application to .......

a) Dfdss backup of all existing generations
b) Copy all existing generations to a different GDG +1
c) Delete all existing generations
d) Create an empty +1 generation
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 How to pick only YYMMDD from DATE1P (... SYNCSORT 7
No new posts Pick a record from a file based on ti... COBOL Programming 4
No new posts Pick random records and only 100k rec... DFSORT/ICETOOL 7
No new posts Pick email Ids from a report. CLIST & REXX 22
No new posts Syncsort - need to pick set of records. JCL & VSAM 5
Search our Forums:

Back to Top