User Exit Guidelines

Main Steps to Create a User Exit

  1. Copy the user exit template source member from SAMPLESRC to your source file. Give the source member copy a name that follows the naming conventions for user exit programs: xxxxB, xxxxM, or xxxxE—depending on the type of user exit you are creating.

    Note: Templates for the xxxxM and xxxxE types are not currently available, but you can use the PR15B template for those types as well.
  2. Using PDM, edit the source member. Follow the instructions in the template, being sure to replace program and field references so that they are appropriate for your source member. For example, the template file may contain field names prefixed with F1 or F1FN, but if you are programming edits for fields on a screen other than the first one, then any instances of F1 or F1FN must be replaced by F2, F2FN, or whatever is appropriate.

  3. If necessary, use the Message Maintenance utility (msgmnt) to add new messages to the Lawson application (calling) program. Begin user-exit messages with sequence number 998 and decrement by 1 to prevent conflict with normal program message numbers that begin with 1 and increment by 1. Do not use message number 999. Message 999 is reserved.

  4. Compile the user exit source member into your modification library (for example, LAWMODLIB). Add the modification library to your signon library list and to LAWENVM.

  5. Test the application program that calls your user exit.