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



My input filed is fine and I get the correct data when I remove the
packed fields and just leave the char fields. The integer field is fine
if I use %int.

? Why would you need %Int in this context?

Based upon your responses, I strongly urge you to look at SQLCOD and SQLSTAT
(which you should do anyway with any SQL function - especially one that
becomes part of the database, such as a UDF). Clearing the DS is a good
idea, but I didn't suggest it since that would mask problems you might have
with data not received.

I also notice that you are defining but not using null indicators. You've
got all the infrastructure in place; it would be to your advantage to use
it.

Consider, for example, that the table column that represents C3's d3BRNCDE
field is null in the database. If you have not cleared your data structure,
you will receive a decimal data area when you try to reference it. If you
have cleared the data structure, your program will proceed as though nothing
is wrong (and d3BRNCDE will be zero). Is that what you want?

You also have not allowed for the (seemingly) normal possibility of SQLCOD =
100 (EOF). What do you want to happen if your FETCH receives no data?


Dennis Lovelady
http://www.linkedin.com/in/dennislovelady
--
"There are so many things that we wish we had done yesterday, so few things
that we feel like doing today."
-- Mignon McLaughlin




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.