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



> -----Original Message-----
> From: midrange-l-bounces@xxxxxxxxxxxx
> [mailto:midrange-l-bounces@xxxxxxxxxxxx]On Behalf Of Pete Helgren
> Sent: Friday, April 08, 2005 2:52 PM
> To: Midrange Mailing List
> Subject: SQL Error SQLCOD = -000000303 SQLSTT = '42806'
> 
> 
> Using embedded SQL in RPG IV.  V5R2M0.....
> 
> I get an SQLCOD = -000000303 with SQLSTT = '42806' which is 
> telling me I 
> have a host variable that is incompatible ("A value cannot be 
> assigned 
> to a host variable, because the data types are not compatible.")
> 
> OK...that doesn't surprise me, I have some numeric data 
> coming in and I 
> guess that I defined the host variable incorrectly.
> 
> So, two questions arise:
> 
> 1.How can I tell which, of the 11 fields in my select statement, is 
> causing the error? and...

I believe that you may find more info in the joblog.

> 
> 2. Is there an "easy" way to define host variables (or some 'trick' I 
> can use) so that my selected fields from the tables match the host 
> variables I select them into?

Bring the file in as an external DS.  Use the LIKE keyword to define your host 
variables.


> 
> Am I making this too hard?  In Java I can "point" my results 
> to a result 
> set (rs) and then access them using rs.field1, rs.field2, rs.field3, 
> etc.  Mapping the select statement into host variables is a drag in 
> RPG.  Perhaps there is an easier way? I am all ears....
> 

Nope.  OO comes in handy there.



HTH,

Charles Wilt
iSeries Systems Administrator / Developer
Mitsubishi Electric Automotive America
ph: 513-573-4343
fax: 513-398-1121
 


As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.