Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Searching for a string in dataset without actually opening it.

Status
Not open for further replies.

aarthyarun

Technical User
Sep 25, 2006
12
IN
I have a requirement of searching for a specific string in list of JCLs (say 20,000). This i have done by using the ISPF commands in REXX (I have used ISPEXEC and ISREDIT). But it is taking more time,nearly 2 hours.

I want to know is it possible to search for a particular string in a dataset without actually opening the dataset.

My REXX is running for 2 hours mainly because i am opening and closing 20,000 datasets. How to avoid this?

From some people i came to know that there is a way to actually search for a string in a dataset without actually opening the dataset using ISPEXEC VIEW command.

Please help me in this regard. It is a very urgent requirement for me. I will be very thankful.

Thanks in advance
 

You may be able to shorten the path by using LM facilities. See the ISPF Services manual. Warning: this isn't going to be easy.

If you have StarTool available, its very-high-efficiency routines may run faster than whatever you're using

It is not possible to search a dataset/member without opening it.

Frank Clarke
Tampa Area REXX Programmers' Alliance
REXX Language Assn Listmaster
 
I have the following doubts from your reply? Please forgive me if i am wrong or silly, because i am novice in REXX.

My doubts are,

1. What is meant by LM facilities?
2. Where can i find the ISPF services manual?
3. What is StarTool? Where can i get it?

Then I got a spark and got a idea. I dont know whether it will work in a very short span of time.

My clarification is -

Can i do Outtrap of a dataset and get all the line of a dataset in an array and search for a string in the
respective array.
Will this process also takes equivalent time of opening a dataset or this process will be much more faster.

Please help me in this regard.

 
Have you considered running ISRSUPC in batch? Not sure if it will give much improvement but it may give you some other options. (Like doing 100 datasets within a job and running several jobs in parallel)
 
If it were me, I would flatten the PDS (I presume we're talking PDS here) into a single sequential dataset (TSO PRINTDS or the IEBPTPCH utility) so my searches would be within a single dataset (maybe it could even be read entirely into a stem variable).
 
Through Net, I got that there is a utility called SCANPDS which performs the process I want. But I am not clear about the SCANPDS utility.

If you know what is this utility and what it performs, can you explain me.
 
I think you will find that SCANPDS is simply a program that will open each memeber and search for the string within them. Not sure about how effective it is and how many PDSes you can scan at a time. I am not even sure if it has PDS/E support in it. The version I have doesn't but it is pretty old.

IPOUDTE will do what you want to with the added benefit of being able to replace the search string. IPOUPDTE usually comes with the operating system but may be named CPPUPDTE depending on the version of the OS you have installed.

Unless you zap the program you will need a memeber named $$$COIBM in the dataset being scanned, however if you need the zap that negates the need for this I will gladly provide it.

 
Hai,

Thanks to everyone.

I have got the solution. I am using ISRSUPC as Kevinf2349 said. It is working properly.

Thanks again to all
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top