Error Detection

Every RM/Panels standard runtime function sets a status value. This value is contained in the variable RMP--STATUS in master copy file RMPANELS.WS. The possible status values and error conditions are as follows:

Status value Description
0 The function executed successfully.
1 The field/control name is invalid.
2 The occurrence number is invalid.
3 The function number is invalid.
4 The attribute is invalid.
5 The panel is not in this library
6 The library does not exist.
7 The library configuration is invalid.
8 The panel does not contain any fields/controls.
9 The panel contains no input fields/controls.
10 The panel is not displayed.
11 The palette number is invalid.
12 Help message is not defined.
13 Error message is not defined.
14 A COBOL input/output error was encountered on the panel library during execution of this function. user's guide
15 The field/control is disabled.
16 A window error has occurred.
20 The menu command name is invalid.
22 There is no pulldown menu on this panel.
1001 API parameter is missing.
1002 API message is not defined.
1003 API pulldown option is invalid.
1004 API pulldown option is uncheckable.

The following condition-names are declared in RMPANELS.WS to help in interpreting errors.

05 RMP--STATUS PIC 9(4).
   88 RMP--VALID-FUNCTION        VALUE 0.
   88 RMP--FIELD-INVALID         VALUE 1.
   88 RMP--OCCUR-INVALID         VALUE 2.
   88 RMP--FUNCTION-INVALID      VALUE 3.
   88 RMP--ATTRIBUTE-INVALID     VALUE 4.
   88 RMP--PANEL-INVALID         VALUE 5.
   88 RMP--LIBRARY-INVALID       VALUE 6.
   88 RMP--CONFIG-INVALID        VALUE 7.
   88 RMP--NO-FIELDS             VALUE 8.
   88 RMP--NO-INPUT-FIELDS       VALUE 9.
   88 RMP--PANEL-NOT-DISPLAYED   VALUE 10.
   88 RMP--PALETTE-INVALID       VALUE 11.
   88 RMP--NO-HELP-DEFINED       VALUE 12.
   88 RMP--NO-ERROR-DEFINED      VALUE 13.
   88 RMP--IO-ERROR              VALUE 14.
   88 RMP--CONTROL-DISABLED      VALUE 15.
   88 RMP--WINDOW-ERROR          VALUE 16.
   88 RMP--MENU-COMMAND-INVALID  VALUE 20.
   88 RMP--NO-PULLDOWN           VALUE 22.
   88 RMP--API-PARAM-MISSING     VALUE 1001.
   88 RMP--API-MSG-NOT-DEFINED   VALUE 1002.
   88 RMP--API-PD-OPTION-INVALID VALUE 1003.
   88 RMP--API-UNCHECKABLE       VALUE 1004.