View previous topic :: View next topic |
Author |
Message |
chandra_vssv Beginner

Joined: 08 May 2005 Posts: 26 Topics: 12 Location: pune
|
Posted: Thu Dec 10, 2009 2:03 am Post subject: help to search multiple strings in multiple datasets in REXX |
|
|
Hi,
Its been longtime looking at this forum , i was away from coding for almost 3yrs.
. I learned manythings from this forum , really one should appreciate all the efforts of people who are contributing thier knowledge and time in this form.
I do not know Rexx but while going through this form i thought i can get some thing that will help me in searching multiple strings in multiple data sets. I used superc in batch to check for multiple strings in multiple datasets at a time but it is difficult to tarce which string is in which dataset. Afer going through this forum , I found this can be acheived in Rexx. I have stored all the account numbers in a PS file and all the dataset names to be searched in another PS file . I have to search all the a/c numbers in each file and should note down which data set is having what account numbers. can any one help he getting REXX code for that.
There are sveral account numbers that has to be searched in several files.
File A :
123
345
678
134
File B: contains names of files to be searched
ABC.File1
ABC.File2
XYZ.File3
o/p: should contain
123 in ABC.File1
345, 678 in ABC.File2
like that..... _________________ Regards,
Chandu |
|
Back to top |
|
 |
expat Intermediate

Joined: 01 Mar 2007 Posts: 475 Topics: 9 Location: Welsh Wales
|
Posted: Thu Dec 10, 2009 2:11 am Post subject: |
|
|
I think that REXX as the search program is the wrong way to do this.
Run the search against each of the datasets and parse the output from SUPERC with REXX to get the result. Using SUPERC instead of REXX will be much faster and efficient. _________________ If it's true that we are here to help others,
then what exactly are the others here for ? |
|
Back to top |
|
 |
dbzTHEdinosauer Supermod
Joined: 20 Oct 2006 Posts: 1411 Topics: 26 Location: germany
|
Posted: Thu Dec 10, 2009 8:16 am Post subject: |
|
|
not only that, batch superc will tell you which ds in the concatenation (uses (n) where n = concatenation number).
you have not bothered to learn how to use superc properly in batch.
you can always manipulate the superc output and interchange the dsn with the (?). _________________ Dick Brenholtz
American living in Varel, Germany |
|
Back to top |
|
 |
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Thu Dec 10, 2009 11:58 am Post subject: |
|
|
Best of both worlds... Use Rexx to read FileB to get the dsnames, allocate the SuperC ddnames using that data and call ISRSUPC then read the output file. No need for batch. Use ISPF to generate the batch JCL used for a search, and convert that to rexx. For what it is worth, that is more or less what the SRCHFOR options in memberlists and data set lists do, though they may call ISRSUPC once for each data set and, of course, it isn't Rexx. Same idea though. _________________ New members are encouraged to read the How To Ask Questions The Smart Way FAQ at http://www.catb.org/~esr/faqs/smart-questions.html. |
|
Back to top |
|
 |
chandra_vssv Beginner

Joined: 08 May 2005 Posts: 26 Topics: 12 Location: pune
|
Posted: Fri Dec 11, 2009 1:27 am Post subject: hello All |
|
|
Thanks for all your suggestions, i actually do not have time to check for options.Something i need it urgently, atlast i got REXX code from online which was actually searching a string in a dataset.I took the help of my friend and did it in REXX only. No SUPERC used. Just 100 lines of REXX code helped me searching 100 accounts from 80 files with desired results.
This code will helpful for many people i believe who really in need of searching multiple strings in multiple files.
o/p with :
STRING-NAME FILE NAME ROW COLUMN _________________ Regards,
Chandu |
|
Back to top |
|
 |
|
|