Progress doesn't support 2 dimensional arrays - Only 1 dimension allowed I am afraid.
There are a number of ways around this. Probably the simplest is to multiply the x and y values to create a product key that can be used to access the specific element.
e.g. a 4 by 4 array has 16 possible data points. to retrieve the value in x=2 y=1, you multiply (x - 1) by 4 (the number rows to skip) and add y.
DEFINE TEMP-TABLE tt
FIELD idx AS INTEGER
FIELD f1 AS CHARACTER FORMAT 'x(8)' EXTENT 10
/* The format and extent of f1 to be whatever you need */
INDEX idx idx.
Simply use idx as one dimension of the array and the subscript on array f1 as the other dimension.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.