Rational Developer for System z
COBOL for Windows, Version 7.5, Programming Guide


Initializing persistent COBOL environment

Use the following interface to initialize a persistent COBOL environment.

CALL init_routine syntax
Read syntax diagramSkip visual syntax diagram>>-CALL--init_routine(function_code,routine,error_code,token)--><
 
CALL
Invocation of init_routine, using language elements appropriate to the language from which the call is made
init_routine
The name of the initialization routine: _iwzCOBOLInit or IWZCOBOLINIT (using OPTLINK linkage convention), or _IwzCOBOLInit (using STDCALL linkage convention)
function_code (input)
A 4-byte binary number, passed by value. function_code can be:
1
The first COBOL program invoked after this function invocation is treated as a subprogram.
 
routine (input)
Address of the routine to be invoked if the run unit terminates. The token argument passed to this function is passed to the run-unit termination exit routine. This routine, when invoked upon run-unit termination, must not return to the invoker of the routine but instead use longjmp() or exit(). This routine is invoked with the SYSTEM linkage convention.

If you do not provide an exit routine address, an error_code is generated that indicates that preinitialization failed.

error_code (output)
A 4-byte binary number. error_code can be:
0
Preinitialization was successful.
1
Preinitialization failed.
 
token (input)
A 4-byte token to be passed to the exit routine specified above when that routine is invoked upon run-unit termination.

related tasks
Terminating preinitialized COBOL environment

related references
Call interface conventions


Terms of use | Feedback

Copyright IBM Corporation 1996, 2008.
This information center is powered by Eclipse technology. (http://www.eclipse.org)