

Modifying Function Parameters › Defining Function Parameters › Defining Parameters with the Edit Function Parameters Panel
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
- 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.
- View the parameters, type P next to the selected function, and then press Enter.
The Edit Function Parameters panel appears:

Use one of the following methods to specify the parameters:
To specify an individual field
- Type *FIELD or *F in the File/*FIELD column.
- 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:
- 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.
- 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.
- 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.
- Enter Y or leave a blank value for the A (Pass as Array) field.
The following situations apply when using the A field:
- If the function is not EXCEXTFUN or EXCUSRPGM, the field is not available.
- The new ‘A’ (Pass as Array) field is available for all EXCEXTFUN and EXCUSRPGM parameters. However, if Y is specified for a parameter that is not an array based on the *Arrays file, or when the parameter is passed as FLD, then an error message is sent.
- Y is only valid when the parameter is an array based on the *Arrays file, and only when the parameter is passed as RCD or KEY.
- When you model in the action diagram of function A a call to function B, if a parameter is passed as an array on A it must be passed as an array on B.
- No fields can be dropped on a parameter being passed as an array.
- Though the usages of the subfields on a parameter passed as an array can be mixed, the usages must be compatible, such that the calling function can call the called function
- Define the specific fields that are to be passed from the file, access path, or array on the Edit Function Parameter Details panel.
- For both *FIELD and other parameter entries, define the role and usage of the parameter.
- You can adjust the sequence of the entries by keying sequence numbers on each parameter line.
Copyright © 2014 CA.
All rights reserved.
 
|
|