Unconfigured Ad Widget

Collapse

Announcement

Collapse
No announcement yet.

monmsg fails to execute command

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • monmsg fails to execute command

    I have a pretty simple CL code that if a certain condition is met, I want to send a break message to a user's workstation. If that user is not signed on , I want to send it to another user.

    If I run from command line, I get error CPF2429. But if I run it from a CL program, the exec (DO) part of my monmsg is ignored.

    What am I missing here?

    SNDBRKMSG MSG(&BRKMSG) TOMSGQ(BILLLAN2)
    MONMSG MSGID(CPF2429) EXEC(DO)
    SNDBRKMSG MSG(&BRKMSG) TOMSGQ(DALEXP1) MSGTYPE(*INFO)
    ENDDO

    When this code is executed, the exec(do) part is skipped over.

  • #2
    Message CPF2429 is not monitorable from the SNDBRKMSG command.

    Here are the monitorable messages:

    *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.

    Dave

    Comment


    • #3
      Originally posted by D.Abramowitz View Post
      Message CPF2429 is not monitorable from the SNDBRKMSG command.

      Here are the monitorable messages:

      *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.

      Dave

      Ahh, now it finally makes sense.

      But how to find the exact message that is causing the error? I DSPJOBLOG, put the cursor on the error, press F1 and get CPF2429 and nothing else. I guess I will monitor for CF2400 and hope for the best.

      Thanks.
      ---Dale

      Comment


      • #4
        monsmg just not working in this instance

        Just posting a follow up.

        Monmsg for cpf2400 did not work for the break message either.

        I ended up using this code:

        RTVCFGSTS CFGD(A10) CFGTYPE(*DEV) STSCDE(&STAT)
        IF COND(&STAT *EQ 60) THEN(DO)


        This tells me if the user is signed on or not and I can take the appropriate action.

        ---Dale

        Comment


        • #5
          For unmonitorable messages, you should be able to monitor for CPF0000 and then use RCVMSG to retrieve specific information about the exception.

          Comment


          • #6
            If the message received is not a monitorable message, specifying CPF2400 or CPF0000 will not do anything!

            Only escape messages may be monitored. The monitorible escape messages for every command is listed in the command help text.

            Dave

            Comment


            • #7
              Originally posted by D.Abramowitz View Post
              Only escape messages may be monitored.

              Dave
              A very minor point, but for completeness notify and status messages can be monitored (in addition to escapes).

              Comment

              Working...
              X