If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > JDBC connectivity to os/390

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-12-05, 11:01
Jake K Jake K is offline
Registered User
 
Join Date: Feb 2004
Posts: 107
JDBC connectivity to os/390

From a java application running in a WindowsXP machine, I want to access the data in DB2 v7.1 for os/390 using JDBC connectivity. I have installed DB2Connect v8.1 in windows XP machine.

I like to know

1. the jdbc driver class name to be used. (is it COM.ibm.db2os390.sqlj.jdbc.DB2SQLJDriver
or
COM.ibm.db2.jdbc.net.DB2Driver)

2. Do i need to catalog the os/390 database name in my machine using DB2 connect?

Jake
Reply With Quote
  #2 (permalink)  
Old 02-13-05, 17:42
jacampbell jacampbell is offline
Registered User
 
Join Date: Jan 2005
Posts: 191
COM.ibm.db2os390.sqlj.jdbc.DB2SQLJDriver is for applications running on an OS390 or zOS system

You'll have to use COM.ibm.db2.jdbc.net.DB2Driver - this is a type 3 driver for use with applets. If you are writing a Java application you'll have to use the type 2 driver - COM.ibm.db2.jdbc.app.DB2Driver.

And, yes, you'll have to catalog the os390 system as a DCS database.

James Campbell
Reply With Quote
  #3 (permalink)  
Old 02-25-05, 05:45
saravanan.ks saravanan.ks is offline
Registered User
 
Join Date: Feb 2005
Posts: 2
hi.,
I'm running the JAVA SP on z/OS while calling my java SP from DB2DC it's gives following message in /u/db8g/tmp/server_stdout.txt

SQLException raised, SQLState =51002 SQLCODE = -805 :.IBM/DB2..T2zos/1.T2zosConn ection.flowConnect:execConnect:1319B2 engine SQL error,

SQLCODE = -805, SQLST ATE = 51002, error tokens = DALLAS8.TEST01.SYSSTAT.5359534C564C3031;DISTSERV;0 2

but binding the DBRM,creation of packages are completed siccessfully,but don't know
what is the problem.?

Can anyone help me....
Reply With Quote
  #4 (permalink)  
Old 02-26-05, 01:21
jacampbell jacampbell is offline
Registered User
 
Join Date: Jan 2005
Posts: 191
Obviously the binding was not totally successfull :-)

Is the name of your zOS DB2 system DALLAS8?
In it do you have a collection TEST01 which has a package with package-id SYSSTAT and contoken 5359534C564C3031?

The message is saying that one of these is not true. Maybe it got bound somewhere else.

James Campbell
Reply With Quote
  #5 (permalink)  
Old 02-26-05, 08:00
saravanan.ks saravanan.ks is offline
Registered User
 
Join Date: Feb 2005
Posts: 2
Hi James.,

Thanks for your reply.According to your point problem in the bind step , But while binding time it's completed successfully and also calling the procedure from DB2DC running fine. but it did not shown SQL query output.

I could not under stand why it's refere SYSSTAT package my actual package TEST01.

in bind statement BIND PLAN(TEST01) PKLIST(TEST01.*,DSNJDBC.*)

EXTERNAL NAME 'DB2ADM.TEST01_JAR:TEST01.Test01.GetTest01'

if my bind step processes wrong means What could be correct step..?

Thanks.,
Saravanan
Reply With Quote
  #6 (permalink)  
Old 02-27-05, 19:24
jacampbell jacampbell is offline
Registered User
 
Join Date: Jan 2005
Posts: 191
When a connection is made from a remote system DB2 uses plan DISTSERV - that's why it appears as part of the message tokens. A plan named TEST01 has nothing to do with this situation.

If you break out the message tokens you'll see that they contain a fully qualified package name and reason code 02. If you read the zOS messages and codes (because that's where the error is occuring) you'll see that it means "The DBRM name 'dbrm-name' did not match an entry in the member list or the package list." In this situation the plan pklist is immaterial - the code has issued
SET PACKAGESET = 'TEST01'
and so collid TEST01 is being used.

What you need to look for is the command
BIND PACKAGE(TEST01) MEMBER(SYSSTAT) ...
(or BIND PACKAGE(TEST01) COPY(collid.SYSSTAT) )
DB2 is complaining because this hasn't been done successfully. SYSSTAT is probably some system package.

I am wondering if you are calling a host based Java stored procedure, in whose definition you specified
COLLID TEST01
In this situation TEST01 is a collection id, not a plan name. In my brief experience with zOS Java SPs I found that I needed to bind copy everything from collection DSNJDBC into the "other" collection if I did this.

James Campbell
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On