Can somebody please tell me what’s wrong with this code :
WORKING-STORAGE SECTION.
01 TABS.
05 WORD-TAB OCCURS 3 PIC X(40)
.
.
.
.
PROCEDURE DIVISION.
MOVE 1 TO PTR.
STRING WORD-TAB (1) DELIMITED BY ‘ '
‘ ‘ DELIMITED BY SIZE
WORD-TAB (2) DELIMITED BY ‘ ‘
‘ ‘ DELIMITED BY SIZE
WORD-TAB (3) DELIMITED BY ‘ ‘
‘ ‘ DELIMITED BY SIZE
‘PESOS’ DELIMITED BY SIZE
INTO COMPLETE-WORD
WITH POINTER PTR
When I pass some value to WORD-TAB like :
WORD-TAB (1) = ‘ONE HUNDRED THIRTY THREE MILLION’
WORD-TAB (2 = ‘TWO HUNDRED THIRTY ONE THOUSAND’
WORD-TAB (3 = ‘ONE HUNDRED THIRTY THREE’
I always get this kind of result :
ONE HUNDRED THIRTY THREE MILLION TWO HUNDRED THIRTY ONE THOUSAND ONE HUNDRED THIRTY THREE
PESOS
My output always gives the exact size of my table, which is 40, plus the 1 space I added.
Please somebody help me here.
WORKING-STORAGE SECTION.
01 TABS.
05 WORD-TAB OCCURS 3 PIC X(40)
.
.
.
.
PROCEDURE DIVISION.
MOVE 1 TO PTR.
STRING WORD-TAB (1) DELIMITED BY ‘ '
‘ ‘ DELIMITED BY SIZE
WORD-TAB (2) DELIMITED BY ‘ ‘
‘ ‘ DELIMITED BY SIZE
WORD-TAB (3) DELIMITED BY ‘ ‘
‘ ‘ DELIMITED BY SIZE
‘PESOS’ DELIMITED BY SIZE
INTO COMPLETE-WORD
WITH POINTER PTR
When I pass some value to WORD-TAB like :
WORD-TAB (1) = ‘ONE HUNDRED THIRTY THREE MILLION’
WORD-TAB (2 = ‘TWO HUNDRED THIRTY ONE THOUSAND’
WORD-TAB (3 = ‘ONE HUNDRED THIRTY THREE’
I always get this kind of result :
ONE HUNDRED THIRTY THREE MILLION TWO HUNDRED THIRTY ONE THOUSAND ONE HUNDRED THIRTY THREE
PESOS
My output always gives the exact size of my table, which is 40, plus the 1 space I added.
Please somebody help me here.