Send Network Message (SNDNETMSG)

Where allowed to run: All environments (*ALL)
Threadsafe: No
Parameters
Examples
Error messages

The Send Network Message (SNDNETMSG) command sends a message to another user on the local or a remote system through the SNADS network.

This message is sent as an informational message to the message queue that is defined for the recipient on the receiving system.

Note: The recipient must have a valid message queue specified in his user profile. Messages sent with the SNDNETMSG command are rejected if the recipient does not have a message queue specified in the user profile. The message queue specified in the network attributes is not used. Additional information on specifying a message queue when sending and receiving messages is in the CL information in the iSeries Information Center at http://www.ibm.com/eserver/iseries/infocenter.

This command does not perform the CCSID translation of the messsage. However, it sends the job CCSID to the receiving system.The message is translated upon receipt if needed. The user ID and address of both the recipient and the originator are translated from the current job CCSID to the multinational character set 697/500.

Restriction: The user must be enrolled in the system distribution directory. A description of the system distribution directory is in the SNA Distribution Services book, SC41-5410.

Top

Parameters

Keyword Description Choices Notes
MSG Message text Character value Required, Positional 1
TOUSRID User ID Values (up to 50 repetitions): Element list Required, Positional 2
Element 1: User ID Character value
Element 2: Address Character value
Top

Message text (MSG)

Specifies the message text of the immediate message that is sent. An immediate message is a message that is not stored in a message file. The text must be enclosed in apostrophes if it contains blanks or special characters. A maximum length of 256 characters can be specified.

This is a required parameter.

Top

User ID (TOUSRID)

Specifies one or more user IDs, or the name of one or more distribution lists containing user IDs of users to whom the message is to be sent.

A combination of both user IDs and distribution lists can be specified on the same command. Each user ID or distribution list is specified as a two-part name, and both parts are required. Up to 50 user IDs can be specified.

Note: Depending on the type of work station being used, the internal value for a user identifier may differ from the characters shown by the Display Directory Entries (DSPDIRE) command. If the byte-string value specified for the TOUSRID parameter does not match the rules for an internal user identifier value, or if it does not match the internal value for any enrolled user, an error may be reported.

This is a required parameter.

You can enter multiple values for this parameter.

Top

Examples

SNDNETMSG   MSG('I''m updating the accounts receivable files.')
            TOUSRID((SMITH SYSTEM2))

This command sends the message specified in the MSG parameter to the user identified to the network with a user ID of (SMITH SYSTEM2).

Top

Error messages

*ESCAPE Messages

CPF8063
Cannot assign necessary resource.
CPF8066
One or more user identifiers on this command is not correct.
CPF8069
Message not sent to any users.
CPF9005
System resource required to complete this request not available.
CPF9006
User not enrolled in system distribution directory.
CPF9830
Cannot assign library &1.
CPF9845
Error occurred while opening file &1.
CPF9846
Error while processing file &1 in library &2.
CPF9847
Error occurred while closing file &1 in library &2.
Top