An array is a scalar variable that occurs multiple times, in contiguous locations, within the GSA or the input record area. Arrays can be defined to the Reporting Facility only by the DEFINE command.
The same restrictions and attribute options apply to arrays as to scalar variables. However, when an array element is referenced in a procedural statement, you must supply an INDEX value to indicate which occurrence of the array is being referenced. Code an array element reference in the following format:
►►─ fieldname(indexval) ──────────────────────────────────────────────────────►◄
Specifies the symbolic name assigned to the array.
Specifies the element within the array that is to be referenced. You can code it as either:
Note the following:
When you use a relative index specification, however, the Reporting Facility calculates the address of the desired element each time it is referenced during execution. This can cause the entire array to be written to the internal Hit File and overuse your resources. The Hit File is the file where the Reporting Facility temporarily stores the report as it selects records.
|
Copyright © 2014 CA.
All rights reserved.
|
|