>> On Tue, 18 Nov 2008 15:42:07 +0000, Jim McAlpine 
>> wrote:
>>
>>>Is there any way to achieve the above ie to search for 'abc*xyx' where *
>> can be any length in all members of a pds.

 
If you have SimpList installed there are several ways to do what you want. The 
first is to use the SEEK command to search all of the members displayed in a 
list; e.g. 'SEEK ABC PREFIX ALL' would give you a list of all the members that 
contain ABC as a prefix. You could then enter 'SEEK XYZ SUFFIX ALL' to further 
subset the member list. The resulting list would only display those members 
that contain both strings. From there you could run more SEEK (or HIDE) 
commands to further limit which members appear in the list.
 
A second option is to create an edit macro that searches for (or changes) the 
strings you're interested in. You can easily apply a macro to some or all of 
the members in a list by simply selecting member(s) using function 'O' (macrO). 
For example, you could apply a macro to every member that begins with 'PGM' by 
simply entering 'O PGM*' on the member list command line. Note that by using a 
macro you have more control, and could ensure 'ABC' and 'XYZ' are part of the 
same string. 
 
A third option is to write a user-defined function (which is similar to a macro 
except that it doesn't have to open members for edit). For example, your 
function could use EXECIO to read a member (whose name would be passed to it by 
SimpList), and determine if the member contains the string(s) you're looking 
for. If so, it could VPUT a variable that tells SimpList what value you want to 
appear in the user-data area (i.e. the 8 character field that appears just 
after each name in a member list). For example, you could set the value to 
'FOUND' or 'FOUND-3' or 'RC=0' (etc). If the member doesn't contain what you're 
looking for, you could optionally VPUT a value that tells SimpList what line 
command to use to reselect the member; e.g. where line command 'X' would cause 
the member to be eXcluded from the list. To execute your user-defined function 
(e.g. function '1'), you would simply enter '1 pattern' on any member list 
command line; e.g. '1 *' would apply your function to every member in a list. 
What you would then see is a list containing only those members that met your 
selection criteria (with the user-data area set to whatever value you want to 
appear next to each member), and all of the other members would be excluded 
from the list.
 
HTH,   

Dave Salt

SimpList(tm) - try it; you'll get it!   
http://www.mackinney.com/products/SIM/simplist.htm   
_________________________________________________________________

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to