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 get a generation number from a gdg in JCl

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: How to get a generation number from a gdg in JCl
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: 1439
Location: Bangalore,India

PostPosted: Mon Apr 23, 2007 5:34 pm    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Mon Apr 23, 2007 5:36 pm    Post subject:
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    Post subject: How to get a generation number from a gdg in JCl
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: 8593
Location: Back in jolly old England

PostPosted: Mon Apr 23, 2007 6:16 pm    Post subject:
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    Post subject: Re: How to get a generation number from a gdg in JCl
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: 8593
Location: Back in jolly old England

PostPosted: Mon Apr 23, 2007 6:24 pm    Post subject:
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    Post subject: Re: How to get a generation number from a gdg in JCl
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: 8593
Location: Back in jolly old England

PostPosted: Mon Apr 23, 2007 6:50 pm    Post subject:
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    Post subject: Re: How to get a generation number from a gdg in JCl
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: 8593
Location: Back in jolly old England

PostPosted: Mon Apr 23, 2007 7:00 pm    Post subject:
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    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Mon Apr 23, 2007 7:36 pm    Post subject:
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

Site Director


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

PostPosted: Tue Apr 24, 2007 1:41 am    Post subject:
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    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 Sequence number add in SORT pshongal SYNCSORT 3 Fri Sep 02, 2016 3:32 pm
No new posts Random Password (in string format) ge... ezhavendhan COBOL Programming 10 Mon Aug 29, 2016 3:18 pm
No new posts Casting a Binary Number to Numeric in... Bob Steinkraus Java & MQSeries 6 Tue Aug 09, 2016 5:58 pm
No new posts GDG vsersion number change Raghu navaikulam JCL & VSAM 5 Fri May 27, 2016 4:49 pm
No new posts CPU time Vs Number of records Nileshkul JCL & VSAM 5 Mon May 09, 2016 4:05 pm


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