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

Jcl to compare GDG version creation date with system date


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

New User


Joined: 18 Dec 2007
Posts: 1
Location: India

PostPosted: Thu Apr 30, 2009 7:45 pm
Reply with quote

Hi

Currently I am using GDG version created by source system(monthly once) in my monthly job.
I need to have a check whether the latest version avaliable is not the one which is created in last month(reason might be that source system has not created the current month version by the time my job kicks off)
Could anyone help me with JCL to implement the check.
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: Thu Apr 30, 2009 7:53 pm
Reply with quote

Create a file that contains the last GDG processed.

Use IDCAMS LISTCAT to get current generations of the GDG.
Use a program to parse the LISTCAT output to find the latest generation.

Use a program to compare the generation in the file against the output of the LISTCAT parse to see if they're equal. If not, write the latest generation to the file and proceed.

What you're wanting to do requires at least one program -- it cannot be done purely with JCL, which does nothing but execute programs anyway.
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Fri May 01, 2009 12:59 am
Reply with quote

And also, please use the correct terminology. Versions and Generations are both valid terms when dealing with GDS.

If YOU do not understand the correct terminology, how the hell do you expect us to really know what you mean.

Please get it right next time !!!!!!!!!!!!!!!!!!!!!
Back to top
View user's profile Send private message
RAIN YE

New User


Joined: 06 May 2009
Posts: 7
Location: China

PostPosted: Thu May 07, 2009 5:16 am
Reply with quote

Hi I agree with Robert's processing steps, and I think these can be done by 'pure batch', if icetool is defined as part of it. It can do the find string job as well as matching.
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 Compare 2 files(F1 & F2) and writ... JCL & VSAM 4
No new posts Replacing 'YYMMDD' with date, varying... SYNCSORT 3
No new posts Sysplex System won't IPL at DR site I... All Other Mainframe Topics 2
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
Search our Forums:

Back to Top