Rational Developer for System z
Enterprise COBOL for z/OS, Version 4.1, Programming Guide


Loading a table dynamically

If the initial values of a table are different with each execution of your program, you can define the table without initial values. You can instead read the changed values into the table dynamically before the program refers to the table.

To load a table, use the PERFORM statement and either subscripting or indexing.

When reading data to load your table, test to make sure that the data does not exceed the space allocated for the table. Use a named value (rather than a literal) for the maximum item count. Then, if you make the table bigger, you need to change only one value instead of all references to a literal.

related references  
PERFORM with VARYING phrase (Enterprise COBOL Language Reference)


Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)