Control-O Global variables can be accessed or set by a KOA script. KOA command SETOGLB sets Global variables. KOA commands that accept AutoEdit expressions as parameters can access Global variables.
Local and System AutoEdit variables are normally only accessible in the KOA script. However, when the WAITMODE subparameter is set to Y (Yes) and the SHARELOC subparameter is set to Y (Yes) in a DO KSL statement, the calling rule’s Local and System variable environments are shared with the KOA script.
Example
Figure 3 Example of Control-O Global Variables Being Accessed or set by a KOA Script
Explanation
The above rule sets variable %%A to 1 and then calls script KOA1. KOA1 increments that same variable by 1. When the rule then shouts the message (shown below), %%A is resolved to 2:
CTO282I VALUE OF `A’ IS 2
Parent Topic |