Writing your own user exits

How to write and use your own user exits.

Follow these rules when writing your own user exits:

To use the ECI exits, you supply a CICS_ECIEXITINIT function in a DLL called cicsecix .dll (cicsecix.a on UNIX and Linux operating systems).

To use the EPI exits, you supply a CICS_EPIEXITINIT function in a DLL called cicsepix.dll (cicsepix.a on UNIX and Linux operating systems).

The CICS_ECIEXITINIT and CICS_EPIEXITINIT functions each set an ExitList structure to point to the addresses of all the exit functions contained in the exit object. For example, the sample CICS_EPIEXITINIT is as follows:
void CICSEXIT CICS_EPIEXITINIT(CICS_EpiExitList_t *ExitList)

{
    ExitList->InitializeExit        = &CICS_EpiInitializeExit;
    ExitList->TerminateExit         = &CICS_EpiTerminateExit;
    ExitList->AddTerminalExit       = &CICS_EpiAddTerminalExit;
    ExitList->StartTranExit         = &CICS_EpiStartTranExit;
    ExitList->ReplyExit             = &CICS_EpiReplyExit;
    ExitList->DelTerminalExit       = &CICS_EpiDelTerminalExit;
    ExitList->GetEventExit          = &CICS_EpiGetEventExit;
    ExitList->TranFailedExit        = &CICS_EpiTranFailedExit;
    ExitList->SystemIdExit          = &CICS_EpiSystemIdExit;
    ExitList->TermIdExit            = &CICS_EpiTermIdExit;
    ExitList->TermIdInfoExit        = &CICS_EpiTermIdInfoExit;
    ExitList->StartTranExtendedExit = &CICS_EpiStartTranExtendedExit;
}

As the exits are entered by using the addresses supplied, you can give them any name you want, as long as their function signature is exactly the same as the CICS_Eci* or CICS_Epi* functions.

InitializeExit is passed a version number of X'FF000000' when driven by cicsterm or cicsprnt. This enables user programs to be able to differentiate between cicsterm and cicsprnt user exits, and EPI user exits if they wish to do so.


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/apcere.html