Overriding the Dialog automatic error messages

You can override the automatically generated error messages by entering new messages in the -GE Lines of a Screen.

About this task

To declare new error labels, you must enter two types of lines:
  • An F type for a Data Element call or an S type for a Segment call.
  • A U type for an error message. Several U lines can follow F or S lines.

A C type is also possible for comments. It is attached to the error message that directly precedes it.

For Data Elements, you can specify the following line types:
  • F (Data Element call). You must select the Data Element in the Link column.

    You can click the Link column and click the button that is displayed in this column. It opens a selection wizard with all the available instances. Select the appropriate instance and click OK. The instance is then displayed in the Link column.

    You can also enter the name in the Link column. Place the cursor in the column and enter the name directly. To make the input easier, you can open a content assist wizard by clicking Ctrl and the space bar simultaneously. If you start entering a name, the content assist displays the instances that start with this input. If you enter the name of an instance that does not exist and if you validate, the input is discarded.

  • U (error message). You must conform to the following input format in the Description column.
    Table 1. Positions in the Description column
    Positions Contents
    1 - 3 Blank
    4 Number of the error type to be replaced for the Data Element:
    • 2 for an invalid absence
    • 3 for an invalid presence
    • 4 for an erroneous class
    • 5 for an erroneous value
    5 Blank
    6 Error message
    Figure 1. Sample of an error message on a Data Element
      F NUCLI                                           
      U    2 CLIENT NUMBER IS REQUIRED                  
      U    5 CLIENT NUMBER MUST BE > 10001              
  • C (comments on the error message). You must conform to the following input format in the Description column.
    Table 2. Positions in the Description column
    Positions Contents
    1 - 5 Blank
    6 Comment
For Segments, you can specify the following line types:
  • S (Segment call).

    You can enter the Segment name directly in the Description column.

    You can also select it in the Link column in one of the following ways:
    • Click the Link column and click the button that is displayed in this column. It opens a selection wizard with all the available Segments. Select a Segment and click OK.
    • Place the cursor in the column and enter the name directly. To make the input easier, you can open a content assist wizard by clicking Ctrl and the space bar simultaneously. If you start entering a name, the content assist displays the instances that start with this input. If you enter the name of an instance that does not exist and if you validate, the input is discarded.
    When the Segment is selected in the Link column, it is automatically copied out to the Description column, where you can complement the input.
    Table 3. Positions in the Description column
    Positions Contents
    1 - 4 Segment
    5 Blank
    6 Category code (required if the same Segment is used in several categories):
    • Blank for the Screen-top category
    • R for the repetitive category
    • Z for the Screen-bottom category
    7 Segment rank in the category (required if the same Segment is used several times in a category).
  • U (error message). You must conform to the following input format in the Description column.
    Table 4. Positions in the Description column
    Positions Contents
    1 Use category of the Segment:
    • F for reception
    • G for display
    2 - 3 Blank
    4 Error type code
    • 8 for a record found (invalid creation)
    • 9 for a record not found (invalid modification or end of file for example).
    5 Blank
    6 Error message
    Figure 2. Sample of an error message on a Segment
         S CD10                                            
         U F  8 PRODUCT REFERENCE NUMBER ALREADY ASSIGNED 
         U G  9 END OF SEARCH FOR THIS STATE                          
    Notes: You can replace an automatic error message by entering a single line in the -GE Lines. On a U line, the rank of a Data Element in the -CE Lines must be entered in positions 1 - 3. The rank of a Segment in the -CS Lines must be entered in positions 2 - 3.

    The rest of the Description column is entered as it is indicated here. This method implies specifying the error codes again when a Data Element is added to or deleted from the-CE Lines, or when a Segment is added to or deleted from the -CS Lines.

  • C (comments on the error message). You must conform to the following input format in the Description column.
    Table 5. Positions in the Description column
    Positions Contents
    1 - 5 Blank
    6 Comment

What to do next

You must then generate the error messages. To do so, you must create an Error Message instance and associate it with the Dialog. The Error Message instance groups the generation options of the error messages for this Dialog. You must then generate the Error Message instance.


Feedback