gtpn1m0tNon-SNA Data Communications Reference

Output Message Handler

Output queues are maintained both for the link and for each channel of the link (on multichannel links), for LCBs and message blocks. LCBs will be added by the link controller program. Type A and B messages may be passed by any non-terminal oriented application program by use of the macro SENDCK - Send to Link. Terminal oriented system programs (that is, reservations) may pass type A messages, through SENDCA, SENDCC or SLMTC, to send to indirectly coupled sets; if a SENDCA, SENDCC or SLMTC specifies a pseudo line, the macro routine will search the link routing table using the pseudo line number and Interchange Address (IA) as the search argument in order to find the additional routing characters required to send the message across the high level network. It then effects the processing of the SENDCK macro. Since system programs pass messages, but the output queues require specially formatted link blocks, an output interface is needed. This is effected as follows:

Message Output From Applications

The SENDCK macro and SENDCA/SENDCC/SLMTC Intercept messages to the appropriate applications message queue (AMQ). Information concerning the message Type, and the means of recreating NAK'd link blocks is set up by the SENDA,SENDCC and SLMTC intercept coding from its own internal logic, while that for SENDCK is provided by you. In all cases, this status is stored in the message before attaching it to the AMQ. Following the creation (or extension) of the AMQ, the macro then determines if the appropriate output sender (type A or B) is active and, if not, activates it by means of the Control Transfer mechanism. The normal macro exit logic then returns control to the original output program, (for example, message router, XMLT).

Output Sender (TYPE A) (CMS1)

This takes messages one by one from the AMQ, assigns an MBI and then enters the deblock and send segment in order to add the message to the output queue. The following conditions may arise:

Output Sender (Type B) (CMS2, CMS5, CMS8)

In the normal case, messages are removed one by one from the AMQ, assigned an MBI and passed to deblock and send to add the message to the output queue. However, since type B messages have the lowest priority, they are transmitted only when others on the link allow. A means of queueing at an earlier stage than the output queue may, therefore, be required to avoid core depletion and is provided by the MCR - message control record (MC0MC). This contains the file address of the prime block of the message and status information. If the link is down, or the type B link queue already contains a number of link blocks exceeding a link defined maximum, or MBIs are exhausted, the message reference (file address) and status information is stored in the MCR for that link and the core block released. In addition to the type B output sender being activated when the SENDCK macro address messages to the AMQ and the sender is not active, it is also activated by the communications control program when a link is restarted, the link queue is depleted or MBI exhaustion is relieved providing that a wake-up switch is on and the active switch is off.

Deblock And Send (CMS3, CMS6, CMS9)

An output message in OMSG, AMSG, or XMSG format is converted into link blocks, translated and the envelope of TSI, MBI, LCI and so forth, inserted. The blocks are passed one by one to the communications control program by means of the macro PLONC - Place on Queue. NAK'd blocks are handled by deblocking according to the original logic, but issuing the PLONC macro only for those link blocks that require retransmission.

NAK Processor (CMS4, CMS7)

Based on the status byte that contains information about the origin of the message in the TPF system, it is first determined whether it is possible to regenerate the original text. If not, a standard text is transmitted instead. Otherwise, it may be possible to regenerate the text by retrieving from file the original output message, or by means of repeat transmission logic in UIO or XLMT. Having retrieved, by one of these means, the original message, Deblock and Send, is entered to retransmit the NAK'd blocks.

Message Retransmission Processor (CMSD)

When an AML time out has occurred and the message has been previously retransmitted a specified number of times (N3) with the current message label, an attempt is made to regenerate and retransmit the entire message as an original message. When reference to the message has been saved, the message is retrieved from file and then is passed to UIO, UIS, or LMT to effect repeat message logic or is passed directly to the output message handler to process. Either alternative effectively will cause a new message label to be obtained for this message. The old message label in the link keypoint is indicated as being available. If it is not possible to regenerate the original message, the old message label is made available and this segment exits with no further processing.