View previous topic :: View next topic
|
Author |
Message |
nazia.lalani Warnings : 1 New User
Joined: 20 Mar 2009 Posts: 25 Location: hyderabad
|
|
|
|
Hi my requirement is
A) to search a string in PDS
B) Then each member resulted in A ...should be serached in another PDS
As of now i completed the coding for A.
My code is working fine with the PDS having some 2000 - 3000 members
I need to search on Production dataset which is having 70,000
So when executing REXX for this bigger PDS i m getting ths below messsage
14 *-* "LISTDS '"LIBRARY"' MEMBERS"
+++ RC(-1645) +++
PROD.SYSIN HAS 44559 MEMBERS
EXECIO error. Unable to obtain storage.
Can anybosy tell me why will this come?
I am new to REXX so anybody please can suggest me on this
Code: |
CALL OUTTRAP('PDS.')
"LISTDS '"LIBRARY"' MEMBERS"
CALL OUTTRAP "OFF"
FULLNAME = LIBRARY
SAY " "LIBRARY" HAS "PDS.0 - 6" MEMBERS"
COUNT = 0
"ALLOC FI(XXOUT) DA('QSHK3S6.NAZIA.REXX.PRINT') MOD RESUSE
IF RC \= 0 THEN
DO
SAY '*** ERROR - LOG ALLOCATION FAILED: ABENDING'
EXIT 0
END
WRITE.1= "SEARCHING FOR "STRING" IN "LIBRARY""
WRITE.0=1
"EXECIO" WRITE.0 "DISKW XXOUT (STEM WRITE."
DO J = 7 TO PDS.0
PARSE VALUE PDS.J WITH MEMNAME
MEMNAME = STRIP(MEMNAME)
"ALLOC F(XXIN) DS('"FULLNAME"("MEMNAME")') SHR REUSE"
"EXECIO * DISKR XXIN (FINIS STEM IN."
"EXECIO 0 DISKR XXIN (FINIS"
"FREE F(XXIN)"
DO K = 1 TO IN.0
IF POS(STRING,IN.K) <> 0 THEN
DO
WRITE.1=MEMNAME
WRITE.0=1
"EXECIO" WRITE.0 "DISKW XXOUT (STEM WRITE."
COUNT = COUNT + 1
LEAVE
END
ELSE
NOP
END
WRITE.1= "THERE ARE TOTAL OF "COUNT"" ,
"COMPONENTS IN "LIBRARY" FOR "STRING""
WRITE.0=1
"EXECIO" WRITE.0 "DISKW XXOUT (STEM WRITE."
"EXECIO 0 DISKW XXOUT (FINIS"
"FREE F(XXOUT)"
DROP PDS.
SAY ""COUNT" COMPONENTS ARE FOUND IN "LIBRARY" FOR STRING "STRING""
SAY '*** SEARCH COMPLETE ***' |
|
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Don't know why you are using REXX, SUPERC gives the same results in a fraction of the time.
As for the error, your session or job has used up the storage allowed by either the TSO logon PROC of jobclass used. |
|
Back to top |
|
|
nazia.lalani Warnings : 1 New User
Joined: 20 Mar 2009 Posts: 25 Location: hyderabad
|
|
|
|
Yes i can use SUPERC to get the list of members....
But i need to store that member name resulted out of search
and then each member needs to be checked individually in another libarary ..that would be my output..
So for the error, How to resolve?
Do i need to increase the storage ? Is their a any alternative
Please let me know |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
I would use SUPERC and parse the ouput to build SELECT statements for a second run of SUPERC.
As for the error, where are you running foreground or batch. IN fact either way you need to process the member list in chunks although I am a little surprised that 70,000 six byte fields would blow out a foreground session. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
expat wrote: |
... although I am a little surprised that 70,000 six byte fields would blow out a foreground session. |
I was thinking the same thing. Nothing really jumps out at me (poor coding aside) that I think would cause the memory to max out, unless some of the members are exceedingly large and can't be read in their entirety into a stem variable. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Nazia, I think I'd try ditching the use of stem variables and just use the data stacks. I'd read the target PDS member one record at a time, look for the search value, if found close the read, push the member name into the stack, write it, then loop to the next member. And I'd definitely be running this proces in the background. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Librarian mode ON
Or, you could click HERE to see the exact same question which was posted and answered during the very recent past.
Librarian mode OFF
But, you did search before posting ........................ didn't you ??? |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
he is not dropping stem IN. between execio's.
I wonder why no one ever uses LMM.. facilities.
maybe because it involves more than one script
(and everyone has to have ONLYone module)
but here is a link explaining ISRMBRS macro which would alleviate a lot of the headache.
but it is a macro. |
|
Back to top |
|
|
|