Page 2 of 2

Re: member of a master librarian

PostPosted: Sun Mar 11, 2012 12:35 am
by jospa
hi robert, i think that you dont understand what i want. i dont need to know the content of the member i just want to know if it exists or not. i have tried this:
SET &MASTER = TTTSL.PROD.COBOL
SET &ARCHIVO = ARCC2
SUBMIT * END($$)
//TTSJOP25 JOB (1,1),'ELIPSTES',
// MSGCLASS=X,CLASS=S,
// REGION=3072K
//STEP110 EXEC PGM=AFOLIBR,PARM='NRJS,NJTA'
//SYSPRINT DD SYSOUT=*
//OSJOB DD DUMMY
//MASTER DD DSN=&MASTER,DISP=SHR
//SYSIN DD *
-SEL &ARCHIVO,PERM
-END
//
$$
in the sdfd output display i can see this:
PROCSTEP RC
STEP110 12
the return code (12) indicates to me that the member does not exist, so i need to trap it, assign a value to a variable according to that return code and continue the execution of the clist. In other words, i have to wait for the finished job, check the return code , assign a value and continue de execution of the clist.
i hope to be clear now.

best regards

Re: member of a master librarian

PostPosted: Sun Mar 11, 2012 12:50 am
by enrico-sorichetti
how long does the batch job run ???
if it fast enough You can run everything from Your CLIST/REXX
allocate the needed datasets, build the control cards
and , now You will have to find out Yourself how to call the librarian
Address LINKMVS, Address LINKPGM, read the manual

here is a link to a working snippet I posted to call ICETOOL

the program is different but the logic is the same

http://ibmmainframes.com/about57579.html

Re: member of a master librarian

PostPosted: Mon Mar 12, 2012 6:42 pm
by jospa
hi enrico-sorichetti, thank for reply.
the job runs in about 2 seconds more or less
i don't need to allocate any set of data, the job showed above works perfectly, I just want to take the return code of the job and continue the execution of the clist.

best regards

Re: member of a master librarian

PostPosted: Mon Mar 12, 2012 7:13 pm
by enrico-sorichetti
if in batch You have DDs You must ALLOCate them in TSO
to make the <files> available to Your program

in batch
//        EXEC PGM=pgmname
//DD1       DD ...
//DD2       DD ...
//DD3       DD ...
//DD4       DD ...
//DD5       DD ...
//DD6       DD ...

in a Rexx script
Address TSO " ALLOC FI(DD1) ......"
Address TSO " ALLOC FI(DD2) ......"
Address TSO " ALLOC FI(DD3) ......"
Address TSO " ALLOC FI(DD4) ......"
Address TSO " ALLOC FI(DD5) ......"
Address TSO " ALLOC FI(DD6) ......"
Address XXXXXXX pgmname
/*
-- ... You can find all about the different XXXXXXX(*) flavors in the manual
-- (*) the environments used to <execute> aprogram
*/
if RC = ....

after that the RC variable will contain the return code
( the same one that You test in the JCl )

Re: member of a master librarian

PostPosted: Mon Mar 12, 2012 9:26 pm
by jospa
thanks enrico, could you explain in terms of clist considering my snippet code 3 posts above

best regards

Re: member of a master librarian

PostPosted: Mon Mar 12, 2012 10:02 pm
by enrico-sorichetti
unfortunately the chances of getting help on CLIST are pretty slim!
but why CLIST?... system interfaces in REXX are very superior!

Re: member of a master librarian

PostPosted: Mon Mar 12, 2012 10:34 pm
by jospa
because I'm making a program adaptive maintenance in clist. it's a pity but I will continue waiting to see if someone helps me finding the answer

best regards and thank yuu for your time

Re: member of a master librarian

PostPosted: Mon Mar 12, 2012 10:59 pm
by enrico-sorichetti
it's a pity but I will continue waiting to see if someone helps me finding the answer

do not count on the job being done then

You should be aware that replying on a forum is
on voluntary base
free of charge
interest of the topic
...

and sincerely CLISTs topics are pretty low in the preference/interest ranking
and people are unlikely to spend any time on them

the info I gave You should anyway be enough to give it a try ...
look at the manual, learn the syntax of alloc when used in a clist
learn how to use the CALL statement to call a program
does not seem too complicated to me
the RC is still there

Re: member of a master librarian

PostPosted: Tue Mar 13, 2012 12:53 am
by BillyBoyo
enrico's right. I've not seen a CLIST question answered in more than a year. Not many asked, but none answered.

If you need to get on with it, take enrico's good advice. If you have all the time in the world, you are free to wait... it might take that long, though...