How to separate to multi-field?

For example:
01 something PIC X(06).
01 one PIC 9(02).
01 two PIC 9(02).
01 three PIC X(02).
SELECT socket(:number)
INTO :something
something = 1234ww
one = 12
two = 34
three = ww

Showing Answers 1 - 3 of 3 Answers


  • Sep 17th, 2018

Using Reference modification in COBOL
Move something(1:2) to one
Move something(3:2) to two
Move something(5:2) to three

  Was this answer useful?  Yes


  • Nov 2nd, 2018

Redefines can be used

  Was this answer useful?  Yes


  • Dec 5th, 2018

we can declare something as a group variable
01 something pic x(06)
05 one pic 9(2)
05 two pic 9(2)
05three pic x(2)

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.


Related Answered Questions


Related Open Questions