‎2008 Feb 18 5:15 AM
Is it possible to move the contents of a larger structure to a shorter one?
‎2008 Feb 18 5:18 AM
According to the conversion rule we have for structures, it is possible to convert a structure into a shorter one using the move statement. However, the original structure will be truncate. However if the reverse is done then, blank spaces will be filled at the parts of the longer structure where there are no data.
‎2008 Feb 18 5:17 AM
Yes, we can do this using Move corresponding fields,
Syntax : MOVE-CORRESPONDING <struct1> TO <struct2>.
This statement moves the contents of the components of structure <struct1> to the components of <struct2> that have identical names.
When it is executed, it is broken down into a set of MOVE statements, one for each pair of fields with identical names, as follows:
MOVE STRUCT1-<ci> TO STRUCT2-<c i>.
Reward points if useful
Madhavi
‎2008 Feb 18 5:17 AM
‎2008 Feb 18 5:18 AM
According to the conversion rule we have for structures, it is possible to convert a structure into a shorter one using the move statement. However, the original structure will be truncate. However if the reverse is done then, blank spaces will be filled at the parts of the longer structure where there are no data.