We've just started using PHP and Zend Server to grab data from our db2 tables and use the information to issue calls to a web API, then update the records in the tables. Our first PHP script runs fine when called interactively in QP2TERM, but when I submit it to batch using QP2SHELL or QP2SHELL it seems to have problems.
It's not a parameter issue in the calling CL, they are all null terminated and the script seems to start okay, but all I can see in the job log for the BCI job are two SQ99999 messages:
First reason code 9 (Argument value not valid), then reason 10 (Function sequence error). The zend server php log just shows repetitions of:
[21-Aug-2015 16:17:25 America/Creston] var0
[21-Aug-2015 16:17:36 America/Creston] var0
[21-Aug-2015 16:19:09 America/Creston] var0
[21-Aug-2015 16:19:20 America/Creston] var0
I've managed to get remote debugging working in Zend Studio for scripts called interactively; is it possible to debug php-cli running in batch (similar to the way I can strsrvjob on an IBM i program)? I tried submitting the PHP to Qshell and rerouting stderr, but the job just ends without producing any log (where the PHP script should be looping); probably a syntax error in the call, but not one I can find!
Any help/suggestions would be gratefully received.