ADELIA |
|
|
|
|
(I/B) |
|
|
|
|
Warning: This instruction can only be used with Adelia/400.
Section for use
All
Syntax
DEFINE_PARM GuideWord Use Length;NbDecimals
Use |
Þ |
I | O | B |
|
|
|
NbDecimals |
Þ |
Numeric | None |
Description
This instruction is only used in management rules generated under the form of object modules in an object-oriented approach (externalization of management rules) within the Adelia Conception module of Adelia/400.
In this context, all management rules associated with logical entity properties and those associated with the entity itself are grouped and generated (then compiled) into a single object module.
This module (program) and the application then communicate via a message (set of parameters). As a default, the message contains all variables defined by a $ or $$ in the management rule.
The DEFINE_PARM instruction is used to declare an additional variable in case the application and the rule need to exchange data.
Example: return code, option code
The following must be declared:
-
the variable guide word (defined elsewhere in the rule or in the application),
its use (I, O or B, i.e.: input, output or input/output),
its length,
optionally, its number of decimal positions.
This instruction also specifies the use of a variable defined with $ or $$.
The following must then be declared:
-
the field name with $ or $$,
its use (I, O or B).
Example
* Management rule to prompt customers
* (externalized rule in an object-oriented approach)
* Note: P_RETURN_CODE is defined in each application program
*
DEFINE_PARM P_RETURN_CODE B 1
SFTKY $$CODE
P_RETURN_CODE = *BLANK
CALL WDW_CUSTOMER $$CODE P_RETURN_CODE
END_SFTKY