IBM Z and LinuxONE IBM Z

Sending Notification Messages to all Logged On Users - TSO and ssh

  • 1.  Sending Notification Messages to all Logged On Users - TSO and ssh

    IBM Champion
    Posted Thu January 11, 2024 08:32 AM

    There are times when you need to notify all logged on TSO and ssh users of a planned system outage so that they can save their work and logoff cleanly.

    The system operator, using the system console, can do this using the SEND command:

    Example:  SEND 'The system will be shutdown in 30 minutes for a planned IPL' NOW

    This is great but it does not get the message to those connected using ssh. 

    To send a message to all ssh users the shell wall command must be used:

    Example:  wall 'The system will be shutdown in 30 minutes for a planned IPL'

    Note that you will need superuser authority or you're only sending the message to yourself.

    You can write a REXX script that can be run under TSO, or from the system console using System REXX, to to this:

     /* rexx */                               
     parse arg message                        
                                              
     address syscall 'geteuid'                
     myeuid=retval                            
     Address syscall "seteuid 0"              
     cmd = "wall '"message"'"                 
     x = bpxwunix(cmd,,s.,e.)                 
     Address syscall "seteuid" myeuid         

    Hope this helps.



    ------------------------------
    Lionel B. Dyck <><
    IBM z Systems Champion
    ------------------------------