Accessing the EIB from C and C++
The address of the EXEC interface block (EIB) is not passed as an argument to a C or C++ main function. This means that C and C++ functions must use the ADDRESS EIB command to obtain the address of the EIB.
You must code an ADDRESS EIB statement at the beginning of each application if you want access to the EIB, or if you are using a command that includes the RESP or RESP2 option.
Addressability
is achieved by using the command:
EXEC CICS ADDRESS EIB(dfheiptr);
or
by passing the EIB address or particular fields therein as arguments
to the CALL statement that invokes the external procedure.
If access to the EIB is required, an ADDRESS EIB command is required at the beginning of each program.
Within a C or C++ application program, fields in the EIB are referred to in lower case and fully qualified as, for example, “dfheiptr->eibtrnid”.
The following
mapping of data types is used:
- Halfword binary integers are defined as “short int”
- Fullword binary integers are defined as “long int”
- Single-character fields are defined as “unsigned char”
- Character strings are defined as “unsigned char” arrays