205 pts.
 what mon msg would i use in my CLP when checking for modules under my SBS?
I have a clp that checks modules/jobs that run under my subsystems.  I'm not sure what mon message it is giving me since none is shown if the job is not active. Only thing that is shown to me is the wrkactjob screen with (No active jobs to display). I would like for when this event occurs, to send me a message. I have everything in place, script wise, (I THINK) but dont know what mon msg to have it look for so that it will skip over the (**other code**) and alert me to the non active mod.

MOD1:   WRKACTJOB  SBS(mysubsystem) JOB(module)                                   MONMSG     MSGID(????????) EXEC(DO)                                                                                                                (**other code**)          

ENDDO 

            SNDMSG  MSG('module is down') +

                        TOUSR(*****) MSGTYPE(*INQ) RPYMSGQ(*****) 

MOD2:                                                     



Software/Hardware used:
as400
ASKED: January 29, 2011  6:58 AM
UPDATED: January 31, 2011  8:16 PM

Answer Wiki:
Ops, I figured it out on my own. I will used dspjob and not wrkactjob, then monitor for mon msg cpi1157, cpf1069 and cpa0701. I would like to thank myself.
Last Wiki Answer Submitted:  January 29, 2011  9:15 am  by  lotofbad   205 pts.
All Answer Wiki Contributors:  lotofbad   205 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

You can always determine what messages can be monitored for a command by prompting the command, pressing F1=Help, then pressing F2=Extended help. Scroll to the bottom of the extended help to see the list of possible error messages.

For WRKACTJOB, you should see a list like this:

 Error messages for WRKACTJOB

     *ESCAPE Messages
     CPF1093     Override of file device type not valid.
     CPF9845     Error occurred while opening file &1.
     CPF9846     Error while processing file &1 in library &2.
     CPF9847     Error occurred while closing file &1 in library &2.
     CPF9850     Override of printer file &1 not allowed.
     CPF9851     Overflow value for file &1 in &2 too small.
     CPF9871     Error occurred while processing.

As you discovered, the WRKACTJOB command wasn’t appropriate. But you could do some additional research if the messages aren’t clear by running, for example, DSPMSGD CPF9871 to check the full text of messages that might seem relevant.

Tom

 108,330 pts.