0.9b (c) 1995 Peter Childs
The functions sends a buffer of information to a registered messaging name.
Syntax
MyRc = NetMisc(NETMESSAGEBUFFERSEND, Message, toName, SrvName)
Parameters
The parameters required are:
Message The message string to be send
For broadcast messages to the physical network, where toName points to "*" or to "domain (*)", the message can be no longer than 128 bytes (and is not guaranteed to be delivered). For messages sent to all message names on a domain, the limit is 128 bytes.
Otherwise, the message can be any length, provided it does not exceed the maximum receivable message size for that computer, which is set with the 'sizmessbuf' parameter in IBMLAN.INI. The total size of 'sizmessbuf' can be divided among different messages, if messages are arriving at the same time. This reduces the actual size of any single message that can be received. In addition, the sizmessbuf parameter can accept only limited values.
The function does not require the Messenger service to be started on a local computer.
toName A string containing the name of the userid or application to receive the message. To broadcast a message to all requesters on the LAN, have the value of toName be an asterisk (*) wildcard.
To broadcast a message to all users on a domain, have the value of toName be the domain name followed by an asterisk (*).
A value must be supplied
SrvName A remote server computer name if remote, otherwise ''
Example
/* Send a message */ call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs' call LoadLsRxutFuncs NETMESSAGEBUFFERSEND = 530 Message = 'Server backup of user data has completed' toName = 'ADMIN04' SrvName = '\\ANYSRV01' myRc = NetMisc(NETMESSAGEBUFFERSEND, Message, toName, SrvName) if myRc <> '0' then do say 'Got error from NetMisc() ' myRc exitRc = 9 end else do say 'Message sent successfully' end call DropLsRxutFuncs call RxFuncDrop 'LoadLsRxutFuncs' exit exitRc
Example Output
Message sent successfully
Inf-HTML End Run - Successful