How to tell DDF to use a specific SQLID Keywords:JDBC,DB2Connect,OS390,DBMSindependent 
Author Message
 How to tell DDF to use a specific SQLID Keywords:JDBC,DB2Connect,OS390,DBMSindependent

When your connecting to an RDBMS, you'll pass a database(url),userid
and pasword to the connection of JDBC. For oracle an SQL-server thats
no problem. We make a database on the server and give it a USER,
password specific for that database. When where coding the SQL the
databasename is not required as a prefix of the tablename. So no
problem.
When i connect to DB2 on OS390 via db2-connect i have to give
databasename which is the same as the OS390 system-name. All our views
will be created as YIPYIP.tablename . The tables are created with
SQLID set to TB1 (Systemname) a create "tablename". In COBOL os390 whe
don't prefix the views in the dml. In the plan where using is the
SQLID set to YIPYIP.
DB2-connect connects through DDF to DB2. A virtual plan is used
(DISTSERV). It is not in the plantable. I want DISTSERV to use SQLID
'YIPYIP' so that i don't have to prefix the views wich i refer to via
JDBC. Or better let DDF use my own specific (DDF/JDBC) plan. The same
as DISTSERV (whatever it may contain??) but with my extension.
When I don't prefix the view in my code, the given userid will be used
for prefixing. But that means that i have to make a userid on the
mainframe wich is called YIPYIP.

A solution would be that i prefix the views in my coding depending if
i'm connecting to DB2 or the other DBMS'es. But i want my JAVA-code
clean and not dbms-specific.
Does anyone know a other/better solution ?

Thanks in advance,
Pierre.



Mon, 09 Aug 2004 17:38:28 GMT
 How to tell DDF to use a specific SQLID Keywords:JDBC,DB2Connect,OS390,DBMSindependent

Not sure it this will help but here it goes.

I know that in the CCA (client side, Client configuration assistant)
you can set odbc/cli variables. (jdbc is over odbc if i remember correctly)
CURRENTSQLID (set current sqlid)
DBNAME (specifies the db name)
may be of interest here.

PM



Mon, 09 Aug 2004 22:08:30 GMT
 How to tell DDF to use a specific SQLID Keywords:JDBC,DB2Connect,OS390,DBMSindependent
Pierre

1. create synonyms for your tables e.g.:
connect to DB2/390 with your user (eg. USER1)
create synonym <table> for YIPYIP.<table>
then you can (connected as USER1)
select * from <table>
Synonyms are "private" objects so every user who connects must create
its own synonyms

2. create a separate packageset for your CLI packages


YIPYIP_COLL) and specify QUALIFIER YIPYIP
in db2cli.ini specify CURRENTPACKAGESET YIPYIPCOLL for your data
source.
this works for ODBC calls, not sure if it works for JDBC as well

HTH
Joachim

Quote:

> When your connecting to an RDBMS, you'll pass a database(url),userid
> and pasword to the connection of JDBC. For oracle an SQL-server thats
> no problem. We make a database on the server and give it a USER,
> password specific for that database. When where coding the SQL the
> databasename is not required as a prefix of the tablename. So no
> problem.
> When i connect to DB2 on OS390 via db2-connect i have to give
> databasename which is the same as the OS390 system-name. All our views
> will be created as YIPYIP.tablename . The tables are created with
> SQLID set to TB1 (Systemname) a create "tablename". In COBOL os390 whe
> don't prefix the views in the dml. In the plan where using is the
> SQLID set to YIPYIP.
> DB2-connect connects through DDF to DB2. A virtual plan is used
> (DISTSERV). It is not in the plantable. I want DISTSERV to use SQLID
> 'YIPYIP' so that i don't have to prefix the views wich i refer to via
> JDBC. Or better let DDF use my own specific (DDF/JDBC) plan. The same
> as DISTSERV (whatever it may contain??) but with my extension.
> When I don't prefix the view in my code, the given userid will be used
> for prefixing. But that means that i have to make a userid on the
> mainframe wich is called YIPYIP.

> A solution would be that i prefix the views in my coding depending if
> i'm connecting to DB2 or the other DBMS'es. But i want my JAVA-code
> clean and not dbms-specific.
> Does anyone know a other/better solution ?

> Thanks in advance,
> Pierre.



Tue, 10 Aug 2004 17:35:18 GMT
 How to tell DDF to use a specific SQLID Keywords:JDBC,DB2Connect,OS390,DBMSindependent
Remote connections are using packages not plans.



Quote:
> When your connecting to an RDBMS, you'll pass a database(url),userid
> and pasword to the connection of JDBC. For oracle an SQL-server thats
> no problem. We make a database on the server and give it a USER,
> password specific for that database. When where coding the SQL the
> databasename is not required as a prefix of the tablename. So no
> problem.
> When i connect to DB2 on OS390 via db2-connect i have to give
> databasename which is the same as the OS390 system-name. All our views
> will be created as YIPYIP.tablename . The tables are created with
> SQLID set to TB1 (Systemname) a create "tablename". In COBOL os390 whe
> don't prefix the views in the dml. In the plan where using is the
> SQLID set to YIPYIP.
> DB2-connect connects through DDF to DB2. A virtual plan is used
> (DISTSERV). It is not in the plantable. I want DISTSERV to use SQLID
> 'YIPYIP' so that i don't have to prefix the views wich i refer to via
> JDBC. Or better let DDF use my own specific (DDF/JDBC) plan. The same
> as DISTSERV (whatever it may contain??) but with my extension.
> When I don't prefix the view in my code, the given userid will be used
> for prefixing. But that means that i have to make a userid on the
> mainframe wich is called YIPYIP.

> A solution would be that i prefix the views in my coding depending if
> i'm connecting to DB2 or the other DBMS'es. But i want my JAVA-code
> clean and not dbms-specific.
> Does anyone know a other/better solution ?

> Thanks in advance,
> Pierre.



Wed, 11 Aug 2004 11:51:12 GMT
 How to tell DDF to use a specific SQLID Keywords:JDBC,DB2Connect,OS390,DBMSindependent
At the client this keywords only works with ODBC or the JDBC app driver. If
you work with the net driver the db2cli.ini from the connect gateway sets
the configuration.



Quote:
> Not sure it this will help but here it goes.

> I know that in the CCA (client side, Client configuration assistant)
> you can set odbc/cli variables. (jdbc is over odbc if i remember
correctly)
> CURRENTSQLID (set current sqlid)
> DBNAME (specifies the db name)
> may be of interest here.

> PM



Wed, 11 Aug 2004 12:01:30 GMT
 
 [ 5 post ] 

 Relevant Pages 

1. java sqlj db2connect to DB2/OS390

2. Need to have customized DDF file names (say MyFile.ddf instead of file.ddf)

3. Problems with JDBC connectivity to DB2Connect Server

4. Find Specific Keywords

5. provider-specific keywords

6. Developing IBMVA JDBC with NT DB2 driver to run on OS390 DB2 driver

7. JDBC Driver for os390

8. NJ-Bridgewater-260559--JavaBeans-JDBC-HTML-SQL-JDBC-ORACLE-Java Developer

9. Developing IBMVA JDBC with NT DB2 driver to run on OS390 DB2 driver

10. Universe Debugger: Can anyone tell me specifics?

11. send specific oracle 8i table data to specific sql server 2000 table at specific times


 
Powered by phpBB® Forum Software