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



Wouldn't this be handled by the EXTBININT(*YES) control spec in RPGIV?

Eric DeLong

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx]On Behalf Of R Bruce Hoffman
Sent: Tuesday, April 29, 2008 11:12 AM
To: Midrange Systems Technical Discussion
Subject: Re: Binary fields in DB2 and RPG


Uhh... perhaps I am just misreading this... you mean RPG declares the
integer field as 9B0, right?

create table wtf (val int)
insert into wtf values(1234567890)
select * from wtf

you get back the 1,234,567,890


Joe Pluta wrote:
This is sort of an RPG thing, but really more of a DB2 issue, which is
why I posted it here.

Dave Odom ought to love this. It may have been discussed before, but I
didn't find it. Anyway, if you declare a field in SQL as type INT, it
is actually declared in DB2 as a 9B0 field. This is fine right up until
the time you try to write a value over 999,999,999. For example:
1,198,368,000, which is the number of seconds between January 1, 2008
and January 1, 1970.

Such joy.

Joe



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.