I'm trying to represent a data structure that consists of a header followed by a number of array elements. I'd like the number of array elements to be as large as possible while not exceeding 4096 (including the header). Is it possible to use the SIZE() function for this? I'm getting message IBM1748I S, "Extents of automatic variables must not depend on the extents of automatic variables declared later in the same block." My declaration is al follws:
1 top1 Structure ,
3 low1 Unsigned Bin Fixed (32),
3 low2 Char (8),
2 mid2 ((4096 - size(mid1)) / size(mid2)),
3 low3 Unsigned Bin Fixed (64),
3 low4 Char (48);
It appears to me that the size of mid2 should be able to be calculated first and then used in the calculation for the number of array elements. Any ideas?