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

extracting gdg version from ispf 3.4 version


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

New User


Joined: 23 Dec 2007
Posts: 27
Location: Bangalore

PostPosted: Thu Sep 04, 2008 2:16 am
Reply with quote

Hi

I have 25 GDG bases. each gdg base creats one generation everyday.
daily using ispf 3.4 option...iam extracting latest gdg versions for all 25 gdg bases.

my question is , is there a way to make automate the above mentioned stuff.
1) entering into 3.4 option
2) entering gdg base
3)abc.ver100
def.ver101
ghi.ver102
4) extracting ghi.ver102.....

please let me way...if any of you have idea on this,

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

Active User


Joined: 26 Nov 2005
Posts: 459
Location: Belgium

PostPosted: Thu Sep 04, 2008 2:32 am
Reply with quote

What do you mean exactly by "extracting"?
Is it copy the file or running a program on that file to apply some process on the records ( selections, ..)?
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Thu Sep 04, 2008 11:38 am
Reply with quote

So why do you need to extract the generation number every day. What purpose does it serve ?

There is a thread that will allow you, with a little code change, to do this in REXX
Click HERE

Also consider writing your own code to use in 3.4 - some good examples, hints & tips in the forum already.
Back to top
View user's profile Send private message
pmn2cdac

New User


Joined: 23 Dec 2007
Posts: 27
Location: Bangalore

PostPosted: Fri Sep 05, 2008 2:08 am
Reply with quote

Extracting means--copying the name of thte gdg version...nothing more
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Fri Sep 05, 2008 11:31 am
Reply with quote

pmn2cdac wrote:
Extracting means--copying the name of thte gdg version...nothing more

I am sure that you really meant to say gdg generation rather than version. Version has a completely different meaning to generation.

I know what extracting meant, just curious as to the reason why this needs to be done ? the latest generation can always ve addressed via gdg.base(0)
Back to top
View user's profile Send private message
pmn2cdac

New User


Joined: 23 Dec 2007
Posts: 27
Location: Bangalore

PostPosted: Fri Sep 05, 2008 11:25 pm
Reply with quote

I got it....

but I have 25 gdg bases....so in ISPF 3.4 i have to enter 25 times to get latest gdg version of each gdg base....

I wanted to do this at a time ...so that it lists me latest gdg versions name of all 25 gdg bases
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: Sat Sep 06, 2008 5:16 am
Reply with quote

Hello,

How will knowing the latest generation meet any requirement other than curiosity? Any job that needs to use the latest data can simply use dsn(0).

There must be something i misunderstand icon_confused.gif
Back to top
View user's profile Send private message
pmn2cdac

New User


Joined: 23 Dec 2007
Posts: 27
Location: Bangalore

PostPosted: Tue Sep 09, 2008 1:16 am
Reply with quote

I understood gdg.base(0) version points to latest version...

but that is not my question......

I want to list out the name of latest version each 25 gdg.base has . how do you do it.......instead of going to ispf 3.4 25 times.

Please let me know, if you need any other information.

Thanks,
Praveen
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 Sep 09, 2008 1:22 am
Reply with quote

Why do you have to use ISPF 3.4?

Expat has provided REXX code that with some tweaking will do what you want. You could also use LISTCAT in a batch job to list the generations for each GDG base and a little programming will extract the latest generation from the LISTCAT output.

Either way would solve your 'problem' but not use ISPF 3.4 yet you don't seem to want to use Expat's solution -- so the key question has become, why do you have to use ISPF 3.4?
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 Sep 09, 2008 1:25 am
Reply with quote

Hello,

We understand what you want to do. . . We do not understand why you want to do it icon_confused.gif

If you explain why you want to do this (rather than just avoiding 25 trips thru 3.4), we may be able to offer better suggestions.

As i asked before, what sort of requirement will this fill? Once gathered, how would the data be used?
Back to top
View user's profile Send private message
MBabu

Active User


Joined: 03 Aug 2008
Posts: 400
Location: Mumbai

PostPosted: Tue Sep 09, 2008 11:13 am
Reply with quote

useful technique because tso alloc, listdsi, etc don't handle GDG relative generation names.
Code:
/* REXX */                                                         
/* FOR Z/OS 1.8 OR LATER */                                         
/* ftp://ftp.software.ibm.com/s390/zos/tools/bpxwdyn/bpxwdyn.html */
call bpxwdyn 'ALLOC FI(A) REUSE DA(MBABU.GDGS(0)) SHR RTDSN(GEN)'   
say gen
Back to top
View user's profile Send private message
pmn2cdac

New User


Joined: 23 Dec 2007
Posts: 27
Location: Bangalore

PostPosted: Thu Sep 11, 2008 11:22 pm
Reply with quote

Hi,

I extracting latest gdg just for documentaion purpose....and gdg base is defined in such a way that generation will be on disk for long time...so i am extracting latest gdg generation and copying them into personal file.

Thanks all....

for extracting latest gdg version for 25 gdg base i used the rexx
Code:

*******REXX**********/                     
 SAY 'THIS IS EXISTING INBOUND FILE'         
 SAY 'BLUCHIP GENERATION********************'
 "LISTCAT LVL(PECS.BLCHIP.IFF.BN.DATA)"     
 SAY 'AK STEEL/ARMCO***********************'
 "LISTCAT LVL(PECS.ARMCO.IFF.BN.DATA)"       
 SAY 'ALCOA*******************************' 
 "LISTCAT LVL(PECS.ALCOA.RETHMO.IFF.BN.DATA)"

I ran above rex by batch program.....
Code:

 //LIDUOCUA JOB (500,CC4976),'JCL4REXX',       
 //         REGION=0K,                         
 //         CLASS=B,                           
 //         MSGCLASS=2,                         
 //         NOTIFY=&SYSUID                     
 //TSOBATCH EXEC PGM=IKJEFT1A,DYNAMNBR=200     
 //SYSEXEC DD DSN=PBCL.TMEMBER.REXX,DISP=SHR   
 //SYSPRINT DD SYSOUT=*                         
 //SYSTSPRT DD SYSOUT=*                         
 //SYSTSIN DD *                                 
   PROFILE PREFIX(LIDU0CU)/* PLEASE USE THIS,*/
   %REXX                                       
 /* SPECIFYING YOUR USERID*/


....it gave me what i want....
now...i need not to go every time 3.4 to get latest gdg version

thanks all once again,

Praveen
Back to top
View user's profile Send private message
skkp2006

New User


Joined: 14 Jul 2006
Posts: 93
Location: Chennai,India

PostPosted: Mon Dec 01, 2008 2:47 pm
Reply with quote

If you just want to get the latest gdg generation with a batch job you can pretty well use the job below...


Code:
//STEP10  EXEC PGM=IDCAMS
//DD1       DD DSN=YOUR.GDG.BASE1(+0),DISP=SHR
//DD2       DD DSN=YOUR.GDG.BASE2(+0),DISP=SHR
//SYSPRINT  DD SYSOUT=*
//SYSIN     DD *
 PRINT INFILE(DD1) COUNT(0) CHAR
 PRINT INFILE(DD2) COUNT(0) CHAR
/*



Is this what you are expecting or did i overlooked at something icon_rolleyes.gif


Syam
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 Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
No new posts Looking for a little history of ISPF ... TSO/ISPF 5
No new posts Adding QMF and SPUFI to the ISPF menu DB2 20
No new posts Help in extracting data between doubl... DFSORT/ICETOOL 5
Search our Forums:

Back to Top