Making Multiple Final Assignments
You can make multiple assignments within a single custom statement, but you need to be extremely careful, as these assigned values will remain fixed throughout the rest of the calculation.
To make multiple final assignments, simply add the additional assignment clauses. For example, you can set up custom statement XYZ with the following parameters:
If "A" equals BThen "C" assign to D "E" assign to Fwith the caveats that:
-
There must be aliases called D and F.
-
D and F cannot be referenced before custom statement XYZ in the jobstream.
If they were, they would already have values, and this attempt to assign new values would fail.
-
Any references to D or F later in the calculation will use these values.
You cannot reassign the values, even by processing the D and F custom statements.
WARNING:
You should generally avoid making multiple assignments within a custom statement. Results may be unpredictable if you have subsequent assignments to the same variable. If you do make multiple assignments, be sure to perform a thorough analysis of your calculation jobstream to look for previous and subsequent references to any secondary variables.