sponsored links



No announcement yet.

Rcvmsg info in the calling program

  • Filter
  • Time
  • Show
Clear All
new posts

  • Rcvmsg info in the calling program

    Hi ,
    I am calling a program.which submit a job which Does a savlibbrm .Then i do rcvmsg *comp into my message queue to receive completion message of the job .I would like to capture the info message CPI6705 to retrieve the vol,seq number in the same above way. However the messages are listed in sbmjob job log and I am not sure to which message q it goes.I have checked my usrprf, qsysopr, workstation ,and my message queue but nothing in there.Can any one help

  • #2
    You can't with a RCVMSG as that only retrieves messages from your jobs message queue and you have submitted the save so it is running in a different job.
    If the save job creates a joblog, you could copy it to a PF and read the PF for the messages.


    • #3
      Hi John , I have been able to receive completion messages from the submitted job into my calling program using rcvmsg followed by sndpgmmsg to retrieve the job details, so that I can check for their completion.For this I have However created a new message queue and submitted job into the mq. the info messages aren't coming though.


      • #4
        I'm assuming you are submitting your job with the message queue parameter pointing to the message queue that you created [SBMJOB JOB(xxxx) MSGQ(your_message_queue)]. That parameter only controls where the completion message of the job goes, not all of the messages generated by the job. From the help text:

        Specifies the message queue to which a completion message is sent when the submitted job has completed running, either normally or abnormally.
        If you want to get a different specific message from the job, you'll have to take john.sev99's suggestion or perhaps you could set up a watch for the message and transfer it you your message queue when it occurs [STRWCH SSNID(*GEN) WCHPGM(your_watch_program) WCHMSG((CPI6705))].