gnucobol-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [open-cobol-list] What should this produce ?


From: Roger While
Subject: RE: [open-cobol-list] What should this produce ?
Date: Mon Apr 3 22:36:02 2006

Yes, I was aware of the TRUNC/NOTRUNC.
I was looking for the actual results produced.
MF (SE 2.2 and 4.0, no special compile options, which seems
to imply NOTRUNC) produce :
241414418783113383+
-205329654926438233
003205329654926438-
-205329653926438233
003205329653926438-
Very strange.

Roger

For the VERY "odd" world of TRUNC/NOTRUNC behavior, see the IBM mainframe
examples at:


http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IGY3PG30/2.4.53.1



and

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IGY3PG30/2.4.53.2


NOTE:
  IBM has 3 options for TRUNC - BIN, OPT, and STD
        while
  Micro Focus only has "TRUNC" and "NOTRUNC"

> -----Original Message-----
> From: address@hidden
> [mailto:address@hidden On
> Behalf Of Roger While
> Sent: Monday, April 03, 2006 8:09 AM
> To: address@hidden
> Subject: [open-cobol-list] What should this produce ?
>
> As per title :
>
>         IDENTIFICATION   DIVISION.
>         PROGRAM-ID.      MYPROG.
>         DATA             DIVISION.
>         WORKING-STORAGE  SECTION.
>         01  R1   PIC 9(9)V9(9)       VALUE 123456.123456.
>         01  R2   PIC 9(9)V9(9)       VALUE 123456.123456.
>         01  R3   PIC S9(9)V9(9)      VALUE 0.
>
>         01  R4   PIC 9(9)V9(9)  COMP VALUE 123456.123456.
>         01  R5   PIC 9(9)V9(9)  COMP VALUE 123456.123456.
>         01  R6   PIC S9(9)V9(9) COMP VALUE 0.
>
>         01  R7   PIC S9(12)V9(6).
>         PROCEDURE        DIVISION.
>         A-START.
>             MULTIPLY R1 BY R2 GIVING R3.
>             DISPLAY R3.
>
>             MULTIPLY R4 BY R5 GIVING R6.
>             DISPLAY R6.
>
>             MOVE R6 TO R7.
>             DISPLAY R7.
>
>             ADD 1 TO R6
>             DISPLAY R6.
>
>             MOVE R6 TO R7.
>             DISPLAY R7.
>
>             STOP RUN.
>
> Note for OC, you will need one of the "-std=" options
> mvs, ibm, mf, bs2000.
>
> MF produces a very interesting result (SE 2.2 and 4.0)
> (NOTRUNC doesn't affect it and neither does DIALECT=)
>
> Roger
> Roger
>
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by xPML, a groundbreaking
> scripting language
> that extends applications into web and mobile media. Attend
> the live webcast
> and join the prime developer group breaking into this new
> coding territory!
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&;
> dat=121642
> _______________________________________________
> open-cobol-list mailing list
> address@hidden
> https://lists.sourceforge.net/lists/listinfo/open-cobol-list
>





reply via email to

[Prev in Thread] Current Thread [Next in Thread]