Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

How to compare two files in SYNCSORT and on the mismatch record should be deleted from second file.

5544


What is the function of //jcllib statement?

1322


What is the function of dd name parameter with a 2 part structure; audit.report?

1251


in order to execute step2 a job after a return code of 8 in step1, what condition you will code in step2?

2717


Which dd parameters are required?

1195


What do you understand by the terms: joblib and steplib?

1180


Where can program checkpoints be stored for use in a restart?

1443


How to alter the parameters for the existing gdg?

1206


What are the parameter we cannot use in procedure?

1140


what is DSN in JCL and what are the parameters to declare the DSN?

1202


How do you submit a job for execution?

1114


What is the motivation behind coding class parameter in job statement?

1188


Explain the function of dd name parameter with a 2 part structure; audit.report?

1461


What statement marks the beginning of a job step; assigns a name to the step; identifies the program or catalogued or in-stream procedure to be executed in the step?

1109


what are the statements that are not valid to be included in an include statement?

1393