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

TRICKY GDG QUERY


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

Active User


Joined: 05 Oct 2006
Posts: 152

PostPosted: Tue Aug 30, 2011 3:05 pm
Reply with quote

hi,
is there any way we can find out what was the last generation(generation number). and we can start reading from the next generation number?

say example

before my execution (first run) of job gdg had 2 generation.

g001
g002

in the next run say other jobs created 2 more generations.

g001
g002
g003
g004

so in my job i just have to process only g003, g004, since g001 and g002 i have proceseed before the first run.

i, e
some point of time i have to find out what was the latest generation number. and next time onwards i have to process from the next generation number onwards.

note: i cant delete the genearation numbers.

i would be really thankful to you if you can help me on this.

Regds,
useit
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Tue Aug 30, 2011 3:21 pm
Reply with quote

I would have done like this...

Create two GDG bases.. like

HLQ.GBASE.MAIN and
HLQ.GBASE.TEMP

Whenever your job adds new generation to MAIN would have added to TEMP also...

While you want to process generation... process only generations from TEMP and delete all once processing is done.
Back to top
View user's profile Send private message
useit

Active User


Joined: 05 Oct 2006
Posts: 152

PostPosted: Tue Aug 30, 2011 4:19 pm
Reply with quote

escapa,

i dont think your solution would work for me.

in my case.


my gdg file creation jobs run at 4pm, 5pm, 6pm,7pm

and my new file creation job run can vary from 4pm to 6pm

suppose if my new file creation job runs at 5.30. then whatever the gdgs created before 5.30 shouldnt be considered
for processing.(should consider only the generation created from 6pm, 7pm jobs)


if it runs at 6.30pm.(then process only generation created by 7pm job)

please help me regarding the same.
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Tue Aug 30, 2011 4:28 pm
Reply with quote

Clear as mud.... + confusing

Quote:
if it runs at 6.30pm.(then process only generation created by 7pm job)

What does this mean??? how new file creation job running at 6:30 will be able to copy data from job which is going to run at 7 pm???
Back to top
View user's profile Send private message
useit

Active User


Joined: 05 Oct 2006
Posts: 152

PostPosted: Tue Aug 30, 2011 4:40 pm
Reply with quote

hi,

sorry for bothering you again

actually there is one more update job which would run at around 8.30.

here i have to see which all generations needs to be processed.


suppose if new file creation jobs run at 4.30. my 8.30 update job should use(generation created by 5pm, 6pm, 7pm job)

Regds,
useit
Back to top
View user's profile Send private message
superk

Global Moderator


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

PostPosted: Tue Aug 30, 2011 4:47 pm
Reply with quote

I've used two approaches in the past:

- Maintain a logfile. When you use a generation, log it to the log file. On the next batch cycle, check the current existing generations against the log file. If you find a new one, process it, add it to the log file, and continue the processing cycles.

- Rename the used GDG. I'd rename the version number (V00) to (V01) as the indicator that it has been processed. This can really be handy if you have a need to re-process an older generation. Just rename it back to (V00) and let the batch process pick it up on the next cycle.
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: Tue Aug 30, 2011 4:52 pm
Reply with quote

Either set up individual files for each time the job creating the file can run, or have your job process AND DELETE all members of the GDG . If you need to retain data, you would need a second generation data group defined to retain the data.

Quote:
suppose if my new file creation job runs at 5.30. then whatever the gdgs created before 5.30 shouldnt be considered
for processing.(should consider only the generation created from 6pm, 7pm jobs)
The last I heard, time travel was still considered not possible by the laws of physics. If YOUR job runs at 5:30, how is it going to know about the generations created at 6 or 7 without time travel? If you say your job is going to wait until they are created, that is what data set triggers in job schedulers are for.

My conclusion is that either you cannot describe your situation adequately for us to help you, or you are attempting to subvert the laws of physics for some reason.
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 RC query -Time column CA Products 3
No new posts Dynamically pass table name to a sele... DB2 2
No new posts Query on edit primary command CLIST & REXX 5
No new posts Query on edit primary command CLIST & REXX 1
No new posts Issue with EXEC CICS QUERY SECURITY c... CICS 6
Search our Forums:

Back to Top