INITIALIZE FIELD

Execution

PERFORM RMP--IF-PANELNAME

Description

This standard run-time 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 run-time function is not the preferred method of initializing fields in RM/Panels. Use the INITIALIZE ALL FIELDS standard run-time function as the primary method to initialize fields/controls. Use INITIALIZE FIELD when only one field/control is to be initialized.

Required Parameters

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.

Returned Values

The default value for each field/control in the panel is stored within panelname.WS.

Additional Usage Notes

  • The panel does not need to be displayed before initializing a field/control.
  • This standard run-time function does not display the field/control on the screen.

RMP--STATUS Values

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.