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



Michael,

Did this data originate on OS400? Is it perhaps created from a COBOL
application?

According to the RPG reference documentation, "The zone portion of the
low-order byte indicates the sign (positive or negative) of the decimal
number. The standard signs are used: hexadecimal F for positive numbers
and hexadecimal D for negative numbers."

Eric DeLong

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of
Michael_Smith@xxxxxxxxxxxxxx
Sent: Wednesday, January 14, 2009 12:54 PM
To: midrange-L@xxxxxxxxxxxx
Subject: Changing a zoned decimal value with SQL

I have a database that was created via DDS and I'm trying to change a
zoned decimal field via a SQL statement. The statement is being
executed from interactive (STRSQL) SQL.
The field definition is :

PREMDUE ZONED 11 2 11 25 Both PREMDUE

When I look at other posiive values via DSPPFM and toggle to hex I see
the sign value, positive or negative.
Such as, if the value was +2683.55 then the hex value is F2F6F8 F3F5C5
or if it was -2683.55 then the hex value would be F2F6F8 F3F5D5.

When I try to issue my SQL command :

UPDATE table name SET PREMDue = +2683.55 WHERE blah blah = whatever

In hex, I see F2F6F8 F3F5F5

or when I try a negative value, I see F2F6F8 F3F5D5

So, my question is, why don't I see the C5 for the positive but rather,
I see a F5 instead.





Michael Smith
E : Michael_Smith@xxxxxxxxxxxxxx



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.