ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

How to Use MSGF in RPGLE

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

  • How to Use MSGF in RPGLE

    Hi EveryOne,

    I am facing problem while displaying messages by using MSGF in through RPGLE. Can you Please tell me how we can use MSGF in RPGLE.

    Thanks & Regards,
    Pradeep Kumar
    Pradeep

  • #2
    Re: How to Use MSGF in RPGLE

    look at the APIs in the infocenter http://publib.boulder.ibm.com/infoce...c/apis/mh1.htm
    I'm not anti-social, I just don't like people -Tommy Holden

    Comment


    • #3
      Re: How to Use MSGF in RPGLE

      ... or to make it easy:
      1. Copy the message file into a Spoolfile using the CL command DSPMSGD.
      2. Copy the spoolfile into a physical file by using the CL Command CPYSPLF.
      3. Read the generated physical file with either native I/O or embedded SQL.


      Birgitta

      Comment


      • #4
        Re: How to Use MSGF in RPGLE

        Hi,
        Thanks for the post. But, I want to send a message to the display screen when some validation is not satisfied. I want to pick this message from MSGF. Can you please suggest me how i can pick the message by using Message ID. Shall I have to use any Indicators for this.

        Thanks & Regards,
        Pradeep Kumar.
        Pradeep

        Comment


        • #5
          Re: How to Use MSGF in RPGLE

          The easiest way to retrieve a message out of a message file is to use the CL command RTVMSG.

          Generate a small CL-Programm that receives the message Id and returns the message text, which will be called from your RPG program.
          In your RPG program you can move the message text for example into a message line that was defined in your DDS and switch the appropriate indicator *ON. Or use the CL command SNDPGMMSG (or the appropriate API) to send the message to an external message queue.

          Birgitta

          Comment


          • #6
            Re: How to Use MSGF in RPGLE

            I know its old....but I do have an index page on this site




            jamie
            All my answers were extracted from the "Big Dummy's Guide to the As400"
            and I take no responsibility for any of them.

            www.code400.com

            Comment


            • #7
              Re: How to Use MSGF in RPGLE

              Ok sure.. I will try by using SNDPGMMSG. Will be back to u once the problem resolved.
              Pradeep

              Comment


              • #8
                Re: How to Use MSGF in RPGLE

                Hi,

                Give ur msgid in ERRMSGID and spcify an indicator. Turn on that ind when validation fails.

                Comment


                • #9
                  Re: How to Use MSGF in RPGLE

                  did you even look at my example??
                  Its all there.

                  Jamie
                  All my answers were extracted from the "Big Dummy's Guide to the As400"
                  and I take no responsibility for any of them.

                  www.code400.com

                  Comment


                  • #10
                    Re: How to Use MSGF in RPGLE

                    Originally posted by jamief View Post
                    did you even look at my example??
                    Its all there.

                    Jamie
                    What example? There are examples on this site? The next thing you'll be telling me is that there is a "search" function. You guys think we will believe anything...

                    Comment


                    • #11
                      Re: How to Use MSGF in RPGLE

                      The search function is now off limits to everyone except those not needing it.....

                      Jamie
                      All my answers were extracted from the "Big Dummy's Guide to the As400"
                      and I take no responsibility for any of them.

                      www.code400.com

                      Comment

                      Working...
                      X