Display wrong format in micro focus visual cobol.

Hi.

Recently, i code a test program as below :

IDENTIFICATION DIVISION.
PROGRAM-ID. HELLO.

DATA DIVISION.
WORKING-STORAGE SECTION.
01 WS-TEST PIC 9(5)V9(2) VALUE 13.5.
01 WS-NUM3 PIC S9(3)V9(2) VALUE -123.45.

PROCEDURE DIVISION.
DISPLAY WS-TEST.
DISPLAY WS-NUM3.
STOP RUN.

When i run by ctrl f11 then the result in console command is :

0001350
12345-

But when i run this project on OpenCobolIDE then result is correct : 

00013.50

-123.45

Plz help me.

Parents
  • I think Cobol should do an intelligent conversion to the display format with setting a decimal point at the correct position. Defining the variable with comp-3 gives the same result. Display of a variable defined as decimal gives a correct result. But for the moment you cannot use Cobol arithmetic verbs with decimal; you can use the Set command. I have an open support case for that.

Reply
  • I think Cobol should do an intelligent conversion to the display format with setting a decimal point at the correct position. Defining the variable with comp-3 gives the same result. Display of a variable defined as decimal gives a correct result. But for the moment you cannot use Cobol arithmetic verbs with decimal; you can use the Set command. I have an open support case for that.

Children
No Data