Structure targets
In BY NAME structure assignments, each target variable must be a structure, and the right-hand side must be a structure reference. In structure assignments not using BY NAME or BY DIMACROSS, each target variable must be a structure, and the right-hand side must be a scalar or a structure expression with the same structuring as the target structure.
- The structures must have the same minor structuring and the same number of contained elements and arrays.
- The positioning of the elements and arrays within the structure (and within the minor structures, if any) must be the same.
- Arrays in corresponding positions must have identical bounds.
In BY DIMACROSS structure assignments, the target variable must
be a structure. The DIMACROSS index expression is applied to all structures
that are declared with the DIMACROSS attribute and used in the assignment
either as the target or as part of the source. The following restrictions
apply to these assignments:
- Only one target reference is valid.
- The structuring and bounds of all structures in the source must match those in the target.
In structure assignments not using the BY NAME and BY DIMACROSS
options, the source might be the null bit string ( ''b )
even if the target structure contains non-computational data. In this
case, the assignment is performed as if all of the following conditions
are true:
- All of the target was filled with
'00'x. - All the numeric target fields were set to 0.
- All the NONVARYING CHARACTER, UCHAR, WIDECHAR, and GRAPHIC fields were filled with blanks.