As described in Combinations of arrays, structures, and unions, given this untyped structure:
dcl 1 a(3),
2 b(4) fixed bin,
2 c(5) fixed bin;a(1).b(2), a.b(1,2), and a(1,2).b have the same meaning.
However, given the following typed structure:
define structure
1 t,
2 b(4) fixed bin,
2 c(5) fixed bin;
dcl x(3) type t;only x(1).b(2) is valid. In addition, the assignment statement x.b = 0 is invalid, but x(1).b = 0; is valid.
Given the structure type t defined previously and the following function f:
dcl f entry returns( type t );
display( f().b(2) ) is valid.