This standard runtime function initializes a single field/control or field/control occurrence to the default value specified in the panel. It is useful because the default value can be modified with the Panel Editor and does not require program changes or recompilation.
Note This standard runtime function is not the preferred method of initializing fields in RM/Panels. Use the INITIALIZE ALL FIELDS standard runtime function as the primary method to initialize fields/controls. Use INITIALIZE FIELD when only one field/control is to be initialized.
The program must set the name of the field/control to be entered in RMP--FIELD-NAME. If the field/control occurs more than once, the occurrence number must be specified in RMP--FIELD-OCCUR. The occurrence numbers are equivalent to COBOL subscripts and begin at 1.
The default value for each field/control in the panel is stored within panelname.WS.
Status value | Description |
---|---|
0 | The function executed successfully. |
1 | The field/control name is invalid. |
2 | The occurrence number is invalid. |
5 | The panel is not in this library |
6 | The library does not exist. |
14 | A COBOL input/output error was encountered on the panel library during execution of this function. To determine the exact nature of the I/O error, use the C$RERR subprogram. |