A new command called FEX (Find EXpression) is being introduced in the next 
version of SimpList. It uses the same syntax as the regular ISPF find command, 
but enhances it with a couple of the concepts used in regular expressions. 

 

A beta test version has just been released and a few positions are left for 
anyone who wants to try it. Those who take part in the beta test get to keep 
the FEX command, even after the SimpList trial has expired. If you think you 
might be interested in using FEX then please read on.
 
FEX can be used when editing or viewing data sets, members, Unix files, and 
PC/workstation files. It's very similar to finding picture strings, and uses 
all of the same metacharacters and optional parameters that can be used when 
finding picture strings (e.g. column range, label range, FIRST/NEXT/LAST, 
WORD/PREFIX/SUFFIX, X/NX, etc). The intention is to keep the same syntax that's 
already familiar to ISPF users, but enhance it with some of the concepts used 
in regular expressions.
 
In regular ISPF, metacharacters can be used in picture strings to represent a 
type of character rather than an actual literal character. For example, '#' 
represents any number, '$' represents any non-alphanumeric character, '.' 
represents any non-displayable character, and so on. The following example 
shows a regular ISPF find command being used to find any 3 consecutive numbers 
such as '123' or '591' (etc):
 
FIND P'###'
 
The equivalent FEX command would be:
 
FEX ###
 
With the FEX command the leading 'P' is not required because all of the 
characters in the string are assumed to be picture string characters (unless 
enclosed in brackets, as explained in a moment). Quotes are optional unless the 
string contains spaces.
 
One of the concepts taken from regular expressions is the ability to use square 
brackets to indicate that any ONE of the characters between the brackets must 
match EXACTLY. A hyphen can be used between the brackets to indicate a range of 
characters. For example:

 

FEX [a-g] <--- Finds any lowercase character between 'a' and 'g'

 

FEX [0-46-9] <--- Finds any number except for 5
 
FEX gr[ae]y <--- Finds 'gray' or 'grey'


FEX [R]ose <--- Finds Rose, ROse, ROSe, ROSE, RoSE (etc) but not 'rose'


FEX b[a-e] <--- Finds ba, bb, bc, bd, be, Ba, Bb (etc)


FEX [B][a-e] <--- Finds Ba, Bb, Bc, Bd, or Be, but not 'ba' or 'bb' (etc)


FEX [aeiou] ALL <--- Counts the number of lowercase vowels in the file


FEX ' [0-5] ' <--- Finds any single digit number between 0 and 5


FEX [$]###[.]## <--- Finds any dollar amount from $100.00 to $999.99
 
Some of these examples show that strings can be found using combinations of 
case-sensitive AND non-case-sensitive characters. For example, the 'R' in 
'Rose' has to be uppercase (because it's entered in brackets and therefore has 
to match EXACTLY), whereas the remaining characters are not case sensitive. In 
the last example, the '#' is not enclosed in brackets and therefore acts as a 
picture string, while the '$' and '.' are enclosed in brackets and therefore do 
NOT act as picture strings. This greatly enhances the usefulness of picture 
strings, as picture string characters can now be used both as metacharacters 
and as literals.
 
FEX also supports the use of asterisks as wild-cards, where a single asterisk 
indicates any number of characters (including zero) may appear between two or 
more strings. For example:
 
FEX var1*var2 <--- Would find: "VAR1 = VAR3 - VAR2 + VAR4"


FEX dog*cat*rat <--- Would find: "The dog chased the cat which chased the rat"


FEX 2[*]# <--- Finds 'Two times any number'; e.g. 2*6
 
In the third example the asterisk is enclosed in brackets so it's treated as a 
literal instead of a metacharacter; i.e. only the last character (the number 
sign) is treated as a metacharacter.
 
If you'd like to give the FEX command a try then please let me know. You'll be 
sent 5 XMI files as email attachments (i.e. panels, messages, skeletons, 
tables, and REXX). You upload the 5 files to 5 temporary sequential data sets 
on your mainframe and run a supplied JCL job that unloads the sequential data 
sets into 5 partitioned data sets. You add these libraries to the allocations 
performed by your logon CLIST, and you're done. There is nothing to compile, 
link, authorize (etc), so it's extremely easy to install and can usually be 
done in a matter of minutes. Detailed instructions are supplied.
 
As a beta tester you get 90 days to try it instead of the usual 30 days. At the 
end of the 90 days no-one contacts you or tries to sell you anything. You get 
to keep the FEX command at no cost; i.e. you can continue using it even after 
the SimpList trial license has expired so there's nothing to lose. 

 
The number of beta testers required is limited, so if you're interested then 
please contact me off-list as soon as possible.
 
Thanks,
 
Dave Salt

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



                                          
_________________________________________________________________
New! Faster Messenger access on the new MSN homepage
http://go.microsoft.com/?linkid=9677406
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to