One time exit initialization code

Some exits want to perform initialization code the first time they are called, for example loading a service module or building a table needed for processing. However, if this is a user environment exit, it is not running in the JES2 address space and is not main task serialized. Without some special serialization (such as an ENQ), it is possible that the code is actually being run simultaneously by two exit invocations. Also, if a data area is being obtained or a module is being loaded, it is possible that the storage is freed when the current address space terminates.

It is easiest to place any one time initialization logic in the post initialization exit 24. If data addresses need to be passed to other exits, either a $CUCT (an area pointed to by CCTCUCT in the $HCCT) can be used for a data address or a $UCADDR (an area pointed to by CCTUCADD and used by $CALL) can be used for a routine address. Another option is to use a named token. $TOKENSR provides a JES2 interface to the MVS™ Name/Token service. You can use tokens to store data that is needed at some later point in processing.