View previous topic :: View next topic
|
Author |
Message |
pmn2cdac
New User
Joined: 23 Dec 2007 Posts: 27 Location: Bangalore
|
|
|
|
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 |
|
|
PeD
Active User
Joined: 26 Nov 2005 Posts: 459 Location: Belgium
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
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 |
|
|
pmn2cdac
New User
Joined: 23 Dec 2007 Posts: 27 Location: Bangalore
|
|
|
|
Extracting means--copying the name of thte gdg version...nothing more |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
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 |
|
|
pmn2cdac
New User
Joined: 23 Dec 2007 Posts: 27 Location: Bangalore
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
Back to top |
|
|
pmn2cdac
New User
Joined: 23 Dec 2007 Posts: 27 Location: Bangalore
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
We understand what you want to do. . . We do not understand why you want to do it
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 |
|
|
MBabu
Active User
Joined: 03 Aug 2008 Posts: 400 Location: Mumbai
|
|
|
|
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 |
|
|
pmn2cdac
New User
Joined: 23 Dec 2007 Posts: 27 Location: Bangalore
|
|
|
|
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 |
|
|
skkp2006
New User
Joined: 14 Jul 2006 Posts: 93 Location: Chennai,India
|
|
|
|
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
Syam |
|
Back to top |
|
|
|