MOVE - PERCENTAGE

Short Reference

Syntax

MOVE source TO destination PERCENTAGE perc [LEFT|RIGHT].

Effect

: This statement, which is not permitted in classes, assigns the subfield of the data object source that begins from the first position and whose length corresponds to the percentage of the total length specified in perc, to the data object destination. By default, and if LEFT is specified, destination is left-aligned, if RIGHT is specified, it is right-aligned.

The data type of the data objects source and destination must be character-type, otherwise the addition PERCENTAGE is ignored. For perc, a data object of type i is expected. If the value of perc is smaller than or equal to 0, nothing is assigned. If the value of perc is greater than or equal to 100, the entire content of source is assigned.

Note

: This variant of the statement MOVE, which is forbidden in classes, can be replaced by subfield accesses with a specified offset/length.