Previous Topic: Decimal Precision AttributesNext Topic: Compiling, Binding, and Storing an External Action Block


Creating External Action Logic

To implement an external action block, you may prefer to add a call to an existing subroutine rather than including the subroutine logic itself. Either method is acceptable.

You can complete an external action block two ways:

You should use the CA Gen generated interface routine because much of the work is already done for you in a format that is acceptable to CA Gen.

Interface-routine logic can be written in any language. This language does not have to be the same as that generated by CA Gen. If this
interface-routine is used by a mainframe application, it must be written in a language that follows LE linkage conventions.

However, the interface routine logic must follow specific requirements. The CA Gen generated load module passes the following parameters to the EAB interface routine. They are passed in the order indicated in the following table.

For C Without High Performance View Passing

For C With High Performance View Passing

For Java

IEF-RUNTIME-PARM1

IEF-RUNTIME-PARM1

in_runtime_parm1

IEF-RUNTIME-PARM2

IEF-RUNTIME-PARM2

in_runtime_parm2

w_ia (import view C)

PSMGR-EAB-DATA (null array)

in_globdata

w_oa (export view C)

w_ia (import view C)

import_view

PSMGR-EAB-DATA (null array)

w_oa (export view C)

export_view

IEF-RUNTIME-PARM1 and IEF-RUNTIME-PARM2 are the first two parameters passed from the CA Gen generated load modules. These parameters must be coded on the entry statement of the interface routine and must always be passed in this order to any subordinate routines that are called.

For the C language, the position of the import and export views (w_ia and w_oa) depends on whether High Performance View Passing is used (see the previous table that describes the order in which parameters are passed from load modules to EABs). By default, High Performance View Passing is set ON.

Note: For more information about High Performance View Passing, see the Host Encyclopedia Construction User Guide or the Toolset Online Help.

For component development, High Performance View Passing must be set ON for both the component and the consuming model.

PSMGR-EAB-DATA is an array set to zeroes (Null array). For target system implementation, this array is passed but not used. (The array is used for IMS and CICS applications on the mainframe.) For more information about the use of this array, see Host Encyclopedia Construction User Guide.

Modify the stub using any editor that can save files in the appropriate character set format. The modified stub cannot contain any control codes or header information unique to the editor.

Note: After you add logic to an external action block interface routine, remember to move or copy it to another directory. This ensures that changes are not overwritten if you generate the action block again.