Generally yes, but here's a tip on how to share the db2 connection:

By the way, after you call getInstance(), remember to add this line:
so that the toolkit won't have to spawn additional jobs. 'stateless' mode works best for most people.


Larry Kleinman wrote:
Thanks Alan. Does that mean that if I call an RPG program from the same
script at I use SQL, that I need to do a db2_connect as well as a

Larry Kleinman
Kleinman Associates, Inc.

From: Alan Seiden<alan@xxxxxxxxxxxxxx>
To: "Web Enabling the IBM i (AS/400 and iSeries)"
Date: 03/31/2015 08:29 AM
Subject: Re: [WEB400] using SQL and Zendserver
Sent by: "WEB400"<web400-bounces@xxxxxxxxxxxx>

Hi, Larry,

For SQL, use the db2_* functions (db2_connect, db2_prepare, db2_execute,
etc.). New toolkit didn't re-implement these since they were provided in
the ibm_db2 extension.

*Alan Seiden Consulting LLC*

Project leader, Zend PHP Toolkit for IBM i
Zend Framework certified contributor

Office: 201-447-2437 Cell: 201-248-4704 | alan@xxxxxxxxxxxxxx

Larry Kleinman wrote:
I have used i5_query and -5_program_call for years to do an SSL and RPG
calls from ZendServer for IBM i, but am now using the newer Toolkit. I
have RPG calls working, but can't find documentation for SQL. Here's
I do the RPG stuff

$conn = ToolkitService::getInstance($db, $user, $pass);
$params[] = $conn->AddParameterPackDec('both', 9, 2, '', '', $OHSHDS);
$result = $conn->PgmCall('TWR001', '', $params, null, null);

I have been searching the Zend site for the last two hours and cant'


Larry Kleinman
Kleinman Associates, Inc.

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2022 by and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.