× 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.



George, you may be confusing digits vs. bytes.

As Bruce pointed out a 4-byte integer variable equates to 10-digits. The following example shows three ways of defining exactly the same thing.

====================
        Dcl-DS MyStr1;
          Variable1   Int(10);
        End-DS;

     D MyStr2          DS
     D   Variable2             1      4I 0

     D MyStr3          DS
     D   Variable3                   10I 0

====================
(The from/to notation for Data Structures is for byte positions. The length notation is for digits.) Apologies if you're already familiar with this; from the RPG IV Ref:

The length of an integer field is defined in terms of number of digits; it can be 3, 5, 10, or 20 digits long.
A 3-digit field takes up 1 byte of storage; a 5-digit field takes up 2 bytes of storage; a 10-digit field takes
up 4 bytes; a 20-digit field takes up 8 bytes. The range of values allowed for an integer field depends on
its length.

HTH,
Brian.

On 25/08/2020 21:56, George Smith wrote:
Okay Bruce you got me but the field maps out in RDi as a 10 byte INT field when coded as the 397 400I 0.

George R. Smith
Sr. JD Edwards Analyst
3325 W Trinity Blvd,  Grand Prairie, TX 75050  (817) 510-1600 ext. 4121


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.