Jobs submitted on AS400 can remain in Message Wait status. This depends from the occurrence of an
unexpected event (e. g. file not found), in case the programmer in his code has allowed the trapping of this kind of events. This program can remain in MSGW status undefinitely, unless specific action is done by a user.
This program call
CALL PGM(POSDEV/CLP_MSGW) PARM('AUTOMIC001') is executed as a task by a V10 AS400 agent on this sytem. This program is coded to throw an exception and to remain in Message Wait (MSGW) status.
This task has been executed and will remain in
Running Status indefinitely.
In the Active Job Panel (WRKACTJOB) we see that the job in status MSGW:
Check the User’s
Message Queue:
DSPMSG MSGQ(UNIVADM), the
System informs the
User that a message needing a reply is waiting in the QSYSOPR Message Queue (please note that UNIVADM is the user in LOGIN object assigned in One Automation to this job):
Verify the Message
Queue of QSYSOPR : DSPMSG
MSGQ(QSYSOPR).
A message needing a reply is present.
https://us.v-cdn.net/5019921/uploads/editor/6n/p1mk2odae9gd.png" width="615">
The Reply Menu offers 4 different choices, C or 'Cancel', R for 'Replay', D for a 'Dump Creation' and I for 'Ignore'.
https://us.v-cdn.net/5019921/uploads/editor/2e/yi7jc4o28k3l.png" width="514">
Type ‘C’ for Cancel, the Job will then
continue its life
and ends with
ENDED_NOT_OK
Type
‘I’ for
Ignore, the Job will
then
continue its
life and ends with ENDED_OK
Hint: If you want to check One Automation for jobs in MSGW status (Version 10) run the coming Query.
https://us.v-cdn.net/5019921/uploads/editor/0h/1nb5u3pwxlkb.png" width="262">
Finally: Even if it might appear as unusual to beginner on AS400, this behavior is exactly the same of what we experience on a Windows system when the program stops its execution and throws an message box, informing that an unexpected event occured and asking if the program should continue or not.