The PROCESS-LINC-RESPONSE paragraph is performed by GET-COMS-Message when the COMS message is identified as a reply from your application. This paragraph analyzes the message received from COMS and distinguishes between transaction types (format requests, error messages, teach requests, and Administration commands), as follows:
The message received from the application is checked for a valid dialog index, or an indication that the dialog has been closed. A valid dialog index means that the message is an unsolicited reply to a transaction sent to your application. The dialog index is not set for output messages, Administration command output, and so on.
If either of these situations apply, the station table is checked in case it needs to be updated to include a new station or remove a station if one has been closed down.
If you do not require the retention of session data in memory only, the station table and the code to handle it are not necessary. Refer to the comments on session data in SEND-TO-LINC for more information.
FIND-STATION is performed to see if the station exists in the table.
If the station is found and it is to be closed down, the table entry is cleared.
If the station is not found and it is new, the station and its dialog index (parent requestor) are added to the table.
If the station is not found and the table is full, a message is displayed and your NOF program is terminated.
The message is analyzed. Depending upon the message code and message kind, the message is displayed either directly, or by performing the paragraph DISPLAY-
LINES.
The message is returned to the initiating station, if appropriate. To return a message to the initiating station, the station’s COMS designator is needed. This is the name by which COMS identifies the station. The designator is obtained by removing the NOF prefix (added by the Agile Business Suite) from the initiating station name in the reply from your application. The DCILIBRARY is then called to return the designator.
If this returns a valid station designator, the SEND-TO-STATION paragraph is performed to send the message on to the terminal.
If this does not return a valid station designator, an error message is displayed.