DIMACROSS

DIMACROSS specifies a DIMENSION attribute on a structure, but one that is removed from the structure and propagated to its members. It is valid only on structures. It is invalid when any of the immediate children already have the DIMENSION attribute.

Its format is:

DIMACROSS(b1[,b2]…)

Generally, a variable declared with the DIMACROSS attribute is not an array, but its children are arrays. DIMACROSS may be used as an array in a BY DIMACROSS assignment or as an argument to the LBOUNDACROSS or HBOUNDACROSS built-in functions.

For example, the following declaration:

 dcl 1 st(8) dimacross,
 2 a fixed bin (31),
 2 b fixed bin (31),
 2 c,
 3 d fixed bin (31),
 3 e (10) dimacross,
 4 f fixed bin (31);

Is equivalent to:

 dcl 1 st(8) dimacross,
 2 a (8) fixed bin (31),
 2 b (8) fixed bin (31),
 2 c (8),
 3 d fixed bin (31),
 3 e,
 4 f (10) fixed bin (31);