Tony, 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. If you discover that you are in case (2), I would suggest setting up the LE environment the first time you need it, and storing the created environment pointer in whatever VSE has as the equivalent of name/token services for reentrant retrieval on subsequent calls. Use CEEPIPI or the VSE equivalent, in other words, and save the environment for subsequent calls.
Properly terminating the created LE environment before the main program returns to the OS is the problem. There are always "clever" ways to try to accomplish this, e.g., by replacing the R14 value in the highest-level savearea so that your "exit" routine gets control on "normal" program termination, but IIRC many batch VSE programs end with an EOJ macro, which also IIRC is an SVC. Unexpected abends and other error-type exits from the batch process are also a potential problem. That's a tough nut to crack. If your API has an "end of communications" call defined, maybe that's the place to destroy the created environment, and eschew the "clever" solutions. If a caller re-establishes communications, they'll just have to suffer the cost of the re-establishment of the LE environment. Cost of doing business that way. HTH Peter -----Original Message----- From: IBM Mainframe Assembler List [mailto:ASSEMBLER-LIST@LISTSERV.UGA.EDU] On Behalf Of Tony Thigpen Sent: Tuesday, May 10, 2011 7:54 PM To: ASSEMBLER-LIST@LISTSERV.UGA.EDU Subject: LE and Assembler This is on z/VSE, but the LE environment on z/VSE is very close to the LE environment on z/OS so it should not matter. Here is the situation. I author of the IPv6/VSE APIs. When an IP program calls EZASOKET or uses the EZASMI macro or use any of the LE IP functions, my code is all in "LE compatable assembler". (The code is not LE-enabled nor does it use the LE stack, but it does respect R12.) Everything has been working for over 10 years, but now I have a new situation. I now need, under some conditions, to call an IBM system service that is written using LE. Known constants: 1) I can not require that the caller be LE-enabled. (I know of several vendor and customer written applications that are written in non-LE assembler.) 2) Performance is critical so I can not create and destroy the LE environment every call. 3) I don't want a 'separate version' of each interface program for either LE or non-LE environments 4) IBM does not plan on providing the system service without LE in the near future. (Maybe later, but not right now.) Known environments: 1) Batch with an LE environment already established 2) Batch without an LE environment established. 3) CICS called from the normal application domain 4) CICS called from the socket domain 5) CICS called from the VSAM interface 6) CICS called from the PLT (is LE available?) I am looking for any thoughts or suggestions. -- This message and any attachments are intended only for the use of the addressee and may contain information that is privileged and confidential. If the reader of the message is not the intended recipient or an authorized representative of the intended recipient, you are hereby notified that any dissemination of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail and delete the message and any attachments from your system.