I have a script that currently uses php ibm_db2 functions to connect to DB2 Express C on an Ubuntu 14.04 server. When I try to translate that same script to remotely connect to a database on DB2 z/OS, I recieve this error, "[IBM][CLI Driver] SQL1598N An attempt to connect to the database server failed because of a licensing problem. SQLSTATE=42968 SQLCODE=-1598". I've searched this website, http://www-01.ibm.com/support/docview.wss?uid=swg21305417, which basically told me the driver used by the ibm_db2 functions cannot conntact the database because of non-matching drivers and licences. How do I go about finding a driver and license to install on my Ubuntu machine to connect to DB2 on z/Os? Or am I going about this the wrong way?
Here's the connection code I'm using.
<?php
$database = 'Location';
$user = 'USERSIDS';
$password = 'PASSWRD';
$hostname = 'hostname of z/os';
$port = port;
$conn_string = "DRIVER={DB2};DATABASE=$database;" .
"HOSTNAME=$hostname;PORT=$port;PROTOCOL=TCPIP;UID=$user;PWD=$password;";
$conn = db2_connect($conn_string, '', '');
?>
The DB2 CLI/ODBC driver cannot connect directly to a DB2 z/OS database. You need to install and configure the product called DB2 Connect that serves as a gateway.