× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Thanks for the tip on the return value, the issue was that the jobq for the jobs was on hold.

Thanks,
Tommy Holden

-----Original Message-----
From: OpenSource [mailto:opensource-bounces@xxxxxxxxxxxx] On Behalf Of Alan Seiden
Sent: Tuesday, August 02, 2016 9:27 AM
To: Web Enabling the IBM i (AS/400 and iSeries) <web400@xxxxxxxxxxxx>
Cc: opensource@xxxxxxxxxxxx
Subject: Re: [IBMiOSS] [WEB400] PHP & XTOOLKIT

Hi, Tommy,

It would be good programming practice to check the return value from CLCommand(), true or false, to see if it succeeded.

Do you see any errors in /usr/local/zendsvr6/var/log/toolkit.log?

You have debug=true. Anything interesting in /usr/local/zendsvr6/var/log/tkit_debug.log?

Alan
--
Alan Seiden Consulting LLC

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

Office: 201-447-2437 Cell: 201-248-4704
http://www.alanseiden.com | alan@xxxxxxxxxxxxxx http://twitter.com/alanseiden

On Jul 6, 2016, at 9:11 AM, Tommy Holden <Tommy.Holden@xxxxxxxxx> wrote:

Not sure which is the best place so I'm crossposting to web400 & opensource. I have been running this PHP script for over a year but the system was upgraded to v7.2 of IBM I I did manage to get everything ported over to Zend Server 6 and everything was fine until we IPLed Sunday AM. The PHP using SQL still works fine but it seems that the command isn't being passed to the system any assistance would be greatly appreciated. Here is the relevant code with a example of the generated SBMJOB string:
header('Cache-Control: no-store, no-cache, must-revalidate');
header('Pragma: no-cache');
include_once 'authorization.php';
include_once 'ToolkitService.php';
$db = $_SESSION['db'];
$user = $_SESSION['AppUsr'];
$pass = $_SESSION['AppPass'];
try {
$obj = ToolkitService::getInstance($db, $user, $pass);
}

catch (Exception $e) {
echo $e->getMessage(), "\n";
exit();
}

$obj->setToolkitServiceParams(array('InternalKey'=>"/tmp/$user",
'debug'=>true,
'plug' => "iPLUG32K"));

$cmd = "addlible ZENDSVR6";
$obj->CLCommand($cmd);
$cmd = "SBMJOB CMD(CALL PRTV12CHKS) JOB(PRTV12CHKS) USER(" . $user . ") JOBQ(QGPL/OUTQMON) JOBD(" . $_SESSION['jobd'] . ") INLLIBL(*JOBD) LOG(4 00 *SECLVL) LOGCLPGM(*YES) HOLD(*NO)";
// $cmd = "SBMJOB CMD(CALL PRTV12CHKS) JOB(PRTV12CHKS) USER(MYUSER) JOBQ(QGPL/OUTQMON) JOBD(CODA12PRD/CODAPRODJD) INLLIBL(*JOBD) LOG(4 00 *SECLVL) LOGCLPGM(*YES) HOLD(*NO)";
$obj->CLCommand($cmd);
echo $cmd;


Thanks,
Tommy Holden

--
This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400)
mailing list To post a message email: WEB400@xxxxxxxxxxxx To
subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/web400.


--
This is the IBMi Open Source Roundtable (OpenSource) mailing list To post a message email: OpenSource@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/opensource
or email: OpenSource-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/opensource.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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

This mailing list archive is Copyright 1997-2024 by midrange.com 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.