When you need to add functionality to an action diagram, study the appropriate function structure chart and information on user points and select the user point to execute at the correct time for your needs.
Using the incorrect user point in an action diagram can make the repetition of code at another user point unnecessary.
Assume the following:
In order for the appropriate Customer records to be highlighted when the records are initially loaded, the following processing could be placed in the USER: Initialize subfile record (existing record) user point:
. > USER: Initialize subfile record ( existing record) . .— . . WRK.Highlight Customer = CND.No . . .-CASE . . | -RCD.Customer balance is LT 0 . . | WRK.Highlight Customer = CND.Yes . . '-ENDCASE . '—
To further ensure that the records continue to be highlighted after the records are loaded, the same processing would also need to be inserted in the USER: Validate subfile record fields user point.
The duplication of logic in both these user points can be avoided by placing the processing in the USER: Validate subfile record relations user point. This user point is executed both at function load and later when the records are revalidated.
The selection of this user point reduces the amount of code generated thereby improving the efficiency of the resulting program.
| Copyright © 2011 CA. All rights reserved. | Tell Technical Publications how we can improve this information |