Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

REXX - to searxh in PDS

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
nazia.lalani
Warnings : 1

New User


Joined: 20 Mar 2009
Posts: 25
Location: hyderabad

PostPosted: Fri Jul 30, 2010 4:17 pm    Post subject: REXX - to searxh in PDS
Reply with quote

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
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Fri Jul 30, 2010 4:23 pm    Post subject:
Reply with quote

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
View user's profile Send private message
nazia.lalani
Warnings : 1

New User


Joined: 20 Mar 2009
Posts: 25
Location: hyderabad

PostPosted: Fri Jul 30, 2010 4:29 pm    Post subject:
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Fri Jul 30, 2010 4:35 pm    Post subject:
Reply with quote

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
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Fri Jul 30, 2010 4:39 pm    Post subject:
Reply with quote

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
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Fri Jul 30, 2010 4:45 pm    Post subject: Reply to: REXX - to searxh in PDS
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Fri Jul 30, 2010 4:53 pm    Post subject:
Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6967
Location: porcelain throne

PostPosted: Fri Jul 30, 2010 6:13 pm    Post subject:
Reply with quote

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
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
This topic is locked: you cannot edit posts or make replies. Need help on If condition continuatio... ashok_uddaraju CLIST & REXX 4 Fri May 19, 2017 8:55 am
No new posts Running an REXX EXEC implicitly sho7hills CLIST & REXX 3 Thu Apr 20, 2017 8:14 am
No new posts Need help in REXX CALL program Raje1002 CLIST & REXX 5 Wed Apr 19, 2017 11:18 pm
No new posts REXX cdoe to purge a JOB from spool a... Sulabh Agrawal CLIST & REXX 11 Thu Mar 09, 2017 11:36 am
No new posts Overriding PS data in rexx Shaheen Shaik CLIST & REXX 8 Fri Mar 03, 2017 5:08 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us