[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[open-cobol-list] problems using subscript
From: |
Jose Vilmar Estacio de Souza |
Subject: |
[open-cobol-list] problems using subscript |
Date: |
Mon Jan 2 09:18:09 2006 |
Hi all.
I can not compile the following program. It seems that when I use a
subscript like (1,2), the indexes 1,2 are treated as an unique number. Note
in the program that I'm using the phrase "decimal-point is comma".
identification division.
program-id. t1.
environment division.
configuration section.
special-names. decimal-point is comma.
data division.
working-storage section.
77 ix pic 99.
01 table-1.
03 tab-x occurs 10 times.
05 tab-y occurs 10 times.
07 xy pic 9999.
procedure division.
move 1 to xy(1,2).
move 2 to xy(1, 3)
move 3 to xy(1,4).
move 5 to xy(ix, 5)
move 7 to xy(ix,8).
When compiling the program I'm geting the following errors.
address@hidden vilmar]$ cobc -m t2.cob
t2.cob:14: Error: 'xy' requires 2 subscripts
t2.cob:16: Error: 'xy' requires 2 subscripts
t2.cob:18: Error: '8' is not integer value
address@hidden vilmar]$
Inserting a space after the ',' used to separete the subscripts solve the
problems.
Thanks.
- [open-cobol-list] problems using subscript,
Jose Vilmar Estacio de Souza <=