DFHZARL

DFHZARL is always invoked through the DFHLUC macro. The DFHLUCDS DSECT maps a parameter list that is set up to pass information to and return information from DFHZARL. DFHZARL manages data in buffers, not in TIOAs. SEND commands cause data to be assembled by DFHZARL into a buffer until a WAIT, or other event, causes the data in the buffer to be transmitted.

DFHZARL invokes DFHZSDL to send data to z/OS® Communications Server, by placing requests on the activate chain. However, for optimization, DFHZARL can invoke DFHZSDL directly. Receive requests are handled by DFHZARR.

DFHZARL invokes DFHZUSR to manage the conversation state. The LU6.2 states for each session are stored in the TCTTE for that session.

If the request needs to be transaction routed, DFHZARL calls DFHZXRL to route the request to the terminal-owning region (see Transaction routing).

Details of DFHZARL's processing for the principal functions of the DFHLUC macro that is used to invoke DFHZARL are described.

INITIAL_CALL function

This function is requested by DFHZSUP. DFHZARL acquires LU6.2 send and receive buffers. If the transaction is being started as a result of an ATTACH request received from a remote system, DFHZARL transfers any data received with the attach header from the TIOA into the receive buffer.

ALLOCATE function

DFHZARL performs the following actions:
  1. If the request passed the address of a profile entry, puts this address in the TCA. If the request passed the name of a profile, calls transaction manager to locate the entry and then puts the address of the entry in the TCA.
  2. If the request passed a netname rather than a specific sysid, calls DFHZLOC to locate the TCTTE for the netname and then puts the sysid into the DFHLUC parameter list (as if the caller had the specified sysid).
  3. Copies the DFHLUC parameter list to LIFO storage.
  4. Calls DFHZISP to allocate a TCTTE.
  5. Addresses the TCTTE allocated.
  6. Acquires LU6.2 send and receive buffers.
  7. Sets the user state machine (DFHZUSRM), request␠=␠ALLOCATE_RESOURCE.
  8. Returns results to the caller.

SEND function

DFHZARL performs the following actions:
  1. Checks the user state machine (DFHZUSRM).
  2. Checks the LL count and maintains a record of the outstanding LL count.
  3. If the command is SEND LAST, INVITE, or CONFIRM, and the outstanding LL count is nonzero, issues an error message.
  4. Sets the user state machine (DFHZUSRM).
  5. Issues RECEIVE IMMEDIATE requests, as required, to pick up any negative responses sent by the partner program.

The caller must specify WAIT in the request to force the data to be sent immediately. SEND CONFIRM has an implicit WAIT, and control is not returned until a response has been received, when the state machine is set.

For a SEND request with WAIT, DFHZARL then:
  1. Sets the user state machine (DFHZUSRM), request=WAIT.
  2. Invokes DFHZSDL for transmission of the data in application area or send buffer.
For a SEND request without WAIT, DFHZARL then:
  1. If there is sufficient space in the send buffer for all the data, transfers the data from the application area to the send buffer, and returns control to the caller.
  2. Saves the INVITE and LAST indicators.
  3. If the send buffer cannot hold all the data, invokes DFHZSDL for an implicit SEND.
If data or a CONFIRM command was sent (or both), DFHZARL then:
  1. Checks for a signal received.
  2. Checks for exception (negative) response received. If found, calls DFHZERH to handle the error. On return, sets the state machine.
  3. Returns results to the caller.

When an implicit send is required, DFHZARL passes the data to DFHZSDL for transmission, passing the address of the data in the send buffer and in the application buffer. The total length of data passed to DFHZSDL is a multiple of the request unit size. On return to DFHZARL, the remaining data is transferred to the send buffer. The parameters passed to DFHZARL, such as INVITE and LAST, are not transmitted by DFHZSDL.

RECEIVE function

DFHZARL passes the DFHLUC parameter list, specifying the type of receive required, to DFHZARR for processing (see DFHZARR).

ISSUE ERROR or ABEND function

DFHZARL is called as a result of an ISSUE ERROR or ISSUE ABEND command, and performs the following actions:
  1. Sets the user state machine.
  2. Calls DFHZERH.