SHIFT

Short Reference

Syntax

SHIFT dobj [ {[places] [direction]} | deleting ]
           [IN {BYTE|CHARACTER} MODE].

Addition:

... IN {BYTE|CHARACTER} MODE

Effect

This statement shifts the content of a variable dobj. In places, you can specify the number of places to be shifted and in direction the direction of the shift. In deleting, you can specify which characters to delete from the data object by the shift. If you use no addition at all, then the content is shifted to the left by one place.

By default, free places created by the shift are filled with blanks or hexadecimal 0 for data objects of fixed length, depending on the kind of processing. Data objects of type string or xstring are shortened by the number of shifted places when shifted to the left, and lengthened by the number of shifted places when shifted to the right.

When the character string is processed, the closing blank characters are considered for data objects dobj of fixed length.

Addition

... IN {BYTE|CHARACTER} MODE

Effect

The optional addition IN {BYTE|CHARACTER} MODE determines whether a byte or string processing is executed. Without the addition, a string processing is executed. Depending on the processing kind, dobj, sub_string and pattern must be byte-like or character-like.