The error message says
SQL1598N An attempt to connect to the database server failed because of a licensing problem.
Explanation:
This message can be returned in the following situations:
Connecting directly to the database server using IBM DB2 Connect Unlimited Edition for System z
If you use IBM DB2 Connect Unlimited Edition for System z to
connect directly to the database server, this message is
returned when a valid license has not been activated on the DB2
for z/OS subsystem.
Connecting directly to the database server using an edition of IBM DB2 Connect other than IBM DB2 Connect Unlimited Edition for System z
If you use an edition other than IBM DB2 Connect Unlimited Edition for System z to connect directly to a database server,
this message is returned when a valid license is not present on the client computer.
Connecting to a database server through a DB2 Connect gateway server
If you connect to a database server through a DB2 Connect gateway server, this message is returned when a valid license
is not present on the DB2 Connect gateway server.
User response:
Respond to this message according to which scenario applies to your situation:
Connecting directly to the database server using IBM DB2 Connect Unlimited Edition for System z
If you use IBM DB2 Connect Unlimited Edition for System z to connect directly to the database server, activate the license
by running the activation program in the activation kit.
Connecting directly to the database server using an edition of IBM DB2 Connect other than IBM DB2 Connect Unlimited Edition for System z
If you use an edition other than IBM DB2 Connect Unlimited Edition for System z to connect directly to a database server,
ensure that a DB2 Connect product and valid license key are installed on your client computer.
Connecting to a database server through a DB2 Connect gateway server
If you connect to a database server through a DB2 Connect gateway server, ensure that a valid license key is installed on
the gateway server.
sqlcode: -1598