Syntax
SENDMESSAGE { ALL | ODT | variable } expression
Parameters
SendMessage can be abbreviated as SendStatus, SMSG, SM, or SS.
variable
Sends the message to this specified user or an Operator Display Terminal (ODT).
To send the message to the current user, specify Glb.Stn.
To send the message to the initiating user, specify Glb.InitStn.
ALL
Sends a broadcast message.
ODT
On Windows-based systems, this command sends the message to the Windows Event Log on the server.
On MCP-based systems, this command sends the message to an MCP-based Operator Display Terminal (ODT).
Messages directed to the ODT are always delivered. They appear as displays, and indicate the sending Ispec or Report. The mix number of the relevant COMSTP program is also displayed. Messages sent from Reports do not indicate the copy of the Report from which they originate. The mix number of system/LSS is displayed.
expression
The text of the message specified as a string. If a numeric value is used, it is converted to text.
This message is limited to a maximum length of 50 characters.
Note: For Windows-based systems, the SendMessage ODT command accepts a message of more than 50 characters and logs it to Windows Event Log as expected.
Description
Specific details for each runtime host type are given in the following subsections.
For a System based on the Windows Operating System
The SendMessage command sends messages directly to the status line of specified user terminals signed on to the runtime application. In reports, the message is sent to the report message window. The message is sent immediately, and does not wait for the end of the current transaction.
If an invalid username is specified, or the designated user is not logged on, no message is delivered, and no error is returned.
If the SendMessage ODT logic cammand variant is specified, use the Windows Event Viewer to view the messages, which are listed in the Source column as "LINC ODT".
In Debugger
Debugger interprets the SendMessage command with and without the ODT variant differently and responds accordingly. Following are the different types of Debugger behavior for the SendMessage command:
For any platform, Debugger sends a message to the current user via the Status bar or Report Window for the SendMessage command when the ODT variant is not specified.
For any platform, Debugger does not send a message for the SendMessage command if the message is intended for a different user.
For any platform, Debugger sends a message to the Windows Event Log, if the ODT variant is specified in the SendMessage command.
For any platform, Debugger sends an output message in the Microsoft Visual Studio Output window for the SendMessage command to indicate that the command is successfully interpreted, if the message is intended for a different user, or if the ODT variant is specified in the SendMessage command.
For MCP-based systems
Reports initiated in batch mode under LINC/RIP have the value of their initiating station (Glb.InitStn) set to BATCH, so that attempts to send messages to Glb.InitStn will have no effect. No messages are delivered, and no errors are returned.
When processing an OLTP-originated transaction, the following restrictions apply to the SendMessage command:
The SendMessage Glb.Stn command is ignored, and no user indication is given.
The SendMessage All command does not send the message to OLTP clients. No user indication is given.
When a message is sent to a station using the command SendMessage Glb.Station <message>, the message is displayed for 0.4 seconds on the status line before the screen is displayed. When the screen is displayed, the message disappears.
Restrictions
The following restrictions apply to the SendMessage logic command:
When processing an OLTP-originated transaction, the SendMessage logic commands specifying the current user are ignored.
When processing an OLTP-originated transaction, the SendMessage All logic command variant does not send the message to OLTP clients.
The SendMessage All logic command variant can incur considerable processor overhead.
Examples
Example 1
SendMessage All "All users please sign off"
Example 2
This example is of an ispec initiated SendMessage logic command.
SendMessage Glb.Stn "Processing your request"
Example 3
This example is of a report Initiated SendMessage logic command.
SendMessage Glb.InitStn "Processing your request"