A DCL-DS may be written inside another DCL-DS, grouping a run of subfields under a name:
DCL-DS Order QUALIFIED;
OrderNo CHAR(10);
DCL-DS ShipTo;
Street CHAR(30);
City CHAR(20);
END-DS;
Total PACKED(9:2);
END-DS;
Order.ShipTo.City = 'Springfield';
A group's leaves are reached by the full dotted path - Order.ShipTo.City. Groups nest to any depth.
The group is a contiguous run of the enclosing structure's bytes: its members start immediately after the preceding subfield, the next subfield resumes immediately past the group, and no padding or alignment is inserted. %SIZE reflects this at every level - %SIZE(Order) counts the group's bytes, and %SIZE(Order.ShipTo) gives the group's own width.
The enclosing structure must be QUALIFIED; a nested DCL-DS inside an unqualified structure is rejected with TRN1545, because a group's leaves have no unqualified spelling.
Nesting is free-format syntax. A fixed-format D-spec data structure nests by putting LIKEDS on a subfield instead.