Pascal_Osthus-bugat_1753

AS400 -- how to manage Jobs that remains in MSGW

Discussion created by Pascal_Osthus-bugat_1753 on Mar 31, 2017
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.

tfv40lpbbzof.png

In the Active Job Panel (WRKACTJOB) we see that the job in status MSGW:

cbbbttlvctwu.png


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):

ddhztq55vhps.png

Verify the Message Queue of QSYSOPR :  DSPMSG MSGQ(QSYSOPR). A message needing a reply is present.


p1mk2odae9gd.png

Option 5 allow to open the Message and to provide a Reply, which will decide of the End Status of the Job

tqeknyc8k1st.png

The Reply Menu offers 4 different choices, C or 'Cancel', R for 'Replay', D for a 'Dump Creation' and I for 'Ignore'.

yi7jc4o28k3l.png

Type ‘C’ for Cancel, the Job will then continue its life and ends with ENDED_NOT_OK

gb9pygpn1rgq.png

Type ‘I’ for Ignore, the Job will then continue its life and ends with ENDED_OK

vx5k619r8bj0.png

Hint: If you want to check One Automation for jobs in MSGW status (Version 10) run the coming Query.

1nb5u3pwxlkb.png

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.






Outcomes