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

How to recall GDG versions using REXX


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
NIKHIL SHARMA

New User


Joined: 22 Jun 2010
Posts: 12
Location: Bangalore

PostPosted: Mon Aug 09, 2010 12:09 pm
Reply with quote

Hi,

I am writing a rexx program to read all versions of GDG and search for the particular record. However, there are 150 versions present and most of them are migrated to DASD. Need to know how can we recall the migrated versions so that it does not take much time.

Curently, rexx code i am using is taking lots of time to recall these versions if version number is high (around 150 versions are present).

Please suggest something.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Mon Aug 09, 2010 1:45 pm
Reply with quote

Unfortunately your terminolgy is not correct; using correct words for the things in IT usually increase the chances of getting the correct answers rather fast.

When you talk about GDGs, version and generations both can be correct terms but they have very differnt meanings and in the context of your question what should be used, does matter. There can not be 150 versions for a given GDG - most possibly you menat 150-generations. And why would some migrate them to DASD?

Quote:
Curently, rexx code i am using is taking lots of time to recall these versions if version number is high
Please tell us what is "lots of time" for you? Suggest you also show what you have coded in your REXX.


Have you used "NOWAIT" like
Code:
 TSO HRECALL "file.name.*.*" NOWAIT
?
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Mon Aug 09, 2010 2:03 pm
Reply with quote

The problem is almost certainly due to your REXX processing each generation one at a time, so when the open for the file is issued HSM will recall the dataset before you can process it.

You will need to recall all of the generations before your job starts. This can be done as shown by the example given by Anuj. The advantage of this is that HSM will only mount a tape once for all datasets to be recalled from that tape, where in your case is migrated to tape the tape may be mounted read and dismounted once for each generation.

Perhaps you should explain the situation tour your friendly storage gurus to see if all generations can be retained on DASD.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Mon Aug 09, 2010 3:46 pm
Reply with quote

NIKHIL SHARMA wrote:
Curently, rexx code i am using is taking lots of time to recall these versions if version number is high (around 150 versions are present).
Ok, I'm beaten up by this sentence - I thought you wrote a REXX to recall GDGs and not to search strings. However, my personal choice had been ISRSUPC when I need to search string/s. Though recalling migrated DSNs is different question altogther, following links mihgt help you for that:

www.ibmmainframes.com/about24363.html
ibmmainframes.com/about47987.html
ibmmainframes.com/about27524.html
Back to top
View user's profile Send private message
NIKHIL SHARMA

New User


Joined: 22 Jun 2010
Posts: 12
Location: Bangalore

PostPosted: Mon Aug 09, 2010 7:51 pm
Reply with quote

Apologies for using wrong words in my questions.

Also i need to hrecall from TAPE (not from DASD)

i need to look for certain record in from the GDG generations and do some processing on that. we can have total of 150 GDG generations.

I am giving here the code i wrote to scan through GDG versions and search and print the desired record.

"ALLOCATE FI(OUTDD) DA("MNRP.OUTPUT.DATA") SHR REUSE"

GETDATA = OUTTRAP("RAWOUT.","*")
"LISTCAT ENTRIES('"ABCD.XYZ.PQRS.DATA"')" /* ABCD.XYZ.PQRS.DATA is GDG base */
STOPGETDATA = OUTTRAP('OFF')
IF WORD(RAWOUT.1,1) <> "GDG" THEN DO
SAY 'NOT GDG BASE'
EXIT
END
GDGLISTINDEX = 0
J = 0
Q = 1
DO LOOP = 1 TO RAWOUT.0 / * looping through total number of GDG generations */
IF WORD(RAWOUT.LOOP,1) <> "NONVSAM" THEN ITERATE
GDGLIST.GDGLISTINDEX = WORD(RAWOUT.LOOP,3)
"ALLOCATE FI(INDD) DA('"GDGLIST.GDGLISTINDEX"')
SHR REUSE"
"EXECIO * DISKR INDD ( STEM FILE."
GDGLISTINDEX = GDGLISTINDEX + 1
DO I = 1 TO FILE.0
J = J + 1
COMP3 = SUBSTR(FILE.I,21,6)
XVAR =C2X(COMP3)
XVAR = SUBSTR(XVAR,2,10)
IF XVAR = ICN THEN
DO
FILEA.Q = FILE.I
Q = Q + 1

END
END
"EXECIO 0 DISKW INDD ( FINIS"
"FREE FI(INDD)"
END


If GDG generations are upto 50, it works pretty fine. But, when we have around 100 generations, it takes time. Today it took 15+ minutes to run

I tried using TSO HRECALL "file.name.*.*" NOWAIT but it did not work. when i gave full gdg name (like "XYZ.ABC.G0157V00), it works fine. but when i try to use 'GDGLIST.GDGLISTINDEX' it does not work. Not sure if i am giving correct syntax here.

Please help
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: Mon Aug 09, 2010 8:06 pm
Reply with quote

Hello,

You need to start over. . . Either what you want to do has not been explained properly or you are trying to do something that is not done.

HRECALL retrieves migrated dasd files back to regular dasd.

Also, if you have 150 datasets and they are 20 gig or so, your storage management people will be looking for you with unkindness in their hearts<g>.
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Mon Aug 09, 2010 10:20 pm
Reply with quote

dick scherrer wrote:
Also, if you have 150 datasets and they are 20 gig or so, your storage management people will be looking for you with unkindness in their hearts
No Dick, we're not like that at all. We come looking with baseball bats in our hands icon_biggrin.gif
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: Mon Aug 09, 2010 10:53 pm
Reply with quote

Quote:
We come looking with baseball bats in our hands
And whomp them kindly. . . icon_cool.gif
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 -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Compile Several JCL JOB Through one r... CLIST & REXX 4
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
No new posts run rexx code with jcl CLIST & REXX 15
Search our Forums:

Back to Top