Peter, As you took the ball, I answer to you (but it applies to Tony as well).
>> I can't speak to the CICS questions, but for case (2) I don't think >> you have any choice but to create an LE environment. Same is true for CICS - but in CICS you have the luxury to hold a task (with a set up LE environment) for the rest of time. If you want to terminate it with transaction-end - you could use a TRUE to capture normal (or abnormal) end. >> ... storing the created environment pointer in whatever VSE has as the >> equivalent of >> name/token services for reentrant retrieval on subsequent calls. Same in z/VSE and this interface is in fact bit compatible (code compiled in z/VSE will run in z/OS - a good way, that IBM has left in the CICS-arena 12 years ago) >> Use CEEPIPI or the VSE equivalent, in other words, and save the >> environment for subsequent calls. CEEPIPI is the same. >> Properly terminating the created LE environment before the main >> program returns to the OS is the problem. For batch one could use a PRODEXIT that could be defined to get control at step-termination. That is way superior to any "clever" method..... And no Chuck, I am not going to name my pet-peeve. -- Martin Pi_cap_CPU - all you ever need around MWLC/SCRT/CMT in z/VSE more at http://www.picapcpu.de