|
It isn't actually a problem at all, the file I was reading was an old version of the file without the key I wanted. It was my bad, I was just going from the key in the DDS src, when I checked the object it had a different key ... I recompiled the file and it works perfectly. Sorry if I wasted any of your time, Robert Robert Upshall Professional Software of Amarillo (806) 358-8928 rupshall@psasoft.com ----- Original Message ----- From: "Dave Wall" <dawall@us.ibm.com> To: <java400-l@midrange.com> Sent: Thursday, September 06, 2001 11:13 AM Subject: Re: Problems with a keyed file read > Chris has a few ideas, but we don't really understand the question. Can > you post your record format and a couple lines of code plus the exception? > > David Wall > AS/400 Toolbox for Java > > ----- Forwarded by Dave Wall/Rochester/IBM on 09/06/2001 11:11 AM ----- > > Christopher > Smith To: Dave Wall/Rochester/IBM@IBMUS > cc: > 09/06/2001 From: Christopher Smith/Rochester/IBM@IBMUS > 09:16 AM Subject: Re: Problems with a keyed file read(Document > link: Dave Wall) > > > > > > > > He should get the field description for that field off of his RecordFormat > and see what type it is. If it's a CharacterFieldDescription, then a String > should be the right thing to use. But since a CHAR(1) on the 400 can mean > just about anything (all they have is CHAR and BIN basically) then it is > possible that the CHAR(1) field is defined as something else... possibly a > HexFieldDescription? > > > Christopher R. Smith > JTOpen - IBM Toolbox for Java > http://oss.software.ibm.com/developerworks/projects/jt400 > > > > > > Dave Wall > To: Christopher Smith/Rochester/IBM@IBMUS > 09/06/2001 cc: > 09:10 AM From: Dave Wall/Rochester/IBM@IBMUS > Subject: Problems with a keyed file read > > > > > > > Any idea? > > > David Wall > 553-5329 > AS/400 Toolbox for Java > > ----- Forwarded by Dave Wall/Rochester/IBM on 09/06/2001 09:10 AM ----- > > "Robert Upshall" > <rupshall@psasoft. To: <java400-l@midrange.com> > com> cc: > Sent by: Subject: Problems with a keyed file read > java400-l-admin@mi > drange.com > > > 09/06/2001 09:11 > AM > Please respond to > java400-l > > > > > > This is a multi-part message in MIME format. > -- > [ Picked text/plain from multipart/alternative ] > Has anybody ever had any problems useing a keyed read with JTOpen when one > of the key fields in the file is a CHAR of length 1 in the DB2 file? > > I keep getting a casting error on my file.read(key) method. What is seems > like is because the its a CHAR of len 1 java thinks its a type char, but I > can't put type char in the key because key needs to be an array of objects > and primitave types are not objects. I tried using types Character and > String but both give me the casting error, anybody have any ideas? > > > Robert Upshall > Professional Software of Amarillo > (806) 358-8928 > rupshall@psasoft.com > > -- > > _______________________________________________ > This is the Java Programming on and around the iSeries / AS400 (JAVA400-L) > mailing list > To post a message email: JAVA400-L@midrange.com > To subscribe, unsubscribe, or change list options, > visit: http://lists.midrange.com/cgi-bin/listinfo/java400-l > or email: JAVA400-L-request@midrange.com > Before posting, please take a moment to review the archives > at http://archive.midrange.com/java400-l. > > > > > > > > > > _______________________________________________ > This is the Java Programming on and around the iSeries / AS400 (JAVA400-L) mailing list > To post a message email: JAVA400-L@midrange.com > To subscribe, unsubscribe, or change list options, > visit: http://lists.midrange.com/cgi-bin/listinfo/java400-l > or email: JAVA400-L-request@midrange.com > Before posting, please take a moment to review the archives > at http://archive.midrange.com/java400-l. >
As an Amazon Associate we earn from qualifying purchases.
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.