I have read the whole blog but not getting solution for the problem.
I have a variable QTY PIC s9(11)V9(4) COMP-3 , which will be populated from the database using select query.
Then I am moving the value of QTY to a working storage varible QTY-LOC which is s9(11)v9(4) VALUE ZERO.
There is a redefine for this working storgae variable like.
W-QTY-LOC REDEFINES QTY-LOC
W-QTY-WHL PIC S9(11).
W-QTY-DEC PIC 9(4).
Now code is manipulating on QTY-LOC and there is a string formation in code for DYANAMIC insert
W-LOC-QTY-WHL OF W-WORK DELIMITED BY SIZE
'.' DELIMITED BY SIZE
W-LOC-QTY-DEC OF W-WORK DELIMITED BY SIZE
',' DELIMITED BY SIZE
INTO SELECT-COL-CLAUSE OF ITEM
WITH POINTER SELECT-COL-LEN OF ITEM
I am getting junk value in W-QTY-DEC i.e the value of above string formation is 00000000082.000(.
How to resolve this. what is wrong with the code. I can not use NUMVAL as this is generic cobol which is running perfectly under Windows env.
Any help will be greatly appreciated.