I'm using the native AS/400 JDBC driver. The following code works fine:
------------------------------------------------
query = "SELECT * FROM GDPF WHERE GDUSID=?";
pstmt = con.prepareStatement(query);
pstmt.setString(1, equser);
rs = pstmt.executeQuery();
while (rs.next()) {
String option = rs.getString("GDOID");
.
.
.
------------------------------------------------
but when I replace "SELECT *" with "SELECT GDOID" (that's the only field of
the result set I'm actually interested in) rs.getString("GDOID") returns a
garbled value (it looks like it's not properly converted from EBCDIC,
although I may be wrong). CCSID of the file is set to 37 but no specific
CCSID was defined for GDOID field. CCSIDs of the system and the jobs
involved are all set to 37.
What's wrong? Or could it be that the driver is working as designed?
Lo