View previous topic :: View next topic
|
Author |
Message |
abhishekmdwivedi
New User
Joined: 22 Aug 2006 Posts: 95 Location: india
|
|
|
|
Hi all,
1) Under a PDS I have around 34000 cobol programs. eg. my.pds.cobol.
2) I have a list of copybooks (around 1300) in a PS.
I want to search all the cobol codes for the list of copybooks to check whether any of the cobol programs uses enlisted copybooks. For this I have written a small REXX code, which will read one record from the copybook file and searches each member in the Cobol program PDS one by one for that copybook.
Code: |
DO CNT = 1 TO SRH.0
L.1=SRH.CNT
L.0=1
"EXECIO" L.0 "DISKW CALLCOB (STEM L."
DO CURMEM = 1 TO SRC.0
PARSE VALUE SRC.CURMEM WITH MEMNM
MEMNM=STRIP(MEMNM)
"ALLOC F(SOU) DS('"FULLNAME"("MEMNM")') SHR"
"EXECIO * DISKR SOU(STEM SLINE. FINIS)"
"FREE F(SOU)"
DO CLINE=1 TO SLINE.0
IF POS(SRH.CNT,SLINE.CLINE) > 0 THEN
DO
L.1=" "MEMNM
L.0=1
"EXECIO" L.0 "DISKW CALLCOB (STEM L."
END
END
END |
Issue :
The above code is taking a hell lot of time for generating the list.
Can anyone provide me a more efficient approach for this issue.
Thanks. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Grab an ISPF 3.14 search batch JCL and write a quick program to generate the 1300 search members in the JCL I'm not sure what the limit on ISRUPC is for search, so you may have to break it into more than one job, but it's almost certainly faster than what you're doing. |
|
Back to top |
|
|
abhishekmdwivedi
New User
Joined: 22 Aug 2006 Posts: 95 Location: india
|
|
|
|
Thanks Robert,
But this will won't help me in sub grouping the cobol programs list on the basis of copybooks.
eg :
Copybook1
COBOL1
COBOL2
COBOL3
Copybook2
COBOL2
COBOL5
Current REXX code helps me in organizing this in a better way.
Pleased to see your solution but can the above be achieved using a approach. ISRUPC is not helping me in setting up this. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
With just a little bit of work you should be able to take the output from the job Robert suggested and product the output you want.
If you're determined to use the rexx code, at least run this on the weekend in batch. |
|
Back to top |
|
|
abhishekmdwivedi
New User
Joined: 22 Aug 2006 Posts: 95 Location: india
|
|
|
|
Hi Dick,
Thanks for the reply.
Can you please provide me a brief of what you are saying.
Some more input to your post will help me better understand the approach you are pointing to. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Part 1
I believe Robert's process will run much faster than the rexx code. It you used Robert's suggestion, with a little bit of work you could take the output that is not as you want it and turn into output like what you want.
Part 2
If the rexx code posted is used it will take "a hell lot of time ", so i'd recommend running this over the weekend to cause the least system impact as well as get the best run-time possible. I would also run this in batch rather than online. There should be more memory and cpu time available in batch, so this may prevent impacts on the tso resources as well as prevent abends. |
|
Back to top |
|
|
PeD
Active User
Joined: 26 Nov 2005 Posts: 459 Location: Belgium
|
|
|
|
Just thoughs.
( if I see well ) Here you explore first your set of copybooks and for each of them you open and close all the members of PDS.
Rexx is not really the best choice to do that.
So if you have 10 copybooks and 34000 members : 340000 open's and close's
If you first read members one by one and loop in the set of copybooks you will reduce the numbers to only exactty the numbers od members here 34000.
Second, do you have the opportunity to use SAS instead of REXX?
My two eurocents
Cheers
Pierre |
|
Back to top |
|
|
abhishekmdwivedi
New User
Joined: 22 Aug 2006 Posts: 95 Location: india
|
|
|
|
Quote: |
So if you have 10 copybooks and 34000 members : 340000 open's and close's
If you first read members one by one and loop in the set of copybooks you will reduce the numbers to only exactty the numbers od members here 34000.
|
Yes, I have implemented that change in my second try.... but still the results are taking lot of time.
Quote: |
Second, do you have the opportunity to use SAS instead of REXX?
|
Yes, I have SAS. But a limited knowledge of it. Can you please de-brief a approach which I can take in SAS. Currently I am following what Dick has suggested but can try SAS.
A small help for start will help a lot. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
why don't You use IRSLEMX and process the output ???
ISRLEMX is an utiity to cross reference copy books in many languages
its option 12 in foreground or background
all the collecting will be done by ispf, an You simply have to process the output
to format in any way You like...
simple and effective |
|
Back to top |
|
|
abhishekmdwivedi
New User
Joined: 22 Aug 2006 Posts: 95 Location: india
|
|
|
|
Hi All,
I have executed the REXX in the Weekend Batch for the results. And have obtain the desired output.
Thank you all for your inputs to the issue.
Regards,
Abhi |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
You're welcome - thanks for letting us know it ran
Just curious, now long did it take and how much cpu was required?
d |
|
Back to top |
|
|
|