|
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.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.