IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

SRCHFOR with LMDLIST or LMMLIST


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Lynne

New User


Joined: 15 Jan 2015
Posts: 93
Location: USA

PostPosted: Sat Aug 13, 2022 9:57 pm
Reply with quote

is there any way in rexx to pass a list of datasets created by LMDLIST and search keywords to SRCHFOR and have SRCHFOR return a list of datasets that have those search terms?

or do you have to write your own srchall to search the datasets returned by LMDLIST?

just wondering if there is way to not have to reinvent the wheel Especially since the ISPF SRCHFOR does so many nice searches - is such a nice tool.

thanks.
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Sun Aug 14, 2022 1:43 am
Reply with quote

Quote:
is there any way in rexx

I do not think there is an easy way, but this comes to mind...

Build a SRCHFOR job with one step*, that includes all of the data set names as a concatenation for the input DD.

* do in one step, assuming that you do not have a too large list of names.
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Sun Aug 14, 2022 1:54 am
Reply with quote

If you want to keep it all within the same rexx program, you can:
1. issue the ALLOCATE command to set up files needed by the SRCHFOR.
2. Then use the TSO CALL command to call the search for load module.
3. Then use EXECIO command to examine the SRCHFOR output DD file.
Back to top
View user's profile Send private message
Lynne

New User


Joined: 15 Jan 2015
Posts: 93
Location: USA

PostPosted: Sun Aug 14, 2022 2:52 am
Reply with quote

the JCL - I do that all the time. Like I said, great tool.

But I'm creating a panel that creates a subset of a particular type of dataset that we use, depending on the users needs for that type of dataset. I can do that because they create the name from keywords in the job. But I was thinking it would be nice to be able to search the datasets returned for a keyword.

I will have to research the 2nd mething (on how to pass a dataset list to SRCHFOR load module).

Thanks, Pedro.
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Sun Aug 14, 2022 6:43 am
Reply with quote

You should investigate the use of the DSLIST command of ISPF. It is briefly documented in the ISPF User's Guide V1. I recall that it will give you the ISPF 3.4 list of data sets.

And from the DSLIST panel, you can issue SRCHFOR as a primary command. It will search each data set listed and indicate which ones have the search text. The SRCHFOR primary command is documented in the ISPF User's Guide V2.

DSLIST is a primary command, so you have to play a trick to issue it as a command, something like this:
Code:

zcmd = "DSLIST 'my.*.dsn'"
Address ISPEXEC
"CONTROL NONDISPL ENTER"
"DISPLAY PANEL(mypanel)"

Where your panel has ZCMD defined as the primary input field.

DSLIST is a primary command... look at the command table, you might be able to deconstruct how to call it directly from rexx.

(I am retired and cannot verify this code anymore - please let us know if you get it to work. If you need to modify it, please share).
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Sun Aug 14, 2022 7:07 am
Reply with quote

I dunno what else your data set list panel does, but consider using the DSLIST command and then building your app around that. You can create rexx programs that can be called as line commands from DSLIST.
Back to top
View user's profile Send private message
Lynne

New User


Joined: 15 Jan 2015
Posts: 93
Location: USA

PostPosted: Mon Aug 15, 2022 2:38 am
Reply with quote

for this panel, I'm just building a list of datasets from what the users want, and create a DSN with that list of datasets. That DSN will be the input ot a program to analyze the data in these specialized datasets that I have in a JCL SKELS member. then I give the option to the user to either edit the jcl or submit it.

but I was thinking expanding that to give the user the ability to select/run commands on those datasets selected - before returning to the main dialog to create the jcl. I know how to do that. but searching thru all the datasets for a keyword.. A lot of extra work - unless just a simple keyword search. And SRCHFOR is just better at searching.

I will try what you said, good idea. I do something similar in a rexx where I automatically set up multiple swap screens at logon. i use DSLiST to set up most of the screeens.

Thanks, Pedro.. again. icon_smile.gif
Back to top
View user's profile Send private message
Lynne

New User


Joined: 15 Jan 2015
Posts: 93
Location: USA

PostPosted: Mon Aug 15, 2022 2:39 am
Reply with quote

I should share my multiple screen setup rexx.. not that comples.

but it is probably old hat to most of the experienced people here.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts SRCHFOR ‘string’ command inside P... TSO/ISPF 14
No new posts Unable to retrieve Datasets Names usi... CLIST & REXX 20
No new posts ISRSUPC SRCHFOR tool - Query while us... JCL & VSAM 7
No new posts Need help on searching '82 in SRCHFOR TSO/ISPF 6
No new posts SRCHFOR a text in a set of files DFSORT/ICETOOL 7
Search our Forums:

Back to Top