Send message to console or program (STXIT routine)
| Component: | BS2000 | 
| Functional area: | not allocated | 
| Domain: | JOB PROGRAM | 
| Privileges: | STD-PROCESSING | 
| Routing code: | P | 
Function
The SEND-MSG command can be used to send a message to the console, to an interrupted program in the user’s own interactive task and, for privileged users, to a program in a noninteractive task.
Console (operand TO=*OPERATOR):
This function is offered by the INFORM-OPERATOR command.
Program (operand TO=*PROGRAM):
This function is offered by the INFORM-PROGRAM command (JOB-IDENTIFICATION= *OWN).
Message to a program in a noninteractive task (privileged function):
This function is offered by the INFORM-PROGRAM command (JOB-IDENTIFICATION= *TSN(...) or *MONJV(...)).
Format
| SEND-MSG | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 
 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Return codes
| (SC2) | SC1 | Maincode | Meaning | 
|---|---|---|---|
| 0 | CMD0001 | No error | |
| 1 | 0 | CMD0001 | No action is required because when MSG=*NO is specified no message is sent to the operator | 
| 1 | 1 | NBR0950 | TO=*OPERATOR cannot be specified from a console | 
| 64 | EXC0920 | Specified job ID invalid | |
| 64 | EXC0921 | Command not permitted for an interactive task | |
| 64 | EXC0922 | No program loaded | |
| 64 | EXC0923 | No STXIT interface defined for this event in the specified program | |
| 64 | EXC0924 | No STXIT routine defined for this event in the specified program | |
| 64 | EXC0925 | STXIT routine already activated | |
| 64 | EXC0090 | Insufficient storage space |