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
 

 

How to pick the unprocessed GDG

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: How to pick the unprocessed GDG
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: 7932
Location: Bellevue, IA

PostPosted: Wed Jan 20, 2010 5:53 pm    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10211
Location: italy

PostPosted: Wed Jan 20, 2010 5:54 pm    Post subject: Reply to: How to pick the unprocessed GDG version.
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    Post subject: Reply to: How to pick the unprocessed GDG
Reply with quote

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

Moderator Team Head


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

PostPosted: Wed Jan 20, 2010 5:58 pm    Post subject: Reply to: How to pick the unprocessed GDG
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: 2422
Location: Netherlands, Amstelveen

PostPosted: Wed Jan 20, 2010 6:06 pm    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Wed Jan 20, 2010 6:53 pm    Post subject:
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    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 Pick a record from a file based on ti... Mani453 COBOL Programming 4 Thu Jan 07, 2016 6:18 am
No new posts Pick random records and only 100k rec... kpadmanabhuni DFSORT/ICETOOL 7 Tue Apr 15, 2014 6:27 pm
No new posts Pick email Ids from a report. abhit007 CLIST & REXX 22 Wed Mar 07, 2012 12:03 pm
No new posts Syncsort - need to pick set of records. dick scherrer JCL & VSAM 5 Mon Sep 19, 2011 8:34 pm
No new posts Sum up a field & then pick specif... sqlcode1 DFSORT/ICETOOL 5 Wed Jul 13, 2011 3:34 pm


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