PERFORM VARYING WS-SUB2 FROM 1 BY 1
UNTIL WS-UNTIL-OVER-SW = 'Y'
DISPLAY 'LIMIT IN ' WS-UNTIL-OVER-SW
DISPLAY 'POINTER IN ' WS-POINTER
UNSTRING VARLENREC DELIMITED BY ALL SPACES
INTO WS-DELIMITED-PATTERN-NEW(WS-SUB2)
WITH POINTER WS-POINTER
ON OVERFLOW
DISPLAY 'OVERFLOW ' WS-POINTER
MOVE 'Y' TO WS-UNTIL-OVER-SW
END-UNSTRING
I have infile having only one record
Code:
first second third fourth fifth sixth
and i want to unstring this only as of now
and i am using the above logic
but its showing SOC7, when it reaches unstring word