SQLJ and DB2/390

Gary Jobe

SQLJ and DB2/390
We are currently trying to use sqlj, and DB2 connect to access DB2/390. We
get
the sqlj to compile and by using db2profc we get the package to bind on
DB2/390.
However, when the application is executed the package is not used for
accessing
DB2, instead there is a dynamic bind and execute. Also, we are using
unqualified
table names in the sqlj, which when executed defaults to the current sqlid
instead of
the qualifier used in the bind. Can anyone let me know how to get this to
work?



Gary Jobe

SQLJ and DB2/390
(in response to Gary Jobe)
We are currently trying to use sqlj, and DB2 connect to access DB2/390. We
get the sqlj to compile and by using db2profc we get the package to bind on
DB2/390. However, when the application is executed the package is not used
for accessing DB2, instead there is a dynamic bind and execute. Also, we
are using unqualified table names in the sqlj, which when executed defaults
to the current sqlid instead of the qualifier used in the bind. Can anyone
let me know how to get this to work?



Simon George

Re: SQLJ and DB2/390
(in response to Gary Jobe)
Gary,

Several guesses here as we do use SQLJ extensively but on NT we use dymanic
SQL for testing and only profile for static when we deploy to 390. I'm
assuming to get the DBRM's you require you have run the DB2PROFC under
390/USS. As such this will have not only produced the DBRM you require but
also modified the serialised profile (.ser file) to say that you want to run
statically. These modified ser's need to be available at execution time so I
suspect you need to copy them back to the client.

Simon

>From: Gary Jobe <[login to unmask email]>
>Reply-To: DB2 Data Base Discussion List <[login to unmask email]>
>To: [login to unmask email]
>Subject: SQLJ and DB2/390
>Date: Wed, 2 Jan 2002 09:57:37 -0600
>
>We are currently trying to use sqlj, and DB2 connect to access DB2/390. We
>get the sqlj to compile and by using db2profc we get the package to bind on
>DB2/390. However, when the application is executed the package is not used
>for accessing DB2, instead there is a dynamic bind and execute. Also, we
>are using unqualified table names in the sqlj, which when executed defaults
>to the current sqlid instead of the qualifier used in the bind. Can anyone
>let me know how to get this to work?
>
>
>
>
>




Cheers
Simon


_________________________________________________________________
MSN Photos is the easiest way to share and print your photos:
http://photos.msn.com/support/worldwide.aspx



Gary Jobe

Re: SQLJ and DB2/390
(in response to Simon George)
Simon,
We are running DB2PROFC from NT but we are connected to DB2/390 through
DB2/connect. So the .ser is already at the client and a package does get
bound in DB2/390. The problem is that at execution time I do not believe
the package is being executed because a prepare( dynamic bind) is coming
through. Also, the client is receiving an error because we use unqualified
names in the code and bind with a qualifier.

Are you running a DB2 instance on NT that would have the same package bound
there?



Simon George
<[login to unmask email] To: [login to unmask email]
TMAIL.COM> cc:
Sent by: DB2 Data Subject: Re: SQLJ and DB2/390
Base Discussion
List
<[login to unmask email]>


01/03/02 09:27 AM
Please respond to
DB2 Data Base
Discussion List






Gary,

Several guesses here as we do use SQLJ extensively but on NT we use dymanic
SQL for testing and only profile for static when we deploy to 390. I'm
assuming to get the DBRM's you require you have run the DB2PROFC under
390/USS. As such this will have not only produced the DBRM you require but
also modified the serialised profile (.ser file) to say that you want to
run
statically. These modified ser's need to be available at execution time so
I
suspect you need to copy them back to the client.

Simon

>From: Gary Jobe <[login to unmask email]>
>Reply-To: DB2 Data Base Discussion List <[login to unmask email]>
>To: [login to unmask email]
>Subject: SQLJ and DB2/390
>Date: Wed, 2 Jan 2002 09:57:37 -0600
>
>We are currently trying to use sqlj, and DB2 connect to access DB2/390.
We
>get the sqlj to compile and by using db2profc we get the package to bind
on
>DB2/390. However, when the application is executed the package is not
used
>for accessing DB2, instead there is a dynamic bind and execute. Also, we
>are using unqualified table names in the sqlj, which when executed
defaults
>to the current sqlid instead of the qualifier used in the bind. Can
anyone
>let me know how to get this to work?
>
>
>
>
>




Cheers
Simon


_________________________________________________________________
MSN Photos is the easiest way to share and print your photos:
http://photos.msn.com/support/worldwide.aspx








Simon George

Re: SQLJ and DB2/390
(in response to Gary Jobe)

Hi Gary,

Not at all sure that will work. The profiles are unique to the dbms/environment you deploy the dbrm on. Therefore if you are deploying to DB2/390 you should use the DB2PROFC that is supplied with that product not the NT one.


Cheers Simon >From: Gary Jobe >Reply-To: DB2 Data Base Discussion List >To: [login to unmask email] >Subject: Re: SQLJ and DB2/390 >Date: Thu, 3 Jan 2002 10:18:35 -0600 > >Simon, >We are running DB2PROFC from NT but we are connected to DB2/390 through >DB2/connect. So the .ser is already at the client and a package does get >bound in DB2/390. The problem is that at execution time I do not believe >the package is being executed because a prepare( dynamic bind) is coming >through. Also, the client is receiving an error because we use unqualified >names in the code and bind with a qualifier. > >Are you running a DB2 instance on NT that would have the same package bound >there? > > > > Simon George > > TMAIL.COM> cc: > Sent by: DB2 Data Subject: Re: SQLJ and DB2/390 > Base Discussion > List > > > > 01/03/02 09:27 AM > Please respond to > DB2 Data Base > Discussion List > > > > > > >Gary, > >Several guesses here as we do use SQLJ extensively but on NT we use dymanic >SQL for testing and only profile for static when we deploy to 390. I'm >assuming to get the DBRM's you require you have run the DB2PROFC under >390/USS. As such this will have not only produced the DBRM you require but >also modified the serialised profile (.ser file) to say that you want to >run >statically. These modified ser's need to be available at execution time so >I >suspect you need to copy them back to the client. > >Simon > > >From: Gary Jobe > >Reply-To: DB2 Data Base Discussion List > >To: [login to unmask email] > >Subject: SQLJ and DB2/390 > >Date: Wed, 2 Jan 2002 09:57:37 -0600 > > > >We are currently trying to use sqlj, and DB2 connect to access DB2/390. >We > >get the sqlj to compile and by using db2profc we get the package to bind >on > >DB2/390. However, when the application is executed the package is not >used > >for accessing DB2, instead there is a dynamic bind and execute. Also, we > >are using unqualified table names in the sqlj, which when executed >defaults > >to the current sqlid instead of the qualifier used in the bind. Can >anyone > >let me know how to get this to work? > > > > > > > > > > > > > > >Cheers >Simon > > >_________________________________________________________________ >MSN Photos is the easiest way to share and print your photos: >http://photos.msn.com/support/worldwide.aspx > > > > > > > >

Get your FREE download of MSN Explorer at http://explorer.msn.com.