Re: Searchfor a string in 2 or 3 pds in rexx
Posted: Fri Aug 02, 2019 1:44 am
if you really insist on asking for datasets, then something like this could be used, as NicC suggested instead of running the REXX multiple times:
member = 'IHASDWA'
fds=''
do until fds<>''
say 'Enter libname'
pull ds
if ds='X' then exit 0
if sysdsn("'"ds"("member")'")='OK' then fds=ds
say member 'not found in' ds
iterate
end
say member 'is in' fds
fds=''
do until fds<>''
say 'Enter libname'
pull ds
if ds='X' then exit 0
if sysdsn("'"ds"("member")'")='OK' then fds=ds
say member 'not found in' ds
iterate
end
say member 'is in' fds