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

To check the new generation of GDG


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

New User


Joined: 04 Aug 2008
Posts: 46
Location: Chennai

PostPosted: Thu Nov 26, 2009 12:52 pm
Reply with quote

Hi,

We have a business server which pushes files to GDGs, each time a new file sits in the server it pushes that as a new generation of GDG. The existing process we follow is to check the mails from the server group and then go to the GDG files and find the new generation and process it.

I need some ideas on how best we can finetune the existing process. Like is there a way we can check the creation date of the latest generation and then have it checked with the previous one and if the date is greater we can directly run the job.

Any other alternatives are also appreciated

Sorry for the big story....
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Thu Nov 26, 2009 12:56 pm
Reply with quote

Although GDG is not recommended for dataset triggering, can you not have words with your scheduling people to trigger the required job at creation of the next generation.

That way you need to do nothing else.
Back to top
View user's profile Send private message
VVRAVINDRA

New User


Joined: 04 Aug 2008
Posts: 46
Location: Chennai

PostPosted: Thu Nov 26, 2009 1:21 pm
Reply with quote

No this is a kind of test job and the scheduling team won't help us in any way
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19243
Location: Inside the Matrix

PostPosted: Thu Nov 26, 2009 10:09 pm
Reply with quote

Hello,

How often are these files uploaded?
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6248
Location: Mumbai, India

PostPosted: Fri Nov 27, 2009 6:57 pm
Reply with quote

Quote:
We have a business server which pushes files to GDGs, each time a new file sits in the server it pushes that as a new generation of GDG.
What happens to generation once that is processed -- Because you didn't tell this so I'll take the benefit of doubt and suggest why don't you delete the generation when it's processed once...
Back to top
View user's profile Send private message
VVRAVINDRA

New User


Joined: 04 Aug 2008
Posts: 46
Location: Chennai

PostPosted: Mon Nov 30, 2009 2:46 pm
Reply with quote

Sorry for the delayed response, the GDG versions would be kept them after the process
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1744
Location: Tirupur, India

PostPosted: Mon Nov 30, 2009 3:55 pm
Reply with quote

Hi,

As D requested,

Quote:
How often are these files uploaded?


Based on the interval we can try other options.
Back to top
View user's profile Send private message
VVRAVINDRA

New User


Joined: 04 Aug 2008
Posts: 46
Location: Chennai

PostPosted: Mon Nov 30, 2009 3:57 pm
Reply with quote

Well, the interval for each new generation would be 7 days to 1 month
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Mon Nov 30, 2009 5:30 pm
Reply with quote

Still not totally clear, so is this correct ...........

You want to check the generations of a GDS that are catalogued.
You know the generation that was last processed.
So you want to compare the catalogued generations against the last generation which has been processed.
If the generations are different then process the generations that have not been processed and update the record file that has recorded the last generation processed.
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1744
Location: Tirupur, India

PostPosted: Mon Nov 30, 2009 5:33 pm
Reply with quote

Expat,

I think ur right with the requirements.
Back to top
View user's profile Send private message
VVRAVINDRA

New User


Joined: 04 Aug 2008
Posts: 46
Location: Chennai

PostPosted: Mon Nov 30, 2009 5:37 pm
Reply with quote

Quote:

You want to check the generations of a GDS that are catalogued.

Yes, I want to check the latest generation of the GDG
Quote:

You know the generation that was last processed

Well, I would not be knowing the exact generation number of the previous generation
Quote:
So you want to compare the catalogued generations against the last generation which has been processed

I just need to know whether the new generation is created today.
Quote:
If the generations are different then process the generations that have not been processed and update the record file that has recorded the last generation processed.

Yes, I need to process the generations which are created newly.

Sorry once again all of you, I was not clear with my requirement. Well, in a way the process itself is hazy...
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1744
Location: Tirupur, India

PostPosted: Mon Nov 30, 2009 5:57 pm
Reply with quote

Hi,

Try using the below REXX to get the most recent GDG member created.

CICDL.DQ.PRFILE.DISKCOPY is the base of GDG.
DSN1 variable has the latest GDG meber.
My manager is around, so will try the rest of the code later icon_smile.gif

Code:
/*REXX*/                                             
GDG_LINES = 'CICDL.DQ.PRFILE.DISKCOPY'               
FILE1=STRIP(GDG_LINES)                               
GDG = FILE1                                         
DSN = STRIP(GDG!!".G0000V00")                       
X=OUTTRAP(LST.)                                     
" LISTC ENT('"GDG"')"                               
X=OUTTRAP(OFF)                                       
SAY 'LST.0 IS ' LST.0                               
DO A = LST.0 TO 1 BY -1                             
  IF POS('NONVSAM',LST.A) > 0 THEN DO               
    DSN = SUBSTR(LST.A,POS('NONVSAM',LST.A)+13,44)   
    A = 0                                           
END                                                 
END                                                 
DSN1=STRIP(DSN)                                     
SAY ' THE GDG MEMBER TESTED IS ' DSN1               
EXIT   



Hope this helps..
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Mon Nov 30, 2009 6:02 pm
Reply with quote

You can get the date that a dataset was catalogued from IDCAMS LISTCAT, but I would rather use a control dataset that records the generation number last processed. If a generation for some reason is created over a weekend and the job runs after that, then the date will not be equal to the run date. Also, the file arrives at 23:59:59, your job runs 00:00:01 and again the dates are different, so no run.

What happens if two generations are created on the same day. At least with a control file that option is also covered.
Back to top
View user's profile Send private message
VVRAVINDRA

New User


Joined: 04 Aug 2008
Posts: 46
Location: Chennai

PostPosted: Mon Nov 30, 2009 6:06 pm
Reply with quote

Hi Vasanth,
Is DSN1 the new GDG generation??

Hi Expat,
I tried LISTCAT but then as u said the complexity is more, so I dropeed the idea of LISTCAT and about control files, could you throw some more light??

Thanks,
Ravi
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Mon Nov 30, 2009 6:18 pm
Reply with quote

Read control file to find last generation number processed

Perform LISTCAT on GDG base.
Parse LISTCAT information.
If Generation number GT control file -
Build JCL with this generation number
Loop back to parse LISTCAT
If Another generation then concatenate i/p files and loop back again
Else submit job

Job will also conditionally update the control file with highest generation number processed.
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1744
Location: Tirupur, India

PostPosted: Mon Nov 30, 2009 6:20 pm
Reply with quote

Hi,

Quote:
Is DSN1 the new GDG generation??


Yes it is. Just give it a try at your shop with a test GDG and confirm what data it fetches.

I really think Expat's concerns are very valid. And you may have to address them if you feel that they may hit you.
If you still feel that you need the creation date, try using DSINFO utility to get the creation date.
the variable ZDSCDATE has the date.

Code:
ISPEXEC  DSINFO DATASET(dsname)

+---------------+-------------------------------------------+-----------+-----
| ZDSCDATE      | Creation date (National format)           | Character |   10
+---------------+-------------------------------------------+-----------+-----
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Mon Nov 30, 2009 6:43 pm
Reply with quote

Mmmmmmmmmmmmmm, using DSINFO will cause migrated generations to be recalled and then remigrated overnight, and will probably be noticed by your friendly storage management team who will investigate the HSM (or whatever) "thrashing" of the generations and then possibly arrive at your desk for a little (un)friendly chat.

P.S. Do not believe everything written about storage guys on this forum turning up with baseball bats, we prefer rubber tubing filled with lead shot as it leaves a lot less visible evidence icon_lol.gif
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1744
Location: Tirupur, India

PostPosted: Mon Nov 30, 2009 6:54 pm
Reply with quote

Quote:
DSINFO will cause migrated generations to be recalled and then remigrated overnight


Oops, I think I forgot an important piece of code in my last suggestion.

Code:
**Conditions Apply**
icon_biggrin.gif
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Mon Nov 30, 2009 6:57 pm
Reply with quote

my experience with irritated storage guys is,
they talk to their buddies in TSO administration
and suddenly your userid is invalid and it takes forever to get it reinstated
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1744
Location: Tirupur, India

PostPosted: Mon Nov 30, 2009 7:09 pm
Reply with quote

Hi Expat,

Could you pls let me know, will LISTCAT recall the dataset if its migrated?

Thanks,
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


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

PostPosted: Mon Nov 30, 2009 7:20 pm
Reply with quote

expat wrote:
Mmmmmmmmmmmmmm, using DSINFO will cause migrated generations to be recalled and then remigrated overnight, and will probably be noticed by your friendly storage management team who will investigate the HSM (or whatever) "thrashing" of the generations and then possibly arrive at your desk for a little (un)friendly chat.

P.S. Do not believe everything written about storage guys on this forum turning up with baseball bats, we prefer rubber tubing filled with lead shot as it leaves a lot less visible evidence icon_lol.gif


If no baseball bats or rubber tubing around the will use phone books.
They still exists? icon_eek.gif
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


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

PostPosted: Mon Nov 30, 2009 7:24 pm
Reply with quote

dbzTHEdinosauer wrote:
my experience with irritated storage guys is,
they talk to their buddies in TSO administration
and suddenly your userid is invalid and it takes forever to get it reinstated


I was an automation guy (beside other things) so without TSO automation would grind to a halt. My goodness what kind of power
i had.
Back to top
View user's profile Send private message
VVRAVINDRA

New User


Joined: 04 Aug 2008
Posts: 46
Location: Chennai

PostPosted: Mon Nov 30, 2009 7:46 pm
Reply with quote

Hi Vasanth,

LISTCAT can recall the dataset when the following option is given
LISTCAT FILE(DDIN)-
GDG -
ALL
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 GDG generation name to GDG Base name ... DFSORT/ICETOOL 3
No new posts Using Multiple IFTHEN and WHEN condit... SYNCSORT 12
No new posts Check if CICS is online in JCL CICS 10
No new posts SCOPE PENDING option -check data DB2 2
No new posts Check data with Exception Table DB2 0
Search our Forums:

Back to Top