/**********************************************************************/
/* FUNCTION : THIS program searches for the required member in all */
/* the catalouged partitioned datasets */
/* WRITTEN BY GOPINATHAN BALASUBRAMANIAN ON 04/03/2003 */
/**********************************************************************/
trace off
say "Enter the member to search"
pull membername
say " "
say " "
say "The result of search operation for" membername "member"
i=outtrap("inprec.")
"listc"
no = 0
do k=2 to inprec.0
memrec. = " "
dataset = substr(inprec.k, index(inprec.k,'.')+1)
i=outtrap("memrec.")
"listds" dataset "members"
if word(memrec.3,4) = 'PO' then
do
EXTRACT = 0
DO I=1 TO memREC.0
IF memREC.I = "--MEMBERS--"
THEN EXTRACT = 1;
ELSE
DO
IF memrec.I = "READY" THEN
EXTRACT = 0
eLSE
NOP
END
IF EXTRACT = 1 & memREC.I \= "--MEMBERS--" THEN
do
TEMPNAME = SUBSTR(MEMREC.I, 3,8)
TEMPNAME = STRIP(TEMPNAME)
if index(TEMPNAME,membername) \=0 then
do
say "Found in the PDS " inprec.k "Member name :" tempname
no = no + 1
end
else
nop
end
ELSE
NOP
END
end
else
nop
end
if no > 1 then
say no "members found"
else
say membername "not found"
/**********************************************************************/
/********************END OF THE REXX PRGRAM****************************/
/**********************************************************************/
Back to Index