[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[open-cobol-list] Error in picture editing
From: |
Carsten Reimer |
Subject: |
[open-cobol-list] Error in picture editing |
Date: |
Tue Feb 7 15:22:04 2006 |
Hallo,
i am totally new to cobol so maybe my problems arise from my complete
misunderstanding of some basic cobol concepts. If this is the case I
would like to appologize in advance for asking stupid questions.
I try to follow an online-tutorial and I got stuck when it comes to
editing pictures. Following is my example programme:
IDENTIFICATION DIVISION.
PROGRAM-ID.
uebung1.
AUTHOR.
creimer.
INSTALLATION.
FH? NON! D-21339 LUENEBURG.
DATE-WRITTEN.
Tue Feb 7 22:12:12 2006.
******************************************************************
ENVIRONMENT DIVISION.
CONFIGURATION SECTION.
INPUT-OUTPUT SECTION.
FILE-CONTROL.
******************************************************************
DATA DIVISION.
FILE SECTION.
******************************************************************
WORKING-STORAGE SECTION.
01 ue1b PIC 999V99 VALUE 02345.
01 ue1bget PIC 999.9.
******************************************************************
PROCEDURE DIVISION.
MOVE ue1b TO ue1bget.
DISPLAY ue1bget.
STOP RUN.
*
With respect to the tutorial this should result in printing 023.4 on the
screen which sounds logical to me because ueb1b has two digits after the
decimal pint whereas ueb1bget is only allowed to have one and the
leading zero should be kept. When I compile and run this programme with
OpenCobol 0.32 compiled with no errors on an up to date ubuntu linux box
it results in printing 345.0 to the screen.
If members of the list may verify that this result definitely is wrong
maybe someone might have some suggestions how to correct or debug the
beviour of OpenCobol because I would like to use it for the tutorial.
Thanks in advance
with best regards
Carsten Reimer
- [open-cobol-list] Error in picture editing,
Carsten Reimer <=