[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference orarep::nomahs::repository

Title:Oracle CDD/Repositorynce
Notice:Current versions are V7.0-01 and V6.1-03eld Test 3
Moderator:8292::PJACOBN
Created:Thu Jan 21 1993
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:1094
Total number of notes:4913

1081.0. "cobol-e-numlong with large initial value" by 5150::KLEIN () Wed Apr 16 1997 15:25

VMS V6.2 AXP
CDD V6.1-03 and V7.0
COBOL V2.4-863

Customer is getting COBOL-E-NUMLONG when including a record from dictionary 
with a field containing a large initial value (> 999999999).
According to the customer (I don't have the versions running here anymore)
he could compile his program successfully with CDD V5.3 and DEC COBOL V2.3-793.

    02  BIGFIELD_Q          PIC S9(11)V9(2) COMP VALUE IS 91540398400843284.49.
..........................................................^
%COBOL-E-NUMLONG, More than 18 digits in numeric literal
at line number 13 in file USER1:[KLEIN.TEST]TEST_REC.;
%COBOL-E-ENDDIAGS, USER1:[KLEIN.TEST]TEST.COB;2 completed with 1 diagnostic

Thanks a lot in advance for any help. Regards,

Ingrid

Script to reproduce the error:

$ create TEST.CDO 
set ver 
delete record/desce test_rec.
define field bigfield_q
    datatype is signed quadword 13 digits scale -2 
    initial_value 1000000000000. 
define record test_rec.
    bigfield_q.
end record.
set nover 
$!
$ DICT OPER @TEST.CDO 
$! 
$ create TEST.COB 
 
*------------------------------------------------------- 
IDENTIFICATION DIVISION. 
PROGRAM-ID. TESTPROG INITIAL. 
DATA DIVISION. 
WORKING-STORAGE SECTION. 
 
COPY 'test_rec'     FROM DICTIONARY. 
 
END PROGRAM TESTPROG. 
*------------------------------------------------------- 
$!
$ COBOL/RESERVED=NOXOPEN/LIST/COPY_LIST/NOOBJ TEST.COB 
$exit 
T.RTitleUserPersonal
Name
DateLines
1081.1NOVA::SMITHIDon't understate or underestimate Rdb!Wed Apr 16 1997 16:175
As they upgraded COBOL too, why don't they ask DEC if there is a problem with
COBOL.  It looks like the value is being converted from binary to text
incorrectly.

Ian
1081.2same on Alpha COBOL 2.2-674 and CDD 6.1-038292::PJACOBPatrick JACOB-pjacob@fr.oracle.comThu Apr 17 1997 08:5713
    Hi Ingrid,

    for your information, I have a similar symptom on Alpha VMS 6.2 ,
    CDD 6.1-03 and COBOL 2.2-674.

    02  BIGFIELD_Q          PIC S9(11)V9(2) COMP VALUE IS 91540750244564172.81.
..........................................................^
%COBOL-E-NUMLONG, More than 18 digits in numeric literal
at line number 11 in file FRVMSS$DKA200:[USER.PJACOB]TEST_REC.;
%COBOL-E-ENDDIAGS, FRVMSS$DKA200:[USER.PJACOB]KLEIN.COB;1 completed with 1
diagnostic

Patrick
1081.3Suggestions from Bill NoyceORAREP::PACKED::BRAFFITTThu Apr 17 1997 21:3022
           <<< CLT::DISK$CLT_LIBRARY3:[NOTES$LIBRARY]COBOL.NOTE;1 >>>
                               -< VAX/DEC COBOL >-
================================================================================
Note 3229.4  NUMLONG error with COBOL/CDD on AXP using huge init. value  4 of 13
WIBBIN::NOYCE "Pulling weeds, pickin' stones"        16 lines  17-APR-1997 09:00
              -< User's CDO definition is inconsistent, I think >-
--------------------------------------------------------------------------------
>    datatype is signed quadword 13 digits scale -2 
>    initial_value 1000000000000. 

"13 digits scale -2" is the same as PIC S9(11)V9(2).  The initial value
you're providing is too large for that field -- it needs at least
S9(13)Vwhatever.

If you want 13 digits left of the decimal, and 2 to the right, write
	"signed quadword 15 digits scale -2".

If you want 11 digits left of the decimal, and 2 to the right, you need
a smaller initial value, perhaps "10000000000".

If you want 13 digits left of the decimal, with the two low digits not stored
(same as S9(11)P(2), I think), write "11 digits scale +2".
1081.4doesn't help5150::KLEINFri Apr 18 1997 06:366
    Sorry, but this doesn't help I had already tried this. It seems that the 
    initial value is correctly included in COBOL as long as it fits into a
    longword. 
    
    Regards,
    Ingrid
1081.5Problem shows up with CDD V6.1-03 (not CDD V5.3)ORAREP::PACKED::BRAFFITTThu May 01 1997 12:2317
    RE: .1
    
>As they upgraded COBOL too, why don't they ask DEC if there is a problem with
>COBOL.

    The problem appears to be unrelated to DEC COBOL version.  It seems to
    show up with CDD V6.1-03 (I don't know about higher versions).  We've
    had no reports of this problem with CDD V5.3 used with any version of
    DEC COBOL.
    
>Note 1081.0         cobol-e-numlong with large initial value           4 replies
>VMS V6.2 AXP
>CDD V6.1-03 and V7.0
>COBOL V2.4-863
    
>Note 1081.2         cobol-e-numlong with large initial value              2 of 4
>    CDD 6.1-03 and COBOL 2.2-674.