The function placed in a wrapper creates parameters automatically based on the field contexts used in the original action diagram statements. Some contexts do not require conversion; these contexts are LCL, NLL, ARR, PGM, JOB, and CON.
All other contexts are converted and passed into the new function as duplicate parameters. EXCEXTFUN and EXCINTFUN functions do not have associated screens or database fields, so the action diagram cannot refer to contexts such as RCD, CTL, DB1, and DB2.
For each field in an unavailable context, the wrapping process creates an entry on an array. A new array is created for each function placed in a wrapper. This array is then defined on the parameter listing for the function passed as RCD.
Each new unavailable context is associated with another parameter entry of the same array. Each array is passed as a duplicate parameter context, from PR1 to PR9. The first unavailable context on the action diagram statements is assigned to PR1. The next context not already assigned to the array is passed as the PR2 parameter context, and so on. LCL, NLL, PGM, JOB, and CON are never substituted.
The parameter usage for each field on each parameter listing is calculated from how the CTX field is used in the action diagram statements of the function.
The following illustrations show how the field contexts are converted to the PR1 to PR9 contexts.
| Copyright © 2011 CA. All rights reserved. | Tell Technical Publications how we can improve this information |