Hi!
I have a Rexx script where I run DB2 applications by DSN+CALL commands:
ret_codes.=''
do i=1 to ....
.....
q1 = " RUN PROGRAM("pgmname") PLAN("planname") "
q2 = " PARM('"parm_txt"')"
queue (q1)(q2)
queue " END "
"DSN SYSTEM(DB2X)"
ret_codes.pgm.i=pgmname
ret_codes.plan.i=planname
ret_codes.retcode.i=RC
'DELSTACK'
end
The above solution is bad from performance's point of view.
Best solution would be to build the stack and then run DSN command only
once:
do i=1 to ....
.....
q1 = " RUN PROGRAM("pgmname") PLAN("planname") "
q2 = " PARM('"parm_txt"')"
queue (q1)(q2)
end
queue " END "
"DSN SYSTEM(DB2X)"
'DELSTACK'
The thread will be created only once. But there is one difficulty. I don't
know how to take over return codes of all
running programs (but the last).
Anybody knows the solution? (or address where TSO saves RC after running
CALL program).
regards
Karol Filipowicz
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html