| 
      
      
      From: Luiz A. A. G. <lui...@ya...> - 2005-07-28 15:58:02
      
     | 
| Hi
 
We are using TC to migrate from a MICROFOCUS Cobol environment. 
 
When using field with picture Z to ACCEPT a value, results in a strange result. In the following sample code there is a W1 field defined with Z(6). When accept this field with a value of 001001, the result is "  1  1". When the program moves the result of this field to another field defined with PIC 999999, results in a numeric  value of 11. 
 
Another situation with this program is releated to the second ACCEPT, using the same W1 field. The previous value typed is missing and a 000000 field is displayed. 
 
Both situation does not occurs in MF Cobol.
 
 
       IDENTIFICATION DIVISION.
       PROGRAM-ID. SWPROG.
       AUTHOR. SW.
       ENVIRONMENT DIVISION.
       CONFIGURATION SECTION.
       SPECIAL-NAMES.
           DECIMAL-POINT IS COMMA.
       DATA DIVISION.
       WORKING-STORAGE SECTION.
       01  W1        PIC ZZZZZZ.
       01  W2        PIC 999999.
       PROCEDURE DIVISION.
       PARAG.
           ACCEPT W1 AT 1010.
           DISPLAY W1 AT 1210.
           MOVE W1 TO W2.
           DISPLAY W2 AT 1310.
           ACCEPT W1 AT 1410.
           STOP RUN.
 
First DISPLAY returns "  1  1"
Second DISPLAY returns 11.
 
 
__________________________________________________
Converse com seus amigos em tempo real com o Yahoo! Messenger 
http://br.download.yahoo.com/messenger/  |