Calling the parse exit from AMD2

For CICS, AMD2 uses the EXEC CICS LINK command to call the parse exit routine. The call is executed only if the parse exit option is selected using the DB2 UDB Option Configuration window. For instructions, see “Changing the DB2 UDB Option for CICS configuration”.

You can select this option during installation of the product (see step 3 in “Changing the DB2 UDB Option for CICS configuration”) or when you enable your routine following the instructions in this section.

Before calling the parse exit routine, AMD2 sets up the parse exit common area that a parse exit routine can access. Your routine should alter the values in the common area of the parse exit as shown in Table 7-4. An explanation of the fields and information about changing their values is included in “CICS common area fields”.

Table 7-4: Altering values in common area fields

Common area field

When to alter the value

USERID

Never

PASSWORD

Never

NETGWNAME

Never

STMT-PTR

When the SQL text length changes

RETCODE

Always (every invocation of the routine)

MSGCODE

When the return code equals +2