member of a master librarian



IBM's Command List programming language & Restructured Extended Executor

Re: member of a master librarian

Postby jospa » Sun Mar 11, 2012 12:35 am

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
jospa
 
Posts: 9
Joined: Mon Feb 27, 2012 8:27 pm
Has thanked: 0 time
Been thanked: 1 time

Re: member of a master librarian

Postby enrico-sorichetti » Sun Mar 11, 2012 12:50 am

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
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2994
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Re: member of a master librarian

Postby jospa » Mon Mar 12, 2012 6:42 pm

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
jospa
 
Posts: 9
Joined: Mon Feb 27, 2012 8:27 pm
Has thanked: 0 time
Been thanked: 1 time

Re: member of a master librarian

Postby enrico-sorichetti » Mon Mar 12, 2012 7:13 pm

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 )
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2994
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Re: member of a master librarian

Postby jospa » Mon Mar 12, 2012 9:26 pm

thanks enrico, could you explain in terms of clist considering my snippet code 3 posts above

best regards
jospa
 
Posts: 9
Joined: Mon Feb 27, 2012 8:27 pm
Has thanked: 0 time
Been thanked: 1 time

Re: member of a master librarian

Postby enrico-sorichetti » Mon Mar 12, 2012 10:02 pm

unfortunately the chances of getting help on CLIST are pretty slim!
but why CLIST?... system interfaces in REXX are very superior!
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2994
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Re: member of a master librarian

Postby jospa » Mon Mar 12, 2012 10:34 pm

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
jospa
 
Posts: 9
Joined: Mon Feb 27, 2012 8:27 pm
Has thanked: 0 time
Been thanked: 1 time

Re: member of a master librarian

Postby enrico-sorichetti » Mon Mar 12, 2012 10:59 pm

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
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2994
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Re: member of a master librarian

Postby BillyBoyo » Tue Mar 13, 2012 12:53 am

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...
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Previous

Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post