× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: RE: Decimal Data Error
  • From: Joe Giusto <JGiusto@xxxxxxxxxxxx>
  • Date: Thu, 21 Jan 1999 18:04:09 -0500

Try a dummy read before your "real" processing  (like use *INZSR).  As long
as there is at least one record in the file, the fields will contain data
from the read.  Then do your SETGT and READP.  Even if you get BOF now, the
file fields will contain valid data.  
Or you could say:

IF *IN70
Clear    *ALL     yourRecFmt
ENDIF

This will also initialize the fields to blanks and zeros as per their type.


Joe Giusto II
Patuxent Publishing Company
 <mailto:jgiusto@patuxent.com> mailto:JGiusto@patuxent.com
http://www.lifegoeson.com <http://lifegoeson.com> 


        -----Original Message-----
        From:   Marc Woodbridge [SMTP:ikat@dircon.co.uk]
        Sent:   Wednesday, January 20, 1999 5:34 PM
        To:     'RPG400'
        Subject:        Decimal Data Error

        Hi there,
        Got this little problem :-
        SETGT on a file, then READP (using *in70) - now if we run off
        the top of the file *in70 = on and we bypass the rest of the file.

        Now, here comes the problem, there is a field from this file 
        (defined as zoned decimal) that is used for calculation later on.

        If we hit tof (*in70 on), this field will hold hex '40' (spaces),
which is
        wrong - it should hold zeros. No matter what I do to this field it
ALWAYS
        gives a decimal data error.

        I've tried a bit of code like:
        *IN70  IFEQ *ON
                  Z-ADD *ZEROS GBBKXV
        (or)     MOVE *ZEROS GBBKXV
                  ENDIF

        this bit of code works but later on when I want to ADD GBBKXV to
another
        field (packed decimal) I get the error.

        Anyone got any ideas ??
        Cheers
        Marc
        ikat@dircon.co.uk

        * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* * *
        * This is the RPG/400 Discussion Mailing List!  To submit a new
*
        * message, send your mail to "RPG400-L@midrange.com".  To
unsubscribe   *
        * from this list send email to MAJORDOMO@midrange.com and specify
*
        * 'unsubscribe RPG400-L' in the body of your message.  Questions
should *
        * be directed to the list owner / operator: david@midrange.com
*
        * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* * *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* This is the RPG/400 Discussion Mailing List!  To submit a new         *
* message, send your mail to "RPG400-L@midrange.com".  To unsubscribe   *
* from this list send email to MAJORDOMO@midrange.com and specify       *
* 'unsubscribe RPG400-L' in the body of your message.  Questions should *
* be directed to the list owner / operator: david@midrange.com          *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *


As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.