ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Monmsg

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

  • Monmsg

    What is the MONMSG equivalent in COBOL.
    I execute a command from cobol using QCMDEXC API but not sure if the command was executed succesfully. Hos do i check this ...something like MONMSG.
    Thanks
    Sudarshan

  • #2
    Re: Monmsg

    That is a downside to using QCMDEXC. I don't think you can.

    I read an article about using the API QCAPCMD instead, but I've never done that myself. I do call a small CL program to execute command when I need to monitor for specific errors, passing back the info and then process accordingly in the CBL program.

    Melissa

    Comment


    • #3
      Re: Monmsg

      I agree with Melissa, its much easier to call a CL program, pass it any necessary parameters along with a return code and then process the results from within your COBOL program.

      Terry

      Comment


      • #4
        Re: Monmsg

        Cl is what i use in case i need a return code...but just thought why should i include few more objects to my distribution list.

        No other solutions?
        Thanks
        Sudarshan

        Comment


        • #5
          Re: Monmsg

          No other solutions?
          Melissa's recommendation to use QCAPCMD API is the only alternative that I'm aware of. Here is a link to an example:



          Personally, I think the CL call method is the most elegant because it provides far more flexibility

          Terry

          Comment


          • #6
            Re: Monmsg

            For what it's worth, the article I referred to earlier is at
            http://www.mcpressonline.com/tips-te...r-qcmdexc.html

            Like I said, tho, I've never used it, so I'm not any help to you.

            Comment

            Working...
            X