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
FROM DUAL
result:
something = 1234ww
one = 12
two = 34
three = ww

Showing Answers 1 - 9 of 9 Answers

Shashank

  • 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

Indu

  • Nov 2nd, 2018
 

Redefines can be used

  Was this answer useful?  Yes

gauravaram

  • 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