Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
How to recall GDG versions using REXX

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
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    Post subject: How to recall GDG versions using REXX
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

Senior Member


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

PostPosted: Mon Aug 09, 2010 1:45 pm    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Mon Aug 09, 2010 2:03 pm    Post subject:
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

Senior Member


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

PostPosted: Mon Aug 09, 2010 3:46 pm    Post subject: Re: How to recall GDG versions using REXX
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:

http://www.ibmmainframes.com/about24363.html
http://ibmmainframes.com/about47987.html
http://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    Post subject: Reply to: How to recall GDG versions using REXX
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

Site Director


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

PostPosted: Mon Aug 09, 2010 8:06 pm    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Mon Aug 09, 2010 10:20 pm    Post subject:
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

Site Director


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

PostPosted: Mon Aug 09, 2010 10:53 pm    Post subject: Reply to: How to recall GDG versions using REXX
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    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to write Rexx program to size and... sreejeshcs CLIST & REXX 14 Thu Oct 12, 2017 7:26 am
This topic is locked: you cannot edit posts or make replies. Rexx to execute spool commands upendrasri CLIST & REXX 5 Wed Oct 04, 2017 6:54 am
This topic is locked: you cannot edit posts or make replies. Rexx to execute spool commands upendrasri CLIST & REXX 47 Fri Sep 29, 2017 1:08 pm
No new posts ejck thru rexx to multiple jobs insid... Susanta All Other Mainframe Topics 5 Tue Sep 19, 2017 1:39 pm
This topic is locked: you cannot edit posts or make replies. Extract all "IF" Statements... Adarsh Damodaran CLIST & REXX 1 Wed Sep 06, 2017 9:28 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us