Compiling and linking C and COBOL applications

This section gives some examples showing how to compile and link typical ECI, EPI, and ESI applications in the various client environments. These are examples only, and might refer to specific compilers and linkers.

For details of supported compilers, see Development environments

The following table shows the C header files required depending on the API being used and whether they can be used to build 32-bit and 64-bit applications:
Table 1. C header files
Use File 32-bit support 64-bit support
ECI V1 cics_eci.h x
EPI cics_epi.h x
ESI V1 cics_esi.h x
ECI V2 ctgclient_eci.h and ctgclient.h
ESI V2 ctgclient_esi.h and ctgclient.h
Type definitions cicstype.h x

When compiling C programs, you might need to pass structures to the external CICS interfaces in packed format. If this is the case, the C header files contain the #pragma pack directive, which must not be changed.

The following table shows the copybook files for COBOL required and whether they can be used to build 32-bit and 64-bit applications:
Table 2. COBOL copybooks
Use File 32-bit support 64-bit support
ECI V1 cicseci.cbl x
EPI cicsepi.cbl x
ESI V1 cicsesi.cbl x

For Micro Focus COBOL, you must use call-convention 8 for every program call, or use the default call-convention 0 and compile using the LITLINK compiler directive.

Refer to the Sample programs supplied with your environment for examples of compiling and linking programs.


Information Information

Feedback


Timestamp icon Last updated: Tuesday, 19 November 2013


https://ut-ilnx-r4.hursley.ibm.com/tg_latest/help/topic/com.ibm.cics.tg.doc//progde/crecala.html