Library list issues

General discussion on Zend Server for IBM System i

Library list issues

Postby longnoz on Fri Apr 13, 2018 10:22 pm


We typically use db2_connect and pass a set of libraries in the i5_libl paramater. This works perfectly for our db2_exec commands (ie simple SQL)
$db = db2_connect($serial_no,strtoupper($_SERVER['PHP_AUTH_USER']),strtoupper($_SERVER['PHP_AUTH_PW']),array('i5_libl' => 'LIBERTU SFALIBR QS36F', 'i5_naming' => DB2_I5_NAMING_ON));

But when we use the toolkit, we are having trouble understanding how the LIBL is working. We use the following command in what we believe is an attempt to re-use the same connection we have used for db2_exec commands:
$obj = ToolkitService::getInstance($db);

Yet in order to successfully call our service program function by means of a PgmCall command, we are obliged to rebuild our library list using a bunch of calls to CLCommand(addlible...) .
$result = $obj->PgmCall($program, $library , $param, $retParam, array('func'=>'StockAvailable') );

It is at this link that we were led to believe we could re-use the existing DB connection: ... ctions.htm

Posts: 30
Joined: Thu Feb 16, 2012 8:55 pm

Return to Zend Server for IBM i

Who is online

Users browsing this forum: No registered users and 4 guests