Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 17 Multiple-Session Execution Environments in Batch : STARTEE Call

STARTEE Call
Behavior of STARTEE
The first time a STARTEE call is executed, the Execution Environment is started in the same address space as your client program. An internal counter, EECNT, is set to one. You can use the ninth parameter to supply the Execution Environment with the address of your user-written environmental wait routine.
Subsequent STARTEE calls cause the first parameter, HRNHLLWA, to be updated with internal information established by the first STARTEE call. The internal counter EECNT is incremented by one.
Storage of the User Routine Address
It is important to note that only on the first STARTEE call is the address of the environmental wait routine stored in the Execution Environment. Subsequent calls to STARTEE to locate the Execution Environment with this ninth parameter return only the contents of the HRNXDUSR field with the value it was set to on the initial STARTEE call. It is not necessary for your user application programs (client programs) to supply this optional ninth parameter.
Behavior in the Sample Programs
In the sample programs provided with TIBCO Object Service Broker, the initial STARTEE call is performed from a startup transaction program. Refer to Sample Programs for a description of these sample programs.
Assembler Example
The following excerpt of assembler code illustrates the STARTEE call, with some explanation following the example:

 
USEREXIT CSECT ,
..
..
XC HRNXD(HRNXDSIZ),HRNXD CLEAR THE HRNXD DSECT
MVC HRNXDTYP,=CL8'SESENVWT' INFORM EE OF THE EXIT TYPE
MVC HRNXDNAM,=CL8'USEREXIT' OUR PROGRAM NAME
LA R1,ENVWAIT THE ADDRESS OF OUR ENTRY
ST R1,HRNXDEP POINT IN OUR CODE
OI HRNXDEP,X'80' SET HIGH ORDER BIT
CALL HRNHLLTM,(HRNHLLWA,STARTEE,BATCH,RGNPARM,0,0,RETDATA,       x
RETCODE,HRNXD),VL,MF=(E,CALLIST)
RETURN RETURN TO TP MONITOR
..
..
..
ENVWAIT DS 0H CLIENT PROGRAM WAIT
*
ROUTINE CODE HERE

 
Explanation of Values Provided for the Example
 
This can be an address of some common storage for your environmental wait routine.
It is returned to any caller of the STARTEE call that provides the optional ninth parameter.
This must be the address of the Entry Point of your exit routine.

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved