* SHIFT Statement
DATA tmp(5) VALUE ‘12345’.
SHIFT tmp.
SHIFT tmp BY 2 PLACES.
SHIFT tmp BY 2 PLACES CIRCULAR.
SHIFT tmp UP TO ‘3’.
SHIFT tmp UP TO ‘3’ RIGHT.
SHIFT tmp UP TO ‘3’ RIGHT CIRCULAR.
SHIFT tmp RIGHT DELETING TRAILING SPACE.
SHIFT tmp LEFT DELETING LEADING SPACE.
output:
2345
345
34512
345
123
45123
No comments:
Post a Comment