Skip to Content
0
Sep 27, 2013 at 12:49 PM

SHIFT statement doesn't work properly

482 Views

Hi,

so I have one simple problem which I don't understand:

DATA s TYPE string.

s = 'KEY_KOSTL'.

SHIFT s LEFT DELETING LEADING 'KEY_'.

My expectation is that "s" has now the content 'KOSTL' but actually it's 'OSTL'. It also doesn't matter if the value is 'KEY_KKKOSTL', 'KEY__KOSTL' or 'KEY_KEOSTL', the result is always 'OSTL'.

How does that SHIFT really work? Any ideas?

Cheers