* Substrings with offsets
DATA tmp(10) VALUE ‘ABCDEFGHIJ’.
DATA tmp1(2).
WRITE: tmp+3(7),
tmp+1(4),
tmp+0(8),
tmp+7(3).
MOVE tmp+4(2) TO tmp1.
output:
DEFGHIJ
BCDE
ABCDEFGH
HIJ
DATA tmp(10) VALUE ‘ABCDEFGHIJ’.
DATA tmp1(2).
WRITE: tmp+3(7),
tmp+1(4),
tmp+0(8),
tmp+7(3).
MOVE tmp+4(2) TO tmp1.
output:
DEFGHIJ
BCDE
ABCDEFGH
HIJ
Thanks for ur post
ReplyDelete