If we consider the question of direct allocation of data in the DSA vs. dynamic allocation, then it seems declaration order matters in some unclear fashion.
Consider this example set of declarations
dcl c1 char(2*size(c2));
dcl len fixed bin(31) value(20);
dcl c2 char(len);
The size of c1 isn't known at the declaration - so c1 is dynamically allocated. But - why isn't it known?
In this similar example:
dcl c3 char(2*size(c4));
dcl c4 float bin(70);
the size of c3 is known and it is not dynamically allocated.
Just wondering why it is the case that the first situation requires dynamic allocation when the second doesn't, and if there is some explanation in the documentation?
- Thanks -
- Dave R. -
------------------------------
Dave Rivers
------------------------------