SHIFT - deleting

Syntax

... { {LEFT DELETING LEADING}     | {RIGHT DELETING TRAILING} } pattern ... .

Effect

If you use these additions, the SHIFT statement keeps moving the content of dobj by one position to the left or the right until the content of the first or last position in dobj is displayed in pattern. If the data object dobj is a string, it is shortened when it is moved to the left but not extended when it is moved to the right. This means the content of pattern can also be moved to the right from a string.

The system takes account of the capitalization and closing blanks entered in pattern. If the content of the first or last position in dobj is not displayed in pattern, the content of textremains unchanged. The system does not move the objects if pattern is an empty string.

Example

After it has been moved to the right, text contains "       I know you" and has a length of 15 characters.

DATA text TYPE string VALUE `I know you know`.

SHIFT text RIGHT DELETING TRAILING 'no kw'.