MOVELS


 

The MOVELS instruction transfers the logical string of one character string variable into the logical string of another character string variable. The difference between MOVELS and the MOVE instruction is that MOVELS respects the Logical String of the destination character variable. The instruction uses the following format:

 

 

[label]

MOVELS

{source}{sep}{dest}

 

Where:

label

Optional. A Program Execution Label.

source

Required. A previously defined Character String Variable or Numeric Variable whose logical string is moved to the {dest} operand.

sep

Required. A comma or one of the following prepositions: BY, TO, OF, FROM, USING, WITH, IN, or INTO.

dest

Required. A previously defined Character String Variable that receives the logical string from the {source} operand.

Flags Affected: EOS, LESS, ZERO

Note the following:

  1. The Logical String of {source} is moved into the Logical String of {dest}. If {source} is a numeric field, the entire contents are used.

  2. The Form Pointer and Length Pointer of both {source} and {dest} remain unchanged.

  3. If either {source} or {dest} is a Null String, the ZERO Condition Flag is set and no data is transferred.

  4. If the Logical String of {dest} is smaller than that of {source}, only the data that fits is moved and the EOS Condition Flag is set.

  5. If the Logical String of {source} is smaller than that of {dest}, the entire Logical String of {source} is moved into {dest} and the LESS Condition Flag is set.

 

 

See Also: Example Code, MOVE, Character String Instructions

 



PL/B Language Reference MOVELPTR MOVEPLEN