When an MDO component is a structure defined with a type of SEQUENCE or SET, you can assign into or from some or all of the components that comprise the structure by name. This is a generic form of assign with the following possible options and syntax:
&ASSIGN MDO=a.b.*
{ GENERIC | ADD | REPLACE | UPDATE }
DATA=data
&ASSIGN MDO=a.b.*
FROM
VARS=vars*
{ GENERIC | ADD | REPLACE | UPDATE }
&ASSIGN MDO=a.b.*
{ GENERIC | ADD | REPLACE | UPDATE }
{ FROM | PRESENT_IN | DEFINED_IN }
MDO=x.y.*
&ASSIGN VARS=vars*
{ GENERIC | ADD | REPLACE | UPDATE }
{ FROM | PRESENT_IN | DEFINED_IN }
MDO=x.y.*
Note: The asterisk (*) must be in place of the last component name only.
In all cases:
For all options, when assigning data into an MDO, the process is driven by the components defined within the map for the target MDO. Each component defined within the parent structure is a target for an assign.
When selecting data for assignment from an MDO, the FROM keyword is used to select only source components that have a data value that is not null. The PRESENT_IN keyword is used to select from all source components that are present. For both FROM and PRESENT_IN options, any component that is defined but not present is deemed to be null. When the DDEFINED_IN keyword is used, all components defined in the target map for the generic name level indicated take part in the operation, regardless of whether any data exists. Components not defined are deemed to be null.
When assigning data from an MDO into NCL variables, the process is driven by the components defined in the source MDO. Target NCL variable names are constructed by appending selected component names to the supplied VARS prefix.
When the GENERIC keyword is used, any existing target NCL variables or MDO components are first deleted, then each is assigned the value from the corresponding source component. If no source data exists no assignment takes place.
When the ADD keyword is used, only those NCL variables not currently present, or MDO components defined but not currently present in the target structure, take part in the assignment process. That is, only new NCL variables or MDO components are added and no existing ones are affected.
When the REPLACE keyword is used, only those NCL variables that are present, or MDO components that are defined and are present in the target structure, take part in the assignment process. That is, no addition takes place. Only existing NCL variables that have new source data or existing MDO components that have new source data are affected, but those variables that have no new source data are not affected.
When the UPDATE keyword is used, both addition and replacement take place, but existing NCL variables or MDO components that have no new source data are unaffected.
| Copyright © 2011 CA. All rights reserved. | Tell Technical Publications how we can improve this information |