Skip to content

Instantly share code, notes, and snippets.

@plavjanik
Created August 11, 2022 13:22
Show Gist options
  • Save plavjanik/59a4c40243dfcba06f76f39bb2a86418 to your computer and use it in GitHub Desktop.
Save plavjanik/59a4c40243dfcba06f76f39bb2a86418 to your computer and use it in GitHub Desktop.
Connecting to Db2 for z/OS
import ibm_db
userid = ...
password = ...
ibm_db_conn = ibm_db.pconnect(
"database=DATABASE;hostname=your.system.net;port=1234;protocol=tcpip;uid=%s;pwd=%s"
% (userid, password),
"",
"",
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment