The Send User Break Message command allows a break message to be sent
to a user profile name, a generic name, or all active users. The
workstation where the user is signed onto will receive a break
message. The system commands SNDBRKMSG and SNDMSG do not support the
function. SNDUSRBRK determines if the user is active and sends the
same message to every workstation where the user is signed on.
Two commands are supported:
** SNDUSRBRK is a public command, but can only be used in a CL
program. This allows the programmer to place the command in a
program being run by any end user without authorization
considerations, but prevents the public user from entering the
command on a command line. One of the major advantages is to
be able to interrupt the current user with a break message
from a batch program.
** SNDUSRBRK2 can be run from a command line, but requires the
user to be authorized to the TAASNDBRK authorization list.
Both commands have an identical syntax and both invoke the same CPP
(Command Processing Program).
A typical message would be:
SNDUSRBRK MSG('...') USER(xxx)
If the user is signed on, a break message will be sent to the
workstation message queue where the user is signed onto.
Because the default is MULTSGNON(*YES), the message would be sent to
each workstation the user is signed onto. If the user has Group Jobs
or System Request jobs at the same workstation, only a single message
is sent. Some devices support 'Jump Key' jobs which cause a
different device name to be used which would cause a separate message
to be sent for each 'Jump Key' job.
An option exists for the situation where the user is not active. The
default is to use SNDMSG and send a non-break message to the user's
message queue. The alternative is to receive an escape message.
Sending to a generic user name or *ALL workstations
---------------------------------------------------
A generic name may be used such as:
SNDUSRBRK MSG('...') USER(ABC*)
All user names beginning with ABC that are active would be sent a
break message. If an ABC user is not active, no message would be
sent to their user message queue.
You may also send to all users with:
SNDUSRBRK MSG('...') USER(*ALL)
As with generic, if a user is not active, no message will be sent to
the user's message queue.
Security considerations
-----------------------
SNDUSRBRK is authorized to the public, but may only be run in a CL
program.
SNDUSRBRK2 may be run from a command line, but the user must be
authorized to the TAASNDBRK authorization list.
To send a break message, the user must have *JOBCTL special
authority. The intent of SNDUSRBRK is to allow usage from typical
application programs.
To allow for this, the TAAMSHJC program adopts the authority of its
owner (QSECOFR) to avoid the requirement of granting special
authority to users.
The TAAMSHJC program uses qualified commands or calls to ensure the
program cannot be used to subvert the security of the system.
SNDUSRBRK or SNDUSRBRK2 Command parameters *CMD
------------------------------------------
MSG The text of the message to be sent. Up to 256 bytes
may be entered.
USER The user profile name to send the message to. The
default is *CURRENT meaning the current user of the
job. The intent of the default is to allow use in
batch to send a message to the user who's profile is
being used for the batch job.
A specific user name may be used, a generic name, or
*ALL for all users.
MULTSGNON A *YES/*NO parameter for whether the user will
receive the message for each signon.
*YES is the default. The user will receive a
message at each job he is signed onto except for
system request and group jobs.
*NO may be specified to send only to the first job
where the user is signed onto.
NONACTIVE How to handle the situation where the user is not
signed on (not-active) to an interactive job. The
default is *USERMSGQ which means SNDMSG will be used
to send a non-break message to the users message
queue.
*ERROR may be specified to cause the command to
abnormally terminate with the TAA9893 escape
message.
This parameter is ignored if a generic user name or
*ALL is specified.
Restrictions
------------
The SNDUSRBRK command is arbitrarily restricted to operate only in CL
programs to reduce the exposure of a non-authorized user from sending
a break message.
The SNDUSRBRK2 command may be run from a command line, but only by a
user who is authorized to the TAASNDBRK authorization list.
Prerequisites
-------------
The following TAA Tools must be on your system:
CVTWRKACT Convert work active jobs
EDTVAR Edit variable
SNDCOMPMSG Send completion message
SNDESCMSG Send escape message
Implementation
--------------
None, the tool is ready to use.
Objects used by the tool
------------------------
Object Type Attribute Src member Src file
------ ---- --------- ---------- ----------
SNDUSRBRK *CMD TAAMSHJ QATTCMD
SNDUSRBRK2 *CMD TAAMSHJ2 QATTCMD
TAAMSHJC *PGM CLP TAAMSHJC QATTCL
TAAMSHJC2 *PGM CLP TAAMSHJC2 QATTCL
TAAMSHJR *PGM RPG TAAMSHJR QATTRPG
TAASNDBRK *AUTL
|