Previous Topic: Defining Function Parameters

Next Topic: Non-unique Sequence Numbers

Defining Parameters with the Edit Function Parameters Panel

The Edit Function Parameters panel defines the parameters that are passed to the function by the calling function. How the parameter is used in the called function depends on the called function’s type or the processing specified by that function. Parameters can either be defined as a list of specific fields or as selections of fields from a list of access paths, arrays, or files.

To access the Edit Function Parameters panel

  1. View the functions. From the Edit Database Relations panel, type F next to the selected file, and then press Enter.

    The Edit Functions panel appears.

  2. View the parameters, type P next to the selected function, and then press Enter.

    The Edit Function Parameters panel appears:

    Parameters with the Edit Function Parameters Panel

Use one of the following methods to specify the parameters:

To specify an individual field

  1. Type *FIELD or *F in the File/*FIELD column.
  2. Type the name of the field in the Access path/Field/Array column.

    By entering ? this field can be used for prompting.

    The Passed field defaults to FLD.

To specify a set of fields from a file, access path, or array:

  1. Type the name of the file in the File/*FIELD column. For arrays, type *Arrays (or *A).

    By entering ? this field can be used for prompting. A * defaults to the name of the file over which the function is built.

  2. Type the name of the access path or array name in the Access path/Field/Array column.

    By entering ? this field can be used for prompting.

    Note: If you use *NONE as the access path then all fields, actual and virtual, are associated with the file are available for selection. This removes the need to tie the parameter entry to a specific access path and can reduce the impact of a change to the definition. This approach is particularly relevant when a subset of fields is selected.

  3. Type the value that the field is passed as:
    FLD

    Each specified field is passed as an individual parameter. This must be specified for *FIELD or *NONE parameter lines.

    RCD

    A single parameter with the length of the specified access path is passed. The parameter contains space for all the fields associated with the access path, which can individually be specified as parameters.

    KEY

    A single parameter with the length of the combined keys of the specified access path is passed. The parameter contains space for all the key fields that can be individually specified as parameters.

  4. Enter Y or leave a blank value for the A (Pass as Array) field.

    The following situations apply when using the A field:

  5. Define the specific fields that are to be passed from the file, access path, or array on the Edit Function Parameter Details panel.