Nope, not using commitment control.
Yes, I think you are correct about that JOBD being for Easycom. There is
a job called I5_COMD in the ZENDSVR subsystem whose job log just has a
bunch of lines like:
Job 587938/WEB@#USER/PHPJOB submitted to job queue I5_COMJOBQ in library
ZENDSVR.
It's not clear to me whether this happens for each program called from the
PHP script, whether it happens once per script, or whether it also happens
on an SQL statement. I do know that when I changed the job description to
produce a job log and to log CL commands, I see the CL statements from the
programs called by PHP and when I deliberately put some invalid statement
into my SQL that the job log tells me so.
Here is the SQL in question. How would I write the error to a log file?
$searchstring =
"INSERT into ARF60 (CCAUTH, CCTXID, CCAMT, CCCARD, CCFNAM, CCLNAM,
CCTIME, CCTYPE)
VALUES( '$Approval',
'$CCTXID',
$CCAMT,
'$CCCARD',
'$CCFNAM',
'$CCLNAM',
'$CCTIME',
'$CCTYPE')";
$sql_result = i5_query ($searchstring);
if($sql_result) {
}
else {
echo "Error code: " . i5_errno() . "";
echo "Error message: " . i5_errormsg() . "";
var_dump(i5_error());
}
}
Larry Kleinman
Kleinman Associates, Inc.
212-949-6469
From: Alan Seiden <alan@xxxxxxxxxxxxxx>
To: Larry Kleinman <larry@xxxxxxxxxxxxxxxxx>
Cc: Web Enabling the AS400 / iSeries <web400@xxxxxxxxxxxx>
Date: 11/16/2012 09:54 AM
Subject: Re: [WEB400] looking for zend job log
Larry,
EACJOBD is for Easycom ("i5 toolkit") processes, I believe.
Regarding the db2 error functions, you could send their output to a log
file rather than to the page. Then you'd have a record of what went wrong
instead of relying on users to tell you.
One more question: are you using commitment control in PHP? If so, an
automatic rollback on error could explain why records don't appear (though
doesn't explain multiple records).
Alan
On 11/16/12 8:30 AM, Larry Kleinman wrote:
Thanks, Alan. I already have code similar to slide 54, which would show
an error in the browser. I can't rule out that there is some message
appearing which the users are not telling us about, but I don't think that
is the case. I don't see anything in the error log around the time that
the problem has happened. I just changed the EACJOBD job description to
produce a job log when the job ends, and I am hoping to find something
there when this happens again. If you have any other suggestions about
how to trace this, I would certainly appreciate it.
Larry Kleinman
Kleinman Associates, Inc.
212-949-6469
From: Alan Seiden <alan@xxxxxxxxxxxxxx>
To: Web Enabling the AS400 / iSeries <web400@xxxxxxxxxxxx>
Cc: Larry Kleinman <larry@xxxxxxxxxxxxxxxxx>
Date: 11/15/2012 05:30 PM
Subject: Re: [WEB400] looking for zend job log
Larry, if you're doing DB2 inserts, check out slide# 54 here:
http://www.slideshare.net/aseiden/db2-and-php-best-practices-on-ibm-i
It shows how to check for errors and to find the exact error text for
SQL queries to ibm_db2.
If you just want PHP errors, find the PHP log at
/usr/local/zendsvr/var/log/php.log
Alan
On 11/15/12 3:38 PM, Larry Kleinman wrote:
Does anyone know how to change the logging level of a job submitted from
a
PHP script using Zend Server that runs some SQL? I have a script that
does an SQL insert and 99% of the time it works fine. Occasionally, the
record that should have been added is not there, and occasionally I get
several of the same record instead of just one.
Larry Kleinman
Kleinman Associates, Inc.
212-949-6469
As an Amazon Associate we earn from qualifying purchases.