HP3000-L Archives

December 2001, Week 2

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Mike Yawn <[log in to unmask]>
Reply To:
Mike Yawn <[log in to unmask]>
Date:
Tue, 11 Dec 2001 12:16:37 -0600
Content-Type:
text/plain
Parts/Attachments:
text/plain (58 lines)
Somebody who has actually used JDBC would be better at answering this
question, but I can take a guess
at what I believe is probably happening.  You mention that your key field is
a 'concatenated field'.  By this,
do you mean that a single field in the TurboIMAGE database is being split
out in the COBOL code as
several regions, perhaps of different types?

If that's the case, JDBC is probably trying to treat the field based on its
declared TurboIMAGE type,
which is probably X (character).  If there is actually binary data in the
field, TurboIMAGE won't
complain -- it treats the field types as purely advisory information -- but
JDBC could easily get
tripped up.  In particular, a binary value of zero would be see as a null
string-terminating character
and thus be interpreted as the end of the character field.

I'm not sure what JDBC does when the data type you declare in your code
(where you say
you've tried short, int, and long) doesn't match the data type declared by
the database (which
you didn't specify).  If the database type was ignored in favor of the type
given in your program,
then that would probably work.  But if it's trying to do a conversion from
the declared database
type, then the failure you're reporting is probably just what I would
expect.

Again, not being a JDBC person, I'm not sure this is what is actually
happening, nor do I have
any ideas for workarounds possible within JDBC.   Hopefully someone else can
chime in with
better information about those aspects.

Mike
--
Mike Yawn, Java Architect
Java Customer Satisfaction Team, Hewlett-Packard
Author "Developing Web Services Using J2EE",
   coming from Prentice-Hall in 2002.

"Karla C." <[log in to unmask]> wrote in message
news:9v35b101tkm@enews4.newsguy.com...
> I'm accessing a TurboImage database on our HP3000 using JDBC.  I am having
a problem with my query.  The key field (a concatenated field) contains a
binary code [9(4) COMP in COBOL].  It seems the program looks at the field
up to that point and then stops.  I have tried defining my java field
short,int,long.  None of these has worked.  I have also tried using a *.
Let me know if you need more info.  Any insight is much appreciated.
>
> * To join/leave the list, search archives, change list settings, *
> * etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
>

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2