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



How can i know if the field is packed decimal (13,2)  or DBCS
a. packed decimal - IF LENGTH(13,2)
    system only return         SQLTYPE 484=Packed Decimal 
                                     SQLLEN  BINARY(4) , how to translate to 
integer
b. fixed lenght -  IF DBCS
    system only return         SQLTYPE 452=Fixed character
                                      SQLLEN   5     how to distinguish DBCS 
and  SBCS




date: Wed, 9 Aug 2006 10:52:01 -0500
from: "Holden Tommy" 
subject: RE: How can i retrieve all field attribute through
SQLstatement DescribeTable(SQLDA)

SQLLEN is simply an integer field containing the length of the field.

SQLTYPE (integer field) can be many things:
452=Fixed Length Character
453=Fixed Length Character Allow Null
456=Vary Length Character
457=Vary Length Character Allow Null
480=Floating Point
481=Floating Point Allow Null
484=Packed Decimal
485=Packed Decimal Allow Null
488=Zoned Decimal
489=Zoned Decimal Allow Null
492=Big Integer
493=Big Integer Allow Null
496=Large Integer
497=Large Integer Allow Null
500=Small Integer
501=Small Integer Allow Null
384=Date
385=Date Allow Null

Note: the list is not all-inclusive I suspect if you google SQL Type
site:ibm.com you'll find more info... 


Thanks,
Tommy Holden


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of 2046 BBQ
Sent: Wednesday, August 09, 2006 9:40 AM
To: RPG400-L@xxxxxxxxxxxx
Subject: How can i retrieve all field attribute through SQLstatement
DescribeTable(SQLDA)

1. I have tried to use Describe Table statement to retrieve file field
attribute, but i don't know what
meaning of SQLLEN (because it is a binary field, how to
translate)
2. How i know when the field is DBCS
-- 

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.