REMOVE


 

The REMOVE instruction provides a means of separating long character string variables into smaller ones. In PL/B instruction comparison, it would be considered the reverse of an APPEND. The instruction uses the following format:

 

 

[label]

REMOVE

{source}{sep}{dest}

 

Where:

label

Optional. A Program Execution Label.

source

Required. A previously defined Character String Variable that 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 {source} operand.

Flags Affected: EOS, LESS, OVER

Note the following:

  1. The transfer process is similar to MOVE character string to character string except that the source Form Pointer is adjusted after the operation completes.

  2. The Logical String of {source} is transferred into {dest} beginning at the first physical position in {dest}. The Form Pointer of {source} points to first character that was not transferred or zero if the entire Logical String is transferred.

  3. If the Logical String of {source} is less than the Physical Length of {dest}, the entire Logical String is transferred into {dest}. The Form Pointer of {source} is set to zero and the LESS Condition Flag is set.

  4. If the Logical String of {source} is greater than the Physical Length of {dest}, only the contents that fit in {dest} are transferred. The Form Pointer of {source} points to the first character that was not transferred.

  5. If the {source} string is null, the EOS Condition Flag is set.

 

 

See Also: Example Code, APPEND, UNPACK, Character String Instructions

 



PL/B Language Reference PARSEFNAME REPLACE