Actually say i have a text 'abc bcd cde def '. Now my requirement is to extract word by word from the text. We can say first moving abc to one field and rest to another field. We can use space as a delimiter. When i tried parsing this using UNSTRING, its moving abc to one field and bcd to another field. But my requirement is move abc to one field A(can be a array) and rest to another field B. This field B can be my input to UNSTRING again so next time it moves bcd to field A and rest to field B. This process will continue untill it encounters spaces. Could you please help me with this?
PERFORM UNTIL ALPHA-FIELD = SPACES
REPLACING FIRST SPACE BY '#'
DELIMITED BY '#'
DISPLAY 'ALPHA-FIELD ' ALPHA-FIELD
DISPLAY 'WORK1 ' WORK1
MOVE SPACES TO WORK1