×
The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.
I believe the QSH issue you are hitting is due to us now building against
readline or ncurses. It causes weird issues in QSH because both are trying
to do line buffering.
As to the connection options, the first argument to connect is a DSN
string (like ODBC expects), so passing just "*LOCAL" won't work, but you
can pass it to the database parameter. Here's a couple different examples:
import ibm_db_dbi as db2
# *LOCAL w/ myuser
conn = db2.connect(user="myuser", password="Passw0rd")
# MyRDB w/ current user
conn = db2.connect(database="MyRDB")
# Same as above, but using connection string
conn = db2.connect("DATABASE=*LOCAL;UID=myuser;PWD=Passw0rd")
conn = db2.connect("DATABASE=MyRDB")
If you create a server authentication entry with ADDSVRAUTE, you can also
connect to a remote database without specifying a username and password.
There's some Python examples over at
[1]
https://github.com/Club-Seiden/python-for-IBM-i-examples. We're working
on updating them for the new yum version of Python and trying to add some
more as well.
References
Visible links
1.
https://github.com/Club-Seiden/python-for-IBM-i-examples
As an Amazon Associate we earn from qualifying purchases.