On Fri, Nov 19, 2010 at 7:03 PM, Ken Moore <[email protected]> wrote:
> I must be reading the wrong books or something. I'm trying to find a way > to > ATTACH a TCB and then reuse that TCB several times (to run the same > program) and then detach it when I'm done with it. I need to keep it > around > because I'm doing CICS EXCI calls under the attached TCB but I lose the > EXCI > pipe and user environment if I can't reuse the TCB. I'm feeling a bit > retarded > at this point. There has to be a way, as CICS uses pooled TCBs all the > time. > > Ken ... you may want to consider an alternative way to accomplish what I think you are looking for. Consider using some type of synchronization mechanism (ECB, etc.) and a control flag passes as one of the parms to your attached program. When the attached program completes the work, it WAITs on the ECB. Your main program POSTs the ECB to run the attached program again. This can be repeated as often as needed by your main program. Just after the WAIT in the attached program, place a small amount of code to check the control flag. The control flags (set by the main program) tells the attached program to: 1) perform 'business' function again and WAIT on the ECB; 2) exit. You can of course add more control functions as needed to meet your requirements. For example, the attached program can be a shell of a driver that LINKs other sub-programs based on the function code, etc. With logic similar to this, you can keep the attached program and the related EXCI pipe, etc. around as long as required. Cheers, Sam > Ken Moore > > ---------------------------------------------------------------------- > 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 > ---------------------------------------------------------------------- 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

