Send custom messages through iSeries NetServer

If you have built the GO NETS tools for iSeries NetServer™ using the QUSRTOOL library support, then you can use the Send NetServer Message (SNDNSVMSG) command to send custom messages to registered users on the network. The command is available through option 14 on the GO NETS menu, and it functions like the NET SEND command on Windows.

The GO NETS tools allow the user to use commands or a menu (instead of the NetServer APIs) to add, change, display, and work with shares, start and end NetServer; and change and display NetServer configuration information.

Example: Send Windows message to user name JOE1 on the network and to user KRISTY specifically on the client machine WORKSTATION1:

SNDNSVMSG MSG('Reminder: Memo is due today.') TONETID((JOE1) (KRISTY
WORKSTATION1))

Since a workstation name is not provided for the first user (JOE1), the message is sent to the PC that holds the NetBIOS name. Normally, when a Windows 2000, Windows XP, or Windows Server 2003 workstation is started, the workstation registers its NetBIOS name on the local subnet and with WINS (when WINS is configured).

When a user logs on, then the user's name is also registered with the messenger service. To see which names are registered with the messenger service, specify NBTSTAT -a workstation from a command prompt. The following example output shows four registered message names on workstation HORSE:

         NetBIOS Remote Machine Name Table

      Name                Type            Status
    ---------------------------------------------
    HORSE          <00>  UNIQUE      Registered
    DEPT8          <00>  GROUP       Registered
    HORSE          <20>  UNIQUE      Registered
    DEPT8          <1E>  GROUP       Registered
    HORSE-AFS      <20>  UNIQUE      Registered
    HORSE          <03>  UNIQUE      Registered
    HORSE$         <03>  UNIQUE      Registered
    MANNY          <03>  UNIQUE      Registered

Example: Send Windows message to all users with active session connections to iSeries NetServer:

SNDNSVMSG MSG('&1, the Hawthorne server will be taken down for a disk 
replacement at 1pm') TONETID((*ALLNSVCNN))

The &1 can be used to indicate the user name for replacement text in the message.

Example: Send Windows message to all users who have made a connection in the past to iSeries NetServer (since it was restarted): SNDNSVMSG MSG('Good morning, dedicated users!') TONETID((*ALLUSERS))

Messages cannot be longer than 126 character.