Previous Topic: Assignment of Data into an MDO

Next Topic: Assign into/from Multiple MDO Components within a SEQUENCE or SET Type

Assign into/from a Single MDO Component

The following assign statements can be used to set the value of a single target MDO component, which can be the entire MDO, from NCL variables or constant data:

&ASSIGN MDO=a.b.c DATA=xxx
&ASSIGN MDO=a.b.c FROM VARS=vars... 

In either case the input string must be valid external form for the component or a type check results.

When multiple NCL variables are specified as the source data, they are concatenated together to form the input string. The exception to this is if the assignment is into an entire MDO mapped by $NCL. In this case, a standard variable structure is built and maintains the variable boundaries.

The following assign statement can be used to get the value of a single target MDO component, which can be the entire MDO, into NCL variables:

&ASSIGN VARS=vars FROM MDO=a.b.c 

In all cases, the result is a valid external form for the component unless a type check or data check occurs.

When multiple NCL variables are specified as the target data, they are segmented according to the maximum variable size (or specific segment sizes if supplied) from the entire output string. The exception to this is if the assignment is from an entire MDO mapped by $NCL. In this case, the NCL variables are updated according to the variable boundaries within the MDO.

The following assign statement can be used to move the value of a single target MDO component to another MDO component:

&ASSIGN MDO=a.b.c FROM MDO=x.y.z

In this case the assignment takes place using the normal local form for the component (not the external form) and as usual unless the input is valid, a type check results.