MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Search problem

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
neoframer
Beginner


Joined: 28 Jun 2003
Posts: 10
Topics: 6

PostPosted: Fri Aug 08, 2003 9:24 pm    Post subject: Search problem Reply with quote

I am using ISRUPC search program for searching a test string in one PDS :

//SEARCH EXEC PGM=ISRSUPC,
// PARM=(SRCHCMP,ANYC)
//NEWDD DD DSN=TSOID.DATASET1,DISP=SHR
//OUTDD DD DSN=TSOID.SRCH,DISP=OLD
//SYSIN DD *
SRCHFOR 'TEXT1'
//*

Now what I want to do is that , if TEXT1 is found in any of the members of DATASET1 then write the name of those members of DATASET1 in one file (any sequential dataset) and if TEXT1 is not found in DATASET1 then write TEXT1 in another file. How can this be done ?
Back to top
View user's profile Send private message
mayuresh.tendulkar
Beginner


Joined: 25 Apr 2003
Posts: 31
Topics: 6
Location: Pune

PostPosted: Sat Aug 09, 2003 3:06 am    Post subject: Reply with quote

Hello neoframer,

Below is the link posted by kolusu,

http://www.mvsforums.com/helpboards/viewtopic.php?t=1032&highlight=isrsupc

At this link he has showed how to write the pds member names to the output file.

Follow his procedure upto step 2 (sorting of the member names)

Do the following to get the results: (solution may be a lengthy one.)

1) Write all the pds member names in one file, sort it on name
2) Follow Kolusu's procedure upto step 2.
Quote:

Now you have 2 datasets.
1) One with the string TEXT1 and
2) The other is the full PDS listing.

4) now write an easytrieve so that the unmatched records are written to the other file.

Easytrieve code will be a simple one.

Code:

If matched file-name
   continue
else
  put outfile
end-if

Let me know if this helps.


Regards

Mayuresh Tendulkar
Laughing
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group