Send Break Message (SNDBRKMSG)
时间:2016-10-14 ┊ 阅读:5,358 次 ┊ 标签: 经验 , 系统 , 命令
在古老的as/400上一直保留着一个古老的通讯工具,sndmsg,让用户相互在as/400上轻松的发送消息沟通,不过用命令sndmsg发出去消息之后,对方需要dspmsg命令才能看到我们的消息,有时候我们可能一个强制弹窗的msg发给对方,它会在对方的窗口上直接弹出来,这个就是sndbrkmsg,顾名思义,发送中断的消息。
用sndbrkmsg发送后,对方可以立即收到,这样有利于及时的把消息告知给对方。这个命令十分有用,尤其是我们跨国team合作时,发短信收费还慢,而这时对方的im可能又不在线,不过我们发现他登录在了400系统里,就可以用这个命令打扰一下他啦。
消息有两种类型:*INFO, *INQ
*INFO
An information only message is sent in break mode.
以中断模式发送一个信息类型的消息
*INQ
An inquiry message is sent in break mode; the work station
receiving the message is expected to reply to it. An inquiry
message cannot be sent to multiple queues with only one command.
发送一个询问类型的消息,收到的工作站需要对消息进行回复。当然,这类消息是不能一次发给多个消息队列,就是不能同时发送给多个人,否则会收到error:Message queue parameter is not valid.
看一下实例吧:
给自己发送一个信息类型的消息
强制弹出来了吧!
给自己发送一个需要回答的消息
强制弹出并需要回复
还有个情况时,系统需要维护工作时,需要通知所有在400系统里的用户临时的退出系统,我们可以群发一个消息,以防有的人看不到我们就可以用这个命令发送一个中断消息给每个人,很是方便。
英文介绍:
5770SS1 V7R1M0 100423 HELP 14/10/16 22:47:55 Page 1
Send Break Message - Help
The Send Break Message (SNDBRKMSG) command is used to send an
immediate message to one or more work station message queues. An
immediate message is a message that is not predefined and is not
stored in a message file. The command causes the message to be
delivered always in break mode. The DSPMSG display is shown for
the message when it is received, regardless of the setting of the
message queue's delivery mode, severity, and break handling
program. However, the message may not be displayed in some cases,
depending on the BRKMSG job attribute. This command is primarily
intended for the system operator's use.
Restrictions:
1. This command can be used to send break messages to work
station message queues only.
2. This command cannot send inquiry messages (specified by
MSGTYPE(INQ)) to multiple work stations.
Message text (MSG)
Specifies the immediate message that is being sent. The text must
be enclosed in apostrophes if it contains blanks or other special
characters. A maximum of 512 characters can be specified.
Coded Character Set Identifier (CCSID) Considerations
The text supplied for the MSG parameter is assumed to be in the
CCSID of the job running this command unless a coded character set
identifier is supplied for the CCSID parameter. For more
information about the message handler and its use of CCSIDs, see
the i5/OS globalization topic collection in the IBM i Information
Center at http://www.ibm.com/systems/i/infocenter/.
This is a required parameter.
To work station message queue (TOMSGQ)
Specifies one or more work station message queues to which the
break message is sent. Only the names of work station message
queues can be specified and only *LIBL or QSYS can be specified for
the library value.
Single values
*ALLWS
The break message is sent to all work station and Personal
Computer message queues. *ALLWS cannot be specified if *INQ is
specified for the Message type (MSGTYPE) parameter.
Qualifier 1: To work station message queue
message-queue-name
Specify the name of the message queue to which the break
message is to be sent.
Qualifier 2: Library
*LIBL
_____
Page 2
All libraries in the library list for the current thread are
searched until the first match is found.
library-name
Specify the library where the message queue is located.
Message type (MSGTYPE)
Specifies the type of message that is sent in break mode. Only
informational or inquiry message types can be specified. Inquiry
messages may require a response.
*INFO
An information only message is sent in break mode.
*INQ
An inquiry message is sent in break mode; the work station
receiving the message is expected to reply to it. An inquiry
message cannot be sent to multiple queues with only one
command.
Message queue to get reply (RPYMSGQ)
Specifies, only if an inquiry message is sent, the message queue
that the work station user's reply is sent to.
Qualifier 1: Message queue to get reply
QSYSOPR
The replies to the break message are sent to the system
operator's message queue, QSYSOPR.
message-queue-name
Specify the name of the message queue to which a reply to the
break message is sent. Only a user or work station message
queue can be specified.
Qualifier 2: Library
*LIBL
All libraries in the library list for the current thread are
searched until the first match is found.
library-name
Specify the library where the message queue is located.
Coded character set ID (CCSID)
Specifies the coded character set identifier (CCSID) that the
specified message text is in. The text supplied by the MSG
parameter is assumed to be in the CCSID supplied by this parameter.
For more information about the message handler and its use of
CCSIDs, see the i5/OS globalization topic collection in the IBM i
Information Center at http://www.ibm.com/systems/i/infocenter/.
*JOB
The message text is assumed to be in the CCSID of the job
running this command.
Page 3
*HEX
The message text is not converted. CCSID 65535 is used.
coded-character-set-identifier
Specify a valid CCSID in which you want your message text to be
considered in. Valid values range from 1 through 65535. See
the Globalization information in the iSeries Information Center
at http://www.ibm.com/eserver/iseries/infocenter for a list of
valid CCSID values. This command will validate the CCSID.
Examples for SNDBRKMSG
Example 1: Sending a Message
SNDBRKMSG MSG('Inventory application shuts down at 4:00 PM.')
This command sends the message 'The inventory application shuts
down at 4:00 pm today.' to all work station message queues. If the
work station is signed on, the message will be delivered in break
mode regardless of the delivery attribute setting of those message
queues. The message is also added to the work station message
queues of those work stations that are not signed on.
Example 2: Sending an Immediate Message
SNDBRKMSG MSG('Your printed output is ready.')
TOMSGQ(GEORGEMSGQ)
This example shows a typical use of the SNDBRKMSG command by the
system operator to send an immediate message to a work station
user.
Error messages for SNDBRKMSG
*ESCAPE_Messages
CPF2428 Message queue parameter is not valid.
CPF2469 Error occurred when sending message&1.
CPF247E CCSID &1 is not valid.
CPF9838 User profile storage limit exceeded.
- E N D O F L I S T I N G * * * * *