Printing a Parameter Error

The following steps define how to print a parameter error message when a report parameter does not pass an edit.

To print a parameter error

  1. Move the message category to CRT-ERROR-CAT. This line is optional. CRT-ERROR-CAT defaults to the program code if you do not move a value to it.
  2. Move the field that is in error to CRT-ERR-VAR1.
  3. Move the desired message number from the system message file to CRT-ERROR-NBR. For more information, see Doc for Developers: Application Development Workbench.
  4. Use one of the following Application Program Interface (API) routines.
    Routine Action
    780-PRINT-ERROR-MSG Prints the message and ends the program.
    780-PRINT-ERROR Displays the message on the operator console, prints the message in the standard error file, and ends the program.
    780-PRINT-MSG Prints the message but does not end the program.
    780-DISPLAY-MSG Sends the message to the job log, but does not print the message or end the program.

    These routines are described in Doc for Developers: Lawson 4GL Application Program Interfaces.