I'm still reeling from the recent realization that my ISPF skills are stuck in the dark ages (1980's) but this post went all day without being replied to, so I'll take this to work and run a few tests before saying anything other than that the RC value is set to the value of the previous statement's completion code. Didn't see the RC being set in the 2nd example.
Also, I can't tell what input values are changing within the DO loop. --- On Wed, 2/9/11, karolf Gazeta.pl <[email protected]> wrote: > From: karolf Gazeta.pl <[email protected]> > Subject: REXX + DB2 question > To: [email protected] > Date: Wednesday, February 9, 2011, 4:07 AM > 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 > ____________________________________________________________________________________ Looking for earth-friendly autos? Browse Top Cars by "Green Rating" at Yahoo! Autos' Green Center. http://autos.yahoo.com/green_center/ ---------------------------------------------------------------------- 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

