2.8.4 3GL Parameters
Optional.
Specify additional parameters, if any, to be passed to the program.
Additional parameters may only be used when a 3GL program is called, and cannot be used when a validation function is called.
Rules
Additional parameters may be:
- An alphanumeric literal (in quotes) such as 'NSW', 'BALMAIN'.
- A numeric literal such as 1, 14.23, -1.141217.
- Another column name such as CUSTNO, INVNUM, etc.
- A system variable name such as *BLANKS, *ZERO, *DATE or any other system variable defined at your installation.
- A process parameter such as *UP01, *UP02, etc.
- For alphanumeric columns (alpha literals, alpha columns, alpha system variables or alpha process parameters), the parameter is passed as alpha (256) with the parameter value left aligned into the 256 byte parameter.
- For numeric columns (numeric literals, numeric columns, numeric system variables or numeric process parameters), the parameter is passed as decimal 15 with the same number of decimal positions as the parameter value. For numeric literals, this means the same number of decimal positions as specified in the literal (e.g.: 1.12 will be passed as decimal 15,2. 7.12345 will be passed as decimal 15,5. 143 will be passed as decimal 15,0. etc.). For all other types of numeric parameters, this means the same number of decimal positions as their respective definitions.
- The type and length of the parameter(s) passed depends upon the type and length of the parameter value supplied.
- As with the standard parameters, the actual value is passed in a work area so it is not possible to change the value of a column by changing the parameter value in the validation program.
- LANSA does not check that the 3GL program being called has the correct parameter list. This is your responsibility.
All 3GL programs called as part of a complex logic rule must have a least 3 standard parameters. These are:
Name
|
Description
|
Return code
|
Alphanumeric length 1. Returned by the program as '1' (good return) or '0' (bad return). Used by the program to indicate to LANSA the success or failure of the complex logic rule.
|
Name of column
|
Alphanumeric length 10. Passed to the program. Contains the name (as opposed to the value) of the column that is passed in the third parameter.
|
Value of column
|
Length and type depend upon the repository definition of the column. Alphanumeric columns are passed with same type and length as their repository definition. All numeric columns (type P or S) are passed as decimal (type P) and the same length and number of decimal positions as their repository definition. Note that the value of the column is passed in a work area, thus it is not possible to change the value of the column by changing the value of the parameter in the validation program.
|
|
Also See
2.8.3 Program to Call: 3GL Program