IBM i Message Waiting light stays on: DSPMSG and delivery modes
The 5250 Message Waiting indicator means a message is on your IBM i queue. Run DSPMSG in the session that has the light, then remove messages with F11 or F16.
The Message Waiting indicator is the light on a real 5250 terminal, and an indicator in an emulator's status line. IBM i turns it on when a message arrives on a message queue that is in notify mode for your job, and also in break mode when the system shows the message for you. It means "you have a message"; nothing is wrong with the session.
The host turns the indicator on and off. The 5250 Write to Display command has one bit that sets it on and another that sets it off, so the terminal or emulator cannot clear it by itself. The fix is on the host: read the messages in the session that shows the indicator.
Read the messages
On any command line, in the session where the indicator is on:
DSPMSG
With no parameters, DSPMSG first shows the workstation's message queue if it has messages, then your user profile's message queue. WRKMSG shows the same messages. To go straight to one queue, use DSPMSG MSGQ(*USRPRF) or DSPMSG MSGQ(*WRKSTN).
On the Display Messages screen:
- Put the cursor on a message and press
F1for its full text and message ID. - If a message needs a reply, type it on the reply line under the message and press
Enter. F11removes the message at the cursor.F16removes all messages except inquiry messages that still need a reply.F13removes all messages, including ones that still need a reply. Use it only if you know none of them matter.
It stays on, or DSPMSG will not remove anything
A message queue can be in notify or break mode for one job at a time. That job holds the queue. If you are signed on in two sessions, only the session that holds your user profile queue gets the indicator. IBM's DSPMSG documentation says that when the queue is in notify or break mode for another job, DSPMSG lets you see the messages but not remove them. Run DSPMSG in the session that shows the light, usually the one you signed on to first.
The same lock explains CPF2451 Message queue ... is allocated to another job when you try to change the queue from a second session.
Choose how messages arrive
The delivery mode decides what happens when a message arrives. Change it for the current job with CHGMSGQ:
CHGMSGQ MSGQ(*USRPRF) DLVRY(*BREAK)
*NOTIFY: the indicator turns on and the alarm sounds, if there is one. Your work is not interrupted.*BREAK: the job is interrupted and the message is shown at once (unless a break-handling program is named). This is the mode to use if you keep missing messages.*HOLD: messages wait on the queue with no signal until you run DSPMSG.*DFT: inquiry messages get their default reply, and other messages are not kept (except on QSYSOPR).
SEV sets the lowest severity that interrupts you or turns on the indicator. Messages below it are still kept and shown by DSPMSG. The workstation message queue is set to notify mode automatically at sign-on. A delivery mode set with CHGMSGQ lasts only while your job holds the queue. To make it the default for your user profile queue, set DLVRY in the user profile, for example CHGUSRPRF USRPRF(USER1) DLVRY(*BREAK), which needs authority to change that profile. It takes effect the next time you sign on.
Related
- Signing on to IBM i
- IBM i CL basics
- Why IBM i refuses a second sign-on (QLMTDEVSSN)
- The IBM i System Request menu
- How a 5250 terminal works
- IBM i job in MSGW status: find the message and reply to it
Sources
- IBM i 7.6: Display Messages (DSPMSG)
- IBM i 7.6: Change Message Queue (CHGMSGQ)
- IBM i 7.5: user profile Delivery (DLVRY) field
- IBM Support: Primer on Message Analysis (Display Messages screen and its function keys)
- IBM 5250 Information Display System Functions Reference Manual, SA21-9247-6: Write to Display control character, Message Waiting indicator bits (archive copy)