GET-COMS-Message

The GET-COMS-Message paragraph is performed by the main loop routine ML-01, when a notification of a message is received from COMS. GET-COMS-Message performs the following tasks:

  1. Receives the next message from COMS into the message area.

  2. The message is checked to ensure it is not a closedown message, and the paragraph CHECK-COMS-INPUT-ERRORS is performed to check for other COMS input errors.

  3. If the message is valid, processing continues for this message.

  4. The message is then checked to see if it came from a program.

  5. If the message came from a program, the program is assumed to be the application, and the message type is then checked to see if it is an Automatic Entry from the application.

  6. If it is an Automatic Entry, the program performs the paragraph PROCESS-AUTO, which replies to Automatic Entries from both <<Ispec>> classes and Reports. Refer to PROCESS-AUTO for more information.

  7. If it is a response received from the application, the program performs the paragraph PROCESS-LINC-RESPONSE.

    • PROCESS-LINC-RESPONSE displays the reply, and forwards the response to the station that initiated the transaction, if that station can be found.

    • PROCESS-LINC-RESPONSE is only set up to forward replies to stations. You can modify this area to include code to forward replies through the port file interface, as required.

    • Refer to PROCESS-LINC-RESPONSE for more information.

  8. If the message did not come from a program, then it must have come from a station on the network, and the program performs the SEND-TO-LINC paragraph.

    • SEND-TO-LINC passes the message on to the application. This assumes that the data of the message is already formatted correctly.

    • Refer to SEND-TO-LINC for more information.