Working with Messages

 3 Replies
 0 Subscribed to this topic
 17 Subscribed to this forum
Sort:
Author
Messages
BrianM
Advanced Member
Posts: 41
Advanced Member
    I have created a clone of PA340 and pretty much gutted out what I didn't need.  When I go into pgmdef and go into the message definition for this program I got rid of the messages I didn't need.  My question is this . . . .  the messages that are left are all the messages that were with the original PA340.  Can I just modify the messages OR do I need to leave the existing messages as they are, then create a new message number and make my changes there?  I don't want to cause any problems with any other programs for example that use message #118.  Thanks in advance for your help!
    BTM
    Woozy
    Veteran Member
    Posts: 709
    Veteran Member
      Hi Brian,

      If I'm not mistaken, when you clone a program it also clones all the messages into a new recordset under the clone's name.  To confirm this, go into pgmdef for your clone and select Messages.  The "Category" field at the top should show with the name of your clone rather than PA340.  Also, within the code, any references to PA340 (such as calls to msgmnt) should be changed to your new clone name.

      As a suggestion, you should search through the code in your clone and make sure that any value passed in to CRT-ERROR-NBR has a matching record in the messages.  If it doesn't, it will throw an error.

      Good Luck.

      Kelly
      Kelly Meade
      J. R. Simplot Company
      Boise, ID
      jaherb
      Veteran Member
      Posts: 164
      Veteran Member
        Brian... if you stay in the "Category" of your new program code, you will be fine with removing/replacing unwanted error messages... however you need to make sure you stay within that category. Many times, programs are connected to other categories via pdlib members being called. Those are the ones you want to avoid modifying. When in doubt however and you are worried about this, Lawson always recommends that you start with HIGH order numbers, such as "999" as not to interfere with Lawson delivered messages.
        BrianM
        Advanced Member
        Posts: 41
        Advanced Member
          Thanks for your help!
          BTM