Can we find specific member without knowing the name of PDS
or can we search a member to which PDS it belongs to? if so how?
Answer Posted / shekar
If the member is in one of the allocated datasets, then the
following REXX would help you:
/* REXX COMMAND TO search the member in the allocated
dataset */
arg
mem
mem = strip
(mem)
say ' '
if (mem = '' | mem = ' ')
then
do
say 'please give the member to be searched as
argument'
exit
end
/*trace
I*/
call on
error
ADDRESS ISPEXEC "CONTROL ERRORS
RETURN"
call
outtrap "LINE."
ADDRESS
TSO "LISTALC"
call
outtrap "OFF"
say mem
N = line.0
a = 0
ADDRESS TSOEXEC
do I = 1 to N
dataset = line.i
fullds = "'"dataset"("MEM")'"
foundmem = SYSDSN(fullds)
if foundmem = 'OK' then
do
a = a + 1
say '"'MEM'" is found in "'dataset'"'
end
end
if a = 0
then
say '"'MEM'" is not found in list of allocated
datasets'
exit
error:
zerrsm = "Return code"
rc
zerrlm = "Return code from command is"
rc
zerralrm
= "YES"
zerrhm
= "*"
address ispexec "SETMSG MSG
(ISRZ002)"
return
| Is This Answer Correct ? | 0 Yes | 2 No |
Post New Answer View All Answers
how JCL works?
If a (+1) generation dataset is created in the first step of a job, how can it be referenced in later steps of the same job for input?
How to remove the spaces at end of each record in the output file Via COBOL program? note: The file has a VB length ----TRY
what is a jcl?
In job processing, what happens in conversion stage?
Explain the function of the steplib dd statement?
what is the compile process of cobol program expalin with code
Explain dd statement in jcl?
What is the function of the steplib dd statement?
Name the parameters which can be used to limit the number of records written to a sysout dataset?
How to alter the parameters for the existing gdg?
what is “Cond= even” and “Cond=only”?
Is it possible to left uncode disp?
IIN APITUDE THEY GAVE ONLY 10 QUESTIONS.. THEY ARE SIMPLE ONE FROM NUMBER SERIES,BOATS,TIME & DISTANCE,PROFIT &LOSS,FIND OUT THE NUMBER ? 9 25 4 36 81 64 49 AND surveillance SPELLINGS E.T.C
What are hierarchy levels in jcl?