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



Joe Pluta skrev den 01-09-2008 14:52:

We're at a point of guessing how the JDBC driver works, so I'm a little out of my league,. but I did notice something. It LOOKS like for some
I think that this is beyond the JDBC driver, and in the database itself.

reason the parameters are being passed correctly, except with a leading plus sign. For example, your first iteration through the loop you should be passing 1 in the first parameter and 25 in the second. With leading plus signs, that's X'41F0F0F0F0F1' and X'41F0F0F0F2F5'. Remove the last character, and this matches exactly what you're seeing.

Why? I don't know. I suggest one thing to further test, and a workaround:

1. To further test, change your input parameters to character values of length seven or more and see what you get. My guess is you will see the hex values I mentioned above.
I created a new derivative being a cobol ILE program and recompiled (which enables me to set a service entry point, whee!)

I then tried just shortening to NUMERIC(4,0) for A and B, which resulted me getting these variables in the WSDCi debugger at entry:

A +0001. B +0025. C +0000. D +0000. DB-FORMAT-NAME RETURN-CODE 0000.
So your expectation was right :)

If I then set A to "1" and B to "25" they are set with leading zeros alright. What is interesting is that C and D are then set also without the sign and that the returned values to my calling program is correctly interpreted. Whee.

2. A workaround, unsatisfactory though it may be, is to use character fields. It's relatively easy if you won't be passing negative numbers. Just format the integer into a five-character alpha field with leading zeros and that will be the same as a zoned decimal field.
You are right. This works! Thanks a lot!!
My initial figures show that the unoptimized speed (new connection every time, etc) is comparable with the unoptimized program call (new AS400 connection every time). Now the fun part begins :)

Thanks to everybody for all the responses I've had - you have truly been a great help!

Best regards,


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.