0.9b (c) 1995 Peter Childs
The functions sends a file of information to a registered messaging name.
Syntax
MyRc = NetMisc(NETMESSAGEFILESEND, MessageFile, toName, SrvName)
Parameters
The parameters required are:
MessageFile The file to sent
The value is a string containing the full path and the file name of the file to be sent.
For broadcast messages to the physical network, where toName points to "*" or to "domain (*)", the messageFile 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 messageFile 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 server computer name if remote, otherwise ''
Example
/* Sent a message from a file */ call RxFuncAdd 'LoadLsRxutFuncs', 'LSRXUT', 'LoadLsRxutFuncs' call LoadLsRxutFuncs NETMESSAGEFILESEND = 540 MessageFile = 'C:\BACKUP.OK' toName = 'ADMIN04' SrvName = '\\ANYSRV01' myRc = NetMisc(NETMESSAGEFILESEND, MessageFile, toName, SrvName) if myRc <> '0' then do say 'Got error from NetMisc() ' myRc exitRc = 9 end else do say 'Message from file sent successfully' end call DropLsRxutFuncs call RxFuncDrop 'LoadLsRxutFuncs' exit exitRc
Example Output
Message from file sent successfully
Inf-HTML End Run - Successful