Event code 17 — process initialization event

Purpose

Perform language-specific process initialization. This event is driven during preinitialization for main routines when the environment is being brought up during an INIT request. Application-specific initialization is left until a main routine is about to be called at a CALL request (see Event code 18 — enclave initialization event). The members that are called with this event code are found by looking into the load modules that are passed in the PIPI table.

When library reuse is active, the specified reuse_state value indicates if this is the first process event call to a given member during the current reuse environment. In the reuse environment, Language Environment does not free the initial storage allocated for Language Environment control blocks or delete Language Environment modules or member event handlers between invocations of Language Environment-enabled programs. Library reuse will be active if a program uses LRR (Library Retention Routine) or if it is a medium-weight POSIX process.

At termination, all resources obtained through the service routine vector during process initialization must be released explicitly. Language Environment does not implicitly release any resource obtained during the process initialization event.

A combination of Event 17 and Event 18 should initialize the HLL-specific aspects of the environment for a given application. The counterpart for this event is Event 21.

Syntax

Call CEEEVnnn (17, reuse_state)
INT     *reuse_state;
reuse_state (input)
One of the following codes, which indicate if library reuse is active and if this is the first time in the current reuse environment that the event handler is called for process initialization.
0
Reuse is not in effect.
1
Reuse is in effect; this is the first call for process initialization.
2
Reuse is in effect; this is not the first call for process initialization.
Upon entry into the member event handler, the following is available:
  • R13 points to a DSA into which the event handler is able to store its caller's registers.
  • R12 is pointing to a simulated CAA allowing stack frame acquisition.
  • A fixed size stack is available for use by the HLLs when called for process initialization. The stack size is 1024 bytes. There is no stack overflow support.
  • The simulated CAA has a pointer to the PCB. The simulated CAA has a zero pointer to the EDB.
  • R1 contains the address of a standard O/S style PLIST with a single parameter of Event Code 17.
  • The addresses of LOAD and DELETE services and GETMAIN/FREEMAIN services are held in the PCB. It is the caller's responsibility to relinquish resources obtained at the process level.
  • The format of the member list at the process level is of the same format as the member list at the enclave level.

Usage notes

  • This event is called in both CICS® and non-CICS environments.
  • This event is called at most once during the execution of a CICS transaction. Member languages should initialize for the transaction during this call.
  • This event is always called before enclave initialization for a member language. However, enclave initialization for other languages can precede process initialization for a language, if a subordinate enclave introduces a new language into the process.
  • CICS SPF: Language Environment calls languages in key 8 for this event. Storage for parameters can be in key 8.