Interesting, I haven't worked with the DEFINE .. ALIAS before.
It worked, like so:
address ispexec "VIEW DATASET('my.dataset') macro(afind1)"
AFIND1:
/* alternate FIND - redefine F and FIND commands rexx */
Address Isredit "MACRO PROCESS"
Address ISREDIT "Define F alias AFIND2"
Address ISREDIT "Define FIND alias AFIND2"
AFIND2:
/* alternate FIND - perform the FIND and proces the line rexx */
Address Isredit "MACRO PROCESS (WHAT)"
Address Isredit
"(ds)=dataset"
"(mb)=member "
"SEEK '"what"'"
if rc=0 then do
"(p) = linenum .zcsr"
"(l) = line (p)"
say 'text='strip(l,'t')
end
Note the use of SEEK instead of FIND as FIND will send AFIND2 into a recursive spin.
AFIND2 just does a SAY, but you can do whatever you need there like VPUT, add to an ISPF table, write to a dataset....
@Jeff R, what do you need the ZTITLE for? datasetname and membername are in EDIT variables DATASET and MEMBER respectively.