DFHFUNCTION is a container of DATATYPE(CHAR) that contains
a 16-character string that indicates where in a pipeline a program
is being called.
The string has one of the following values. The rightmost
character positions are padded with blank characters.
RECEIVE-REQUEST
The handler is a nonterminal handler in a service provider pipeline,
and is being called to process an inbound request message. On entry
to the handler, the message is in control container DFHREQUEST.
SEND-RESPONSE
The handler is a nonterminal handler in a service provider pipeline,
and is being called to process an outbound response message. On entry
to the handler, the message is in control container DFHRESPONSE.
SEND-REQUEST
The handler is being called by a pipeline that is sending a request;
that is, in a service requester that is processing an outbound message
RECEIVE-RESPONSE
The handler is being called by a pipeline that is receiving a
response; that is, in a service requester that is processing an inbound
message
PROCESS-REQUEST
The handler is being called as the terminal handler of a service
provider pipeline
NO-RESPONSE
The handler is being called after processing a request, when no
response is to be processed.
HANDLER-ERROR
The handler is being called because an error has been detected.
In a service provider pipeline that processes a request and
returns a response, the values of DFHFUNCTION that occur are RECEIVE-REQUEST, PROCESS-REQUEST,
and SEND-RESPONSE. Figure 1 shows the sequence in which the handlers are called
and the values of DFHFUNCTION that are passed to each handler.Figure 1. Sequence of handlers in a service
provider pipeline
Sequence
Handler
DFHFUNCTION
1
Handler 1
RECEIVE-REQUEST
2
Handler 2
RECEIVE-REQUEST
3
Handler 3
PROCESS-REQUEST
4
Handler 2
SEND-RESPONSE
5
Handler 1
SEND-RESPONSE
In a service requester pipeline that sends a request and
receives a response, the values of DFHFUNCTION that occur are SEND-REQUEST and RECEIVE-RESPONSE. Figure 2 shows the sequence
in which the handlers are called, and the values of DFHFUNCTION that
are passed to each handler.Figure 2. Sequence
of handlers in a service requester pipeline
Sequence
Handler
DFHFUNCTION
1
Handler 1
SEND-REQUEST
2
Handler 2
SEND-REQUEST
3
Handler 3
SEND-REQUEST
4
Handler 3
RECEIVE-RESPONSE
5
Handler 2
RECEIVE-RESPONSE
6
Handler 1
RECEIVE-RESPONSE
The values of DFHFUNCTION that can be encountered in a given
message handler depend on whether the pipeline is a provider or requester,
whether the pipeline is in the request or response phase, and whether
the handler is a terminal handler or a nonterminal handler. The following
table summarizes when each value can occur: