JZOS JDBC Connection: username and password

General discussion on the JZOS batch launcher and toolkit
Post Reply
Johnny1234
Posts: 3
Joined: Wed Jan 18, 2012 8:25 am

JZOS JDBC Connection: username and password

Post by Johnny1234 »

Hi to everyone,
i'm now testing the java capabilities on Z/OS using JZOS.

I successfully connect to DB2 using JDBC type 4 drivers and specifying USERNAME/PASSWORD in clear code.
By the way i think this is not a correct soluction for a production environment.

Which is the best practice for this situation?? How is'it possible to bind the DB2 credential to the same user that launched the job?

Thankyou
Johnny1234
Posts: 3
Joined: Wed Jan 18, 2012 8:25 am

Re: JZOS JDBC Connection: username and password

Post by Johnny1234 »

I have tried using TYPE2 JDBC Drivers (without setting username/pwd parameters).
I'm getting this while loading the native library db2jcct2zos

com.ibm.db2.jcc.am.SqlException: [jcc][10389][12245][3.62.57]
Error Loading native library db2jcct2zos, java.lang.UnsatisfiedLinkError: db2jcct2zos (Not found in java.library.path): ERRORCODE=-4472, SQLSTATE=null

com.ibm.db2.jcc.am.SqlException: [jcc][50053][12310][3.62.57] Exception T2zOS: [jcc][T2zos]T2zosConfiguration.init:
Although there are many possible causes for the failure to load the JCC type 2 z/OS DLL, the most common causes that should be reviewed are:
1) Incorrect or missing LIBPATH setting;
2) incorrect or missing STEPLIB;
3) attempting to run in an APF authorized execution environment using an HFS resident JCC type 2 z/OS DLL that does not have the necessary HFS extended attribute setting for use in an APF authorize

Suggestions??

Thankyou
dovetail
Site Admin
Posts: 2022
Joined: Thu Jul 29, 2004 12:12 pm

Re: JZOS JDBC Connection: username and password

Post by dovetail »

You may wish to take a look at the sample JCL and instructions for T:Z quickstart for Apache Tomcat (download available on our site). The sample JCL uses JZOS to start Tomcat in a batch job, and it includes the STEPLIBs etc for DB2.
Post Reply