gtps2m0pACF/SNA Data Communications Reference

TPF Application Programming Considerations

Note:
This chapter is not applicable for TPF/APPC. See TPF Advanced Program-to-Program Communications for this information.

TPF provides the user with a standard interface for communicating with TPF applications. The input interface consists of:

The RCPL contains the origin and destination for a message. It is located in the ECB work area. Indicators in the RCPL delineate the type of input device, the environment (SNA or non-SNA), and the presence of a resubmitted message. When an application responds to a message, the origin field becomes the destination and the destination field becomes the origin. The main storage block contains the input message.

TPF assembles a segmented message before presenting it to the application. Some messages do not fit into a single main storage block. These are stored on file and forward-chained to the block. Applications use the ROUTC macro to send a message to an SNA logical unit. If output messages use more than 1 block, they too are chained together on file.

Note:
In a TPF system, a reply is sent for every input message. Input messages are resubmitted to an application (TPF records every input message) if a reply is not received. Users define the time-out period during network definition. Applications must release the input message, indicating processing is complete, or the message is resubmitted.

When an application is started to process an input message, it receives:

The RCPL contains the following fields:

The origin field of an RCPL contains:

Non-SNA application programs use a line number, interchange address, and terminal address (LN/IA/TA). The LN/IA/TA replaces the RID.

The destination field contains the 4-character name of the application that receives the input message. Before sending a message, the logical unit must log on to this application. Additionally, the application must be included in the routing control application table (RCAT).

The RCPL contains indicator fields that describe the input or output message. RCPL fields are defined via the RC0PL data macro. Application programs should set any unused RCPL indicators to zero. This practice prevents errors and eases installation of new applications.

Note:
SNA output messages that cannot be sent because of telecommunication failures are also passed to the application as input. In this situation the returned message indicator (RCPL0RET) is set. Applications should be designed with the capability of processing returned output messages.

The original messages sent by the application may have been altered by the ROUTC exit or a process selection vector (PSV) routine. Therefore, when using these facilities, regardless of the Data Flow Control (DFC) layer implementation or the use of PSV routines, TPF must return messages to the originator (application/PSV) via the same path (ROUTC Exit/PSV) rather than directly to the application via the RCAT enter expansion.

See Process Selection Vector (PSV) and Data Flow Control (DFC) Considerations for additional information. Also, see the user exit information in the TPF System Installation Support Reference.