[IBM][CLI Driver] SQL1598N with Python and Z/os

alain pary

[IBM][CLI Driver] SQL1598N with Python and Z/os

hello, 

we have an application python using ODBC .

we can connect to a db2 express  without problem .(localy or remotely)

when we try to connect to a Z/Os we have the following message 

[IBM][CLI Driver] SQL1598N An attempt to connect to the database server failed because of a licensing problem. SQLSTATE=42968
SQLCODE=-1598

so we add a licence file in the python library in the same directory as  the ibm_db.dll  (use for odbc ).

this is not resolving our problem .

I see in some artcicle that the  licence file is place in c:/program files/ibm/IBM DATA SERVER DRIVER/license/ 

we also try that without success .

we are sure that our tcpip/port is ok because we get racf message when we use a bad password. 

do you have any other suggestion or solution , 

regards 

Alain Pary 

Venkat Srinivasan

RE: [IBM][CLI Driver] SQL1598N with Python and Z/os
(in response to alain pary)

I assume Python is running in a distributed server. You have a data driver on the dist server. Normally without a valid license clients cannot directly connect to zOS DB2. You have to go through a DB2 Connect acting as a gateway.

Another approach is to add your enterprise license to the data driver using db2licm -a. Merely copying lic file is not enough.

Yet another approach or preferred way is to install the license on the subsystem so you dont ever have license failures. There is a db2connectactivate script in the installation folders when you bough the DB2 Connect server. Invoke it and it creates the license on the host.

Venkat 

Jørn Thyssen

RE: [IBM][CLI Driver] SQL1598N with Python and Z/os
(in response to Venkat Srinivasan)

FWIW, installing the license on the DB2 server with db2connectactivate is only available for the DB2 Connect Unlimited editions. The db2connectactivate is delivered with the license activation kit (usually downloaded from IBM PassportAdvantage).

We generally recommended direct client connection to DB2 for z/OS instead of using DB2 Connect Servers (which are a relic of the past :))

Best regards,

Jørn Thyssen

Works for IBM Denmark. Views are personal. 

alain pary

RE: [IBM][CLI Driver] SQL1598N with Python and Z/os
(in response to Venkat Srinivasan)

we have our python on a pc , we download db2CLI  to add the odbc driver on the pc , the db2cli install -setup return a succesfull message , but when I try to see it in my odbc configuration panel  , there is no trace of it.

is there another to do this manipulation (i follow instruction from https://www-304.ibm.com/support/docview.wss?uid=swg21418043#[%3Ch2%3E]Installation[%3C%2Fh2%3E] )

regards

Alain Pary

alain pary

RE: [IBM][CLI Driver] SQL1598N with Python and Z/os
(in response to Jørn Thyssen)

hello,

as python only connect via odbc , can we also use your proposition to resolve our connecton problem .

I try to configurate an odbc via db2cli without success .after the db2cli setup -install  , I received a message ok , but the db2 isn't visible via odbc configuration on my pc.

regards

Alain

Venkat Srinivasan

RE: [IBM][CLI Driver] SQL1598N with Python and Z/os
(in response to alain pary)

This is what happens when the vendor decides to indiscriminately change the names, bring multiple client versions to do the same thing. Everything in DB2 connect world is nothing but unnecessary confusion. But once you configure one server, it may look friendly until you find another variation.

The Data server driver for ODBC / CLI cannot connect to DB2 zOS on the host directly without using a DB2 Connect or a valid license. It can however connect to a LUW host.

Do you have a valid license for a DB2 Connect server, unlimited edition. If so try and locate the db2connectactivate script and push the license to the DB2 z/OS host.

You can add the license with db2licm -a /u/mypath/db2conese.lic

Then you need to catalog the data sources. The following assumes direct connection to zOS host from the desktop.

At the windows command prompt, type db2cmd (may require elevated privilege on desktop). This should bring up another command prompt.

db2 catalog tcpip node zosubsysanode remote zossubsysa.myorg.com server tcpipport_for_zossubsysa

(remote is the domain name or ip address for sbsystem and server is the TCPIP listening port)

db2 catalog db zossubsysa_location as zossubsysa at node zossubsysanode authentication SERVER  

Use display ddf on the zOS host to validate the values.

Validate the connection to the host by signing to DB2.

db2 connect to zossusbsysa user myuserid 

If the validation is successful,

db2 catalog system odbc data source zossubsysa

Thereafter odbac apps will see zossubsysa as a database.

If you decide to connect to a DB2 Connect, then the database will need to be cataloged on DB2 connect server first. You will then create a DCS entry. The DCS entry is created with the command

db2 CATALOG DCS DATABASE zossubsysa_location AS zossubsysa parms ",D,INTERRUPT_ENABLED,,,SYSPLEX,,,"

If you go DB2 connect server route your node should point at DB2 Connect server and db alias should point at the dcs you created for db2 connect server.

If you find it hard, please post your display ddf o/p and indicate whether you are using db2 connect gateway server approach or direct connection.

Venkat