From: David E. <de...@us...> - 2007-04-13 19:20:07
|
Carlinux wrote: > ... > working-storage section. > ... > 05 PRO-WS1 OCCURS 8 TIMES. > 10 AJ-PRODUTO-WS PIC 9(05). > 10 AJ-QTDE-WS PIC 9(04). > 10 AJ-POSNEG-WS PIC X. > ... > procedure division. > ... > * occurs = 8 move 10 permited, BUG??? > move 1010 to aj-produto-ws (10) > ... > MOVE "P" to aj-posneg-ws (10) > display aj-produto-ws (10) > ... > display aj-posneg-ws (10). > ... Yes, this a compile time bug. I will add a error trap fix to the TC grammar. There is also a run-time problem (bug ?), as the following sample code illustates. 01 IDX PIC 9(2). ... MOVE 10 TO IDX. MOVE "P" TO aj-posneg-ws (IDX). I will have to consult the COBOL standard on this one, and add a fix if required. |