Previous Topic Next topic Print topic


External Data Value Modification - Output Parameter (Exit Point 7)

Allows you to override the internal data value created during the execution of the application.

Syntax:

typedef cblt_rtncode (*PFI_IDP_EXIT)(mf_uns32      exit_point,
                                     IDP_EXIT_INFO *exit_info);

On Entry:

exit point
7 = External data value modification - output parameter
exit_info
version Version of structure format
flags 0
ext_value_size Size of data addressed by the ext_value field
funcs User exit support functions
field name Name of data item in COBOL program's Linkage Section
ext_param_name Name of external parameter
ext_value External data value associated with the field_name field
request_cxt Request context
exit_data User exit-specific data

On Exit:

exit_info
ext_value_size Size of data addressed by the ext_value field. Needs to be updated only if the user exit allocates memory for a new ext_value string
ext_value External data value to be associated with field_name. Needs to be updated only if the user exit allocates memory for a new ext_value string
exit_data User exit-specific data

Return codes:

IDP_EXIT_CONTINUE
0 = Continue with default parameter mapping
IDP_EXIT_STOP
1 = Terminate mapping processing. An error response will be required
IDP_EXIT_HANDLED
2 = The exit has overridden the supplied external data value. Use this value to perform default mapping for the given COBOL Linkage Section field name
IDP_EXIT_OMIT
3 = The exit has determined that the given parameter should not be included in the response

Comments:

This exit gives you the opportunity to override the external value created by the request handler in its default mapping processing for the given COBOL Linkage Section field name. If the exit chooses to override the external value, it must return IDP_EXIT_HANDLED and either update ext_value in place (if the replacement value is less or equal to ext_value_size), or allocate a replacement string using the support function fn_alloc_mem and set ext_value and ext_value_size accordingly. The request handler will use the returned ext_value (IDP_EXIT_CONTINUE or IDP_EXIT_HANDLED) in its default response processing.

The user exit program owns the exit_data field of the IDP_EXIT_INFO structure. You would typically use it to preserve context information between exit point invocations. You can use it when returning any of the IDP_EXIT_ return values.

Previous Topic Next topic Print topic