Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Explain plz

Former Member
0 Likes
492

Is it possible to move the contents of a larger structure to a shorter one?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
478

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.

3 REPLIES 3
Read only

Former Member
0 Likes
478

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

Read only

praveen_hannu
Contributor
0 Likes
478

can, but the whole date cant hold in the shorter one.

Read only

Former Member
0 Likes
479

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.