|
The line number is probably the compiler statement number not the source line number in error. It can help if you compile programs with OPTION(*SRCSTMT). This allows the source statement number to be included in program messages, debug, etc. Your problem could be a number that is too big to fit into a value. With MOVE, MOVEL this is not usually a problem, the number can overflow its size and a small number results. However, the EVAL op code does not allow this to happen. EVAL does not allow numeric overflow. eg. EVAL A=B where A is 3 digit number and B is a 5 digit number. If B ever gets bigger than 999 then a program exception like the one you are seeing will occur. Hope this helps you find the source of the error. Syd Nicholson rich herdman wrote: >Help!!! > >I have a fairly long-running RPG program that had a 'The target for a numeric >operation >is too small to hold the result" message over the weekend. The program is an >SQLRPGLE >program (no modules or anything - just a regular RPG 4 pgm w/ some embedded >SQL). It >is running on a system running V5R1. However, the object was originally >compiled under >V4R3 and has run every weekend since 03/05/2000 with no problems. > >Anyways, I dumped the program to get the statement # that it blew up on. The >problem is that >I don't think the line number is right. The statement in error is 804, and >the program is only >642 lines long. In the compile listing, line 804 refers to a READE statement >on a file. > >First question: is it even possible to get a 'target too small' on a READE? >The program does not >redefine any if the fields in that file and the file has not been modifed. > >Secondly, how can I get the line # it actually blew up on? Should I recompile >it under V5R1 and >let it run until it blows up again and hope I get the right number this time? > > > >Rich Herdman >email: rherdman@columbus.rr.com >www: http://home.columbus.rr.com/herdman/ > >"It never does to leave a live Dragon out >of the equation." - Bilbo Baggins, 'The Hobbit' > > >_______________________________________________ >This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list >To post a message email: MIDRANGE-L@midrange.com >To subscribe, unsubscribe, or change list options, >visit: http://lists.midrange.com/cgi-bin/listinfo/midrange-l >or email: MIDRANGE-L-request@midrange.com >Before posting, please take a moment to review the archives >at http://archive.midrange.com/midrange-l. >
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.