Send warning or message to user(s)
Note: Many $functions have been deprecated in favor of Object Oriented methods. There is no OO equivalent for the $SirWarn function, because it is very easy to do the same thing using a Daemon.
The $SirWarn function is used to send a warning or message to the specified user or users. If the user invoking $SirWarn is a system manager or system administrator, $SirWarn acts like a WARN command; otherwise it acts like an MSG command.
%rc = $SirWarn (user, message)
|%rc||A numeric variable that is set to indicate the success of the function.|
|user||Identifies the user(s) to receive the warning.
If this argument is the string
|message||The text of the warning to be sent to the user(s) indicated by the user argument.|
0 - Warning issued 1 - User(s) not logged on 2 - Insufficient storage 3 - Parameter missing (either userid or message)
- The following statement sends a warning of an application error to the operator:
%rc = $SirWarn('OPR', 'Severe application error for user' WITH $USER)
- This statement sends a warning to user 57 to leave subsystem
%rc = $SirWarn(57, 'Please leave subsystem BARNEY')
- This statement sends a warning to all users logged on as
%rc = $SirWarn('HOMER', 'Please call Marge')