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

How to get a generation number from a gdg in JCl


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

New User


Joined: 23 Apr 2007
Posts: 18
Location: India

PostPosted: Mon Apr 23, 2007 5:29 pm
Reply with quote

Hi

Iam creating multiple generations in a JCL. After creating one generation I need to know the generation number. Obviously for the first time it will be G0001.V00. For the 2nd and third time the generation number changes. In this case how to get the generation number in the same jcl.

If anyone knows please address my query.
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Mon Apr 23, 2007 5:34 pm
Reply with quote

Velkumar,

Quote:
Obviously for the first time it will be G0001.V00


Please rephrase your post.
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Mon Apr 23, 2007 5:36 pm
Reply with quote

Why do you need to know the generation number. The ones that you create within your job can all be accessed by relative generation.
Back to top
View user's profile Send private message
Velkumar

New User


Joined: 23 Apr 2007
Posts: 18
Location: India

PostPosted: Mon Apr 23, 2007 5:55 pm
Reply with quote

Hi

I will make my query more clear. For example the GDG created is A.B.C.G0001V00. I back up some data into that GDG by referring the current version in the JCL. We will refer in the JCL only by A.B.C(0) and not by A.B.C.G0001v00. To write it into the logfile I need the generaion number. If i write it with the Generation number, after some period, if i want to restore my data I can easily look into the logfile which generation number will contain my data.

Mainly for restoring purpose I need this information.

Hope the things make clear.
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Mon Apr 23, 2007 6:16 pm
Reply with quote

If you really must do it this way, then I suggest that you read the job output via SDSF and then parse that data to extract what was backed up to which generation of a GDG, and then build or update your log file.

Easier option - use you ILM software, like HSM to create backups. That way you can interrogate HSM to see when a dataset was backed up, and there you go. If you speak niceley to your storage people they may even set up a specific MGMTCLAS in SMS to make sure that you do retain the required number of backups.
Back to top
View user's profile Send private message
Velkumar

New User


Joined: 23 Apr 2007
Posts: 18
Location: India

PostPosted: Mon Apr 23, 2007 6:21 pm
Reply with quote

Hi Expat

Fine. But I cannot read the SDSF output. In the same job itself I need to get the info. Basically what I need is any Jcl commands available to get the generation number after the new version gets created.
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Mon Apr 23, 2007 6:24 pm
Reply with quote

Quote:
Fine. But I cannot read the SDSF output. In the same job itself I need to get the info.

Oh yes you can ............................

He says assuming that you do have SDSF installed at your shop icon_confused.gif

You can process SDSF in batch or in REXX to extract the data you need from the sysouts produced by your job, and use this data to build your log file. I know you can, because I've done this myself many many years ago.
Back to top
View user's profile Send private message
Velkumar

New User


Joined: 23 Apr 2007
Posts: 18
Location: India

PostPosted: Mon Apr 23, 2007 6:46 pm
Reply with quote

In one job 6 reports are created. Those 6 reports I had backed up in the version from 1 to 6 respectively in the same job. Those info I had to write in the logfile. If I look in the logfile and if i need to see the 5 th report, then in the logfile it should make an entry like A.B.C.G0005V00 for the 5th report.

Could you please explain moe clearly if you find answers
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Mon Apr 23, 2007 6:50 pm
Reply with quote

Why not back all of the reports up to one version using ADRDSSU (Dfdss).
Back to top
View user's profile Send private message
Velkumar

New User


Joined: 23 Apr 2007
Posts: 18
Location: India

PostPosted: Mon Apr 23, 2007 6:55 pm
Reply with quote

Hi

The reports requested are from different users. So we cannot put them in the same version. For one report one version needed. Thats the requirement
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Mon Apr 23, 2007 7:00 pm
Reply with quote

To me this seems a badly thought out concept. As long as you know WHERE the report is backed up, what is the problem.

Have you considered different GDG names for different users ?
Back to top
View user's profile Send private message
Velkumar

New User


Joined: 23 Apr 2007
Posts: 18
Location: India

PostPosted: Mon Apr 23, 2007 7:13 pm
Reply with quote

In the first step one report gets generated. That I had backed up in version 1 of the GDG. After completion of this step I need to write in the log file with the generation number(G0001V00). In the second step the second report gets generated. That I had backed up in version 2 of the GDG. After completion of this step I need to write in the log file with the generation number(G0002V00). Like wise it continues for more steps.. So one GDG name will be there but different versions for the different reports.

For Next day run the GDG base will be new. And the same process will follow.
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Mon Apr 23, 2007 7:36 pm
Reply with quote

Quote:
For Next day run the GDG base will be new. And the same process will follow.

So, are you saying that you build a new GDG base each day ?
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Tue Apr 24, 2007 1:41 am
Reply with quote

Hello,

It sounds as though a technical solution was decided on before the requirement was well defined. . .

If you would, please explain in a bit more detail just what needs to be available for recall. Please do not include "how" it might be done, just what is needed.

If i understand at all, what you want is being done many places (i.e. being able to retrieve something created previously) and it is not necessary to know dataset name/version in the job that creates it.
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 Pulling a fixed number of records fro... DB2 2
No new posts Substring number between 2 characters... DFSORT/ICETOOL 2
No new posts Generate random number from range of ... COBOL Programming 3
No new posts Increase the number of columns in the... IBM Tools 3
No new posts DFHPI1008 JSON generation failed COBOL Programming 0
Search our Forums:

Back to Top