MIDRANGE dot COM Mailing List Archive



Home » MIDRANGE-L » July 2014

Re: RPG integer vs SQL integer.



fixed

EXTBININT(*YES)

Either as an h-spec or on the compile command.

Charles



On Mon, Jul 21, 2014 at 4:40 PM, Luis Rodriguez <luisro58@xxxxxxxxx> wrote:

Vern,

Just for testing, I also wrote a small RPGLE code with:
DRlarge_inte E DS EXTNAME(test_int)

The compiler listing shows:
LARGE_INTE B(9,0)

What I'm missing here??

Regards,




Luis Rodriguez
IBM Certified Systems Expert — eServer i5 iSeries
--



On Mon, Jul 21, 2014 at 4:02 PM, Vernon Hamberg <vhamberg@xxxxxxxxxxxxxxx>
wrote:

DSPFFD does not know about SQL data types - only DDS data types - see the
post I just sent for something on B types.

The output file for DSPFFD has the WHFLDT field, and its values can be
these -

Type: B,A,S,P,F,O,J,E,H,L,T,Z,G,1,2,3,4,5,6,7

Not an I in the place!

It's strange but true - I have created a B(9 0) in DDS and put 10 digit
number there in SQL - something like that, anyhow.

Vern


On 7/21/2014 3:16 PM, Luis Rodriguez wrote:

Steve,

My mistake. I'm afraid that you are right....

Although V5R3's SQL Reference manual states that:

*Large integer *

A large integer is a binary number composed of 4 bytes with a precision
of
10 digits. The range of large integers is −2147483648 to +2147483647.


If I create a table with:
CREATE TABLE @PRUEBAS/TEST_INT (LARGE_INTE INT NOT NULL WITH DEFAULT)

A quick DSPFFD shows the LARGE_INTE field as 9B 0. Could it be that the
sign occupies a digit's byte?

Regards,

Luis

Luis Rodriguez
IBM Certified Systems Expert — eServer i5 iSeries


--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.


--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.







Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2014 by MIDRANGE dot 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 here. If you have questions about this, please contact