API To Modify Runtime Controls

Adabas System Coordinator uses runtime controls to determine execution behavior. Applications can modify some of these runtime controls dynamically, via API. Two APIs are provided; one for 3GL and Assembler programs and one for Natural programs. Currently the only runtime controls that can be modified are the z/OS-only controls Review and Client Monitor.


3GL API

The 3GL API is contained in the supplied COR3GLI load module. There are also some supplied source members showing how to use the API:

  • APIREV01: example of using the API in environments other than CICS

  • APIREV02: example of using the API in CICS

  • COR3GLIA: a parameter data area for calling COR3GLI

Start of instruction setTo use the 3GL API:

  1. Allocate storage for the parameter data area (1792 bytes).

  2. Initialize the storage to binary zeroes.

  3. Set the interface version (field name INFVRS in COR3GLIA) and function (INFFNC).

  4. Set the product code (INFCPROD) for which controls are to be modified (currently, this must be ‘COR’).

  5. Set the names (INFCNAME) of the runtime controls to be modified (‘REVIEW’ and/or ‘REVIEW-CLIENT’), together with the required value (INFCVAL, ‘Y’ or ‘N’).

  6. Under CICS, set the name of the Adabas link module to be used (INFCICN). The link module must be capable of accepting parameter lists via the COMMAREA. If not under CICS, INFCICN must contain binary zeroes or spaces.

  7. If using the reentrant ADALNKR, allocate a modified area and set its address (INFAMOD).

  8. Link this program together with COR3GLI and, if not under CICS, your Adabas interface module, for example ADAUSER.

  9. After calling COR3GLI, INFRC will contain 0000 and the new controls will be in effect for this session; or, INFRC will contain a non-zero return code and INFRT will contain an explanatory message.

Natural API

The Natural API is contained in library SYSCOR, subprogram CORNATI. There are also some supplied source members in SYSCOR, showing how to use the API:

  • APIREV-P: example of calling CORNATI

  • CORNATIA: parameter data area for calling CORNATI

Start of instruction setTo use the Natural API:

  1. Ensure that subprogram CORNATI is available, by copying it to your Natural library or adding SYSCOR to your library’s steplibs in Natural Security.

  2. Set CORNATI-VERSION and CORNATI-FUNCTION.

  3. Set the product code (CORNATI-CONTROL-PRODUCT) for which controls are to be modified (currently, this must be ‘COR’).

  4. Set the names (CORNATI-CONTROL-NAME) of the runtime controls to be modified (‘REVIEW’ and/or ‘REVIEW-CLIENT’), together with the required value (CORNATI-CONTROL-VALUE, ‘Y’ or ‘N’).

  5. Call CORNATI.

  6. After calling CORNATI, CORNATI-RC will contain 0000 and the new controls will be in effect for this session; or, CORNATI-RC will contain a non-zero return code and CORNATI-RT will contain an explanatory message.

Return Codes

These are the non-zero return codes which may be set:

Return Code Description
0001 Invalid interface version (must be 01)
0002 Invalid function (must be CONTROLS)
0003 System Coordinator not available
0004 System Coordinator internal error
0005 System Coordinator internal error
0006 Adabas interface not linked (3GL API only)
0010 Invalid product code (must be COR)
0011 Invalid control name (must be REVIEW or REVIEW-CLIENT)
0012 Invalid control value (must be Y or N)