Error calling program. Code: UNEXPECTED Msg: XML run loop fa

ffleer
Posts: 17
Joined: Tue Jan 31, 2012 10:44 am

Error calling program. Code: UNEXPECTED Msg: XML run loop fa

Post by ffleer » Wed Apr 03, 2013 2:46 pm

If I call the below subprocedure the php program fails with above mentioned error.
I am at XML level 1.7.8 and PHP Toolkit level 1.5.0.

The debug.log contains the following:


============================================================================================================================================================================Creating new conn with database: '*LOCAL', user or i5 naming flag: '', transport: 'ibm_db2', persistence: ''
Going to create a new db connection at 2013-04-03 13:43:25.
Did create a new db connection in 0.789878 seconds.
Exec start: 2013-04-03 13:43:26
Version of toolkit front end: 1.5.0
IPC: '/tmp/Toolkit'. Control key: *cdata *sbmjob(ZENDSVR/ZSVR_JOBD/XTOOLKIT)
Stmt: call XMLSERVICE.iPLUG512K(?,?,?,?) with transport: ibm_db2
Input XML: <?xml version="1.0" encoding="ISO-8859-1" ?>
<script>
<pgm>
<name before='819/37' after='37/819' hex='on'>53525650474d3031</name>
<lib before='819/37' after='37/819' hex='on'>5147504c</lib>
<func before='819/37' after='37/819' hex='on'>7761636874</func>
</pgm>
</script>
Output XML: <?xml version="1.0" encoding="ISO-8859-1" ?>
<report>
<version>XML Toolkit 1.7.8</version>
<error>
<errnoxml>1100004</errnoxml>
<xmlerrmsg><![CDATA[XML run loop failed]]></xmlerrmsg>
<xmlhint><![CDATA[p(54) <pgm]]></xmlhint>
</error>
<error>
<errnoxml>1000008</errnoxml>
<xmlerrmsg><![CDATA[ILESYM failed]]></xmlerrmsg>
<xmlhint><![CDATA[wacht]]></xmlhint>
</error>
<error>
<errnoxml>1100016</errnoxml>
<xmlerrmsg><![CDATA[XML run pgm failed]]></xmlerrmsg>
<xmlhint><![CDATA[<pgm>
<name before='819/37' after='37/819' hex='on'>535]]></xmlhint>
</error>
<error>
<errnoxml>1100004</errnoxml>
<xmlerrmsg><![CDATA[XML run loop failed]]></xmlerrmsg>
<xmlhint><![CDATA[p(54) <pgm]]></xmlhint>
</error>
<jobinfo>
<jobipc>/tmp/Toolkit</jobipc>
<jobipcskey>010C990E</jobipcskey>
<jobname>XTOOLKIT</jobname>
<jobuser>QTMHHTTP</jobuser>
<jobnbr>723374</jobnbr>
<jobsts>*ACTIVE</jobsts>
<curuser>QTMHHTTP</curuser>
<ccsid>65535</ccsid>
<dftccsid>37</dftccsid>
<paseccsid>819</paseccsid>
<langid>ENU</langid>
<cntryid>US</cntryid>
<sbsname>ZENDSVR</sbsname>
<sbslib>ZENDSVR</sbslib>
<curlib></curlib>
<syslibl>RBTSYSLIB ALTQSYS QSYS QSYS2 QHLPSYS PHSECURE QUSRSYS OPSDLIBP OPSOLIBP PHTOOLS</syslibl>
<usrlibl>QGPL QTEMP</usrlibl>
<jobcpffind>see log scan, not error list</jobcpffind>
</jobinfo>
<joblogscan>
<joblogrec>
<jobcpf>CPF1124</jobcpf>
<jobtime><![CDATA[03/04/13 15:43:26.636180]]></jobtime>
<jobtext><![CDATA[JOB 723374/QTMHHTTP/XTOOLKIT STARTED ON 03/04/13 AT JOB 723374/QTMHHTTP/XTOOLKIT SUBMITTED.]]></jobtext>
</joblogrec>
<joblogrec>
<jobcpf>*NONE</jobcpf>
<jobtime><![CDATA[03/04/13 15:43:26.636180]]></jobtime>
<jobtext><![CDATA[CALL PGM(XMLSERVICE/XMLSERVICE) PARM('/tmp/Toolkit')]]></jobtext>
</joblogrec>
</joblogscan>
<joblog job='XTOOLKIT' user='QTMHHTTP' nbr='723374'>
<![CDATA[5761SS1 V6R1M0 080215 DISPLAY JOB LOG HEMDEV 03/04/13 15:43:27 PAGE 1
JOB NAME . . . . . . . . . . : XTOOLKIT USER . . . . . . : QTMHHTTP NUMBER . . . . . . . . . . . : 723374
JOB DESCRIPTION . . . . . . : ZSVR_JOBD LIBRARY . . . . . : ZENDSVR
MSGID TYPE SEV DATE TIME FROM PGM LIBRARY INST TO PGM LIBRARY INST
CPF1124 INFORMATION 00 03/04/13 15:43:26.633007 QWTPIIPP QSYS 04C0 *EXT *N
MESSAGE . . . . : JOB 723374/QTMHHTTP/XTOOLKIT STARTED ON 03/04/13 AT
15:43:26 IN SUBSYSTEM ZENDSVR IN ZENDSVR. JOB ENTERED SYSTEM ON 03/04/13 AT
15:43:26.
CPI1125 INFORMATION 00 03/04/13 15:43:26.633901 QWTPCRJA QSYS 010F *EXT *N
MESSAGE . . . . : JOB 723374/QTMHHTTP/XTOOLKIT SUBMITTED.
CAUSE . . . . . : JOB 723374/QTMHHTTP/XTOOLKIT SUBMITTED TO JOB QUEUE
ZSVR_JOBQ IN ZENDSVR FROM JOB 723348/QUSER/QSQSRVR. JOB
723374/QTMHHTTP/XTOOLKIT WAS STARTED USING THE SUBMIT JOB (SBMJOB) COMMAND
WITH THE FOLLOWING JOB ATTRIBUTES: JOBPTY(5) OUTPTY(5) PRTTXT()
RTGDTA(QCMDB) SYSLIBL(RBTSYSLIB ALTQSYS QSYS QSYS2 QHLPSYS
PHSECURE QUSRSYS OPSDLIBP OPSOLIBP PHTOOLS) CURLIB(*CRTDFT)
INLLIBL(QGPL QTEMP) INLASPGRP(*NONE) LOG(4 00 *NOLIST) LOGCLPGM(*YES)
LOGOUTPUT(*JOBEND) OUTQ(/*DEV) PRTDEV(PRT01) INQMSGRPY(*RQD) HOLD(*NO)
DATE(*SYSVAL) SWS(00000000) MSGQ(QUSRSYS/QTMHHTTP) CCSID(65535)
SRTSEQ(*N/*HEX) LANGID(ENU) CNTRYID(US) JOBMSGQMX(64) JOBMSGQFL(*WRAP)
ALWMLTTHD(*NO) SPLFACN(*KEEP).
*NONE REQUEST 03/04/13 15:43:26.636180 QWTSCSBJ *N QCMD QSYS 0195
MESSAGE . . . . : -CALL PGM(XMLSERVICE/XMLSERVICE) PARM('/tmp/Toolkit')
]]>
</joblog>
</report>

Exec end: 2013-04-03 13:43:28. Seconds to execute: 1.6280670166016.


Exec start: 2013-04-03 13:43:28
Version of toolkit front end: 1.5.0
IPC: '/tmp/Toolkit'. Control key: *immed
Stmt: call XMLSERVICE.iPLUG512K(?,?,?,?) with transport: ibm_db2
Input XML: <?xml version="1.0" encoding="ISO-8859-1" ?>
Output XML:
Exec end: 2013-04-03 13:43:28. Seconds to execute: 0.018360137939453.

Db disconnect requested and done.
=================================================================================================================

<?php

require_once ('ToolkitService.php');
$conn = ToolkitService::getInstance ( '*LOCAL' );

$result = $conn->PgmCall ( 'SRVPGM01', 'QGPL', null, null, array ('func'=>'wacht') );
if (! $result) {
echo 'Error calling program. Code: ' . $conn->getErrorCode () . ' Msg: ' . $conn->getErrorMsg () . '<BR><BR>';
} else {
echo 'Called program successfully.<BR><BR>';
}
$conn->disconnect();
?>

aseiden
Posts: 875
Joined: Thu Apr 09, 2009 5:45 pm

Re: Error calling program. Code: UNEXPECTED Msg: XML run loo

Post by aseiden » Thu Apr 11, 2013 7:38 am

Subprocedure names are case-sensitive. Is it really "wacht" or should it be "WACHT"?

Alan

ffleer
Posts: 17
Joined: Tue Jan 31, 2012 10:44 am

Re: Error calling program. Code: UNEXPECTED Msg: XML run loo

Post by ffleer » Mon Apr 15, 2013 11:04 am

It is really 'wacht' in lowercase. I tried other (existing) subprocedures with the same result.
p wacht b export
d wacht pr
/free

command = 'dlyjob dly(66)';
qcmdexc(%trim(command):%len(%trim(command)));

/end-free
p e

aseiden
Posts: 875
Joined: Thu Apr 09, 2009 5:45 pm

Re: Error calling program. Code: UNEXPECTED Msg: XML run loo

Post by aseiden » Mon Apr 15, 2013 7:38 pm

Frank,

Make sure you are either using 'stateless' mode:
$conn->setOptions(array('stateless'=>'true));

or specify a job identifier similar to the following:
$conn->setOptions(array('InternalKey'=>'/tmp/ffleer123'));

Please try one of the above and let me know. If it still doesn't work, send me the new debug log, please.

Thanks,
Alan

ffleer
Posts: 17
Joined: Tue Jan 31, 2012 10:44 am

Re: Error calling program. Code: UNEXPECTED Msg: XML run loo

Post by ffleer » Tue Apr 16, 2013 10:43 am

Hi Alan,

With stateless set to true this is the debug.log

Code: Select all

==================================================================================================================
Creating new conn with database: '*LOCAL', user or i5 naming flag: '', transport: 'ibm_db2', persistence: ''
Going to create a new db connection at 2013-04-16 09:21:02.
Did create a new db connection in 0.082652 seconds.
Exec start: 2013-04-16 09:21:02
Version of toolkit front end: 1.5.0
IPC: '/tmp/Toolkit'. Control key: *cdata *sbmjob(ZENDSVR/ZSVR_JOBD/XTOOLKIT)
Stmt: call XMLSERVICE.iPLUG512K(?,?,?,?) with transport: ibm_db2
Input XML: <?xml version="1.0" encoding="ISO-8859-1" ?>
<script>
<pgm>
			<name before='819/37' after='37/819' hex='on'>53525650474d3031</name>
			<lib before='819/37' after='37/819' hex='on'>5147504c</lib>
			 <func before='819/37' after='37/819' hex='on'>7761636874</func>
</pgm>
</script>
Output XML: <?xml version="1.0" encoding="ISO-8859-1" ?>
<report>
<version>XML Toolkit 1.7.8</version>
<error>
<errnoxml>1100004</errnoxml>
<xmlerrmsg><![CDATA[XML run loop failed]]></xmlerrmsg>
<xmlhint><![CDATA[p(54) <pgm]]></xmlhint>
</error>
<error>
<errnoxml>1000008</errnoxml>
<xmlerrmsg><![CDATA[ILESYM failed]]></xmlerrmsg>
<xmlhint><![CDATA[wacht]]></xmlhint>
</error>
<error>
<errnoxml>1100016</errnoxml>
<xmlerrmsg><![CDATA[XML run pgm failed]]></xmlerrmsg>
<xmlhint><![CDATA[<pgm>
			<name before='819/37' after='37/819' hex='on'>535]]></xmlhint>
</error>
<error>
<errnoxml>1100004</errnoxml>
<xmlerrmsg><![CDATA[XML run loop failed]]></xmlerrmsg>
<xmlhint><![CDATA[p(54) <pgm]]></xmlhint>
</error>
<jobinfo>
<jobipc>/tmp/Toolkit</jobipc>
<jobipcskey>01039E67</jobipcskey>
<jobname>XTOOLKIT</jobname>
<jobuser>QTMHHTTP</jobuser>
<jobnbr>896876</jobnbr>
<jobsts>*ACTIVE</jobsts>
<curuser>QTMHHTTP</curuser>
<ccsid>65535</ccsid>
<dftccsid>37</dftccsid>
<paseccsid>819</paseccsid>
<langid>ENU</langid>
<cntryid>US</cntryid>
<sbsname>ZENDSVR</sbsname>
<sbslib>ZENDSVR</sbslib>
<curlib></curlib>
<syslibl>RBTSYSLIB ALTQSYS QSYS QSYS2 QHLPSYS PHSECURE QUSRSYS OPSDLIBP OPSOLIBP PHTOOLS</syslibl>
<usrlibl>QGPL QTEMP</usrlibl>
<jobcpffind>see log scan, not error list</jobcpffind>
</jobinfo>
<joblogscan>
<joblogrec>
<jobcpf>CPF1124</jobcpf>
<jobtime><![CDATA[16/04/13  11:21:02.291495]]></jobtime>
<jobtext><![CDATA[JOB 896876/QTMHHTTP/XTOOLKIT STARTED ON 16/04/13 AT JOB 896876/QTMHHTTP/XTOOLKIT SUBMITTED.]]></jobtext>
</joblogrec>
<joblogrec>
<jobcpf>*NONE</jobcpf>
<jobtime><![CDATA[16/04/13  11:21:02.291495]]></jobtime>
<jobtext><![CDATA[CALL PGM(XMLSERVICE/XMLSERVICE) PARM('/tmp/Toolkit')]]></jobtext>
</joblogrec>
</joblogscan>
<joblog job='XTOOLKIT' user='QTMHHTTP' nbr='896876'>
<![CDATA[5761SS1 V6R1M0 080215                        DISPLAY JOB LOG                        HEMDEV   16/04/13 11:21:02          PAGE    1
  JOB NAME . . . . . . . . . . :   XTOOLKIT        USER  . . . . . . :   QTMHHTTP     NUMBER . . . . . . . . . . . :   896876
  JOB DESCRIPTION  . . . . . . :   ZSVR_JOBD       LIBRARY . . . . . :   ZENDSVR
MSGID      TYPE                    SEV  DATE      TIME             FROM PGM     LIBRARY     INST     TO PGM      LIBRARY     INST
CPF1124    INFORMATION             00   16/04/13  11:21:02.289233  QWTPIIPP     QSYS        04C0     *EXT                    *N
                                     MESSAGE . . . . :   JOB 896876/QTMHHTTP/XTOOLKIT STARTED ON 16/04/13 AT
                                       11:21:02 IN SUBSYSTEM ZENDSVR IN ZENDSVR. JOB ENTERED SYSTEM ON 16/04/13 AT
                                       11:21:02.
CPI1125    INFORMATION             00   16/04/13  11:21:02.289468  QWTPCRJA     QSYS        010F     *EXT                    *N
                                     MESSAGE . . . . :   JOB 896876/QTMHHTTP/XTOOLKIT SUBMITTED.
                                     CAUSE . . . . . :   JOB 896876/QTMHHTTP/XTOOLKIT SUBMITTED TO JOB QUEUE
                                       ZSVR_JOBQ IN ZENDSVR FROM JOB 896074/QUSER/QSQSRVR. JOB
                                       896876/QTMHHTTP/XTOOLKIT WAS STARTED USING THE SUBMIT JOB (SBMJOB) COMMAND
                                       WITH THE FOLLOWING JOB ATTRIBUTES: JOBPTY(5) OUTPTY(5) PRTTXT()
                                       RTGDTA(QCMDB) SYSLIBL(RBTSYSLIB  ALTQSYS    QSYS       QSYS2      QHLPSYS
                                       PHSECURE   QUSRSYS    OPSDLIBP   OPSOLIBP   PHTOOLS) CURLIB(*CRTDFT)
                                       INLLIBL(QGPL       QTEMP) INLASPGRP(*NONE) LOG(4 00 *NOLIST) LOGCLPGM(*YES)
                                       LOGOUTPUT(*JOBEND) OUTQ(/*DEV) PRTDEV(PRT01) INQMSGRPY(*RQD) HOLD(*NO)
                                       DATE(*SYSVAL) SWS(00000000)  MSGQ(QUSRSYS/QTMHHTTP) CCSID(65535)
                                       SRTSEQ(*N/*HEX) LANGID(ENU) CNTRYID(US) JOBMSGQMX(64) JOBMSGQFL(*WRAP)
                                       ALWMLTTHD(*NO) SPLFACN(*KEEP).
*NONE      REQUEST                      16/04/13  11:21:02.291495  QWTSCSBJ                 *N       QCMD        QSYS        0195
                                     MESSAGE . . . . :  -CALL PGM(XMLSERVICE/XMLSERVICE) PARM('/tmp/Toolkit')
]]>
</joblog>
</report>

Exec end: 2013-04-16 09:21:03. Seconds to execute: 0.9613139629364.


Exec start: 2013-04-16 09:21:03
Version of toolkit front end: 1.5.0
IPC: '/tmp/Toolkit'. Control key: *immed
Stmt: call XMLSERVICE.iPLUG512K(?,?,?,?) with transport: ibm_db2
Input XML: <?xml version="1.0" encoding="ISO-8859-1" ?>
Output XML:  
Exec end: 2013-04-16 09:21:03. Seconds to execute: 0.061901092529297.

Db disconnect requested and done.
****************************************************************************************************************
Creating new conn with database: '*LOCAL', user or i5 naming flag: '', transport: 'ibm_db2', persistence: ''
Going to create a new db connection at 2013-04-16 09:22:40.
Did create a new db connection in 0.016846 seconds.
Exec start: 2013-04-16 09:22:40
Version of toolkit front end: 1.5.0
IPC: '/tmp/Toolkit'. Control key: *cdata *sbmjob(ZENDSVR/ZSVR_JOBD/XTOOLKIT)
Stmt: call XMLSERVICE.iPLUG512K(?,?,?,?) with transport: ibm_db2
Input XML: <?xml version="1.0" encoding="ISO-8859-1" ?>
<script>
<pgm>
			<name before='819/37' after='37/819' hex='on'>53525650474d3031</name>
			<lib before='819/37' after='37/819' hex='on'>5147504c</lib>
			 <func before='819/37' after='37/819' hex='on'>7761636874</func>
</pgm>
</script>
Output XML: <?xml version="1.0" encoding="ISO-8859-1" ?>
<report>
<version>XML Toolkit 1.7.8</version>
<error>
<errnoxml>1100004</errnoxml>
<xmlerrmsg><![CDATA[XML run loop failed]]></xmlerrmsg>
<xmlhint><![CDATA[p(54) <pgm]]></xmlhint>
</error>
<error>
<errnoxml>1000008</errnoxml>
<xmlerrmsg><![CDATA[ILESYM failed]]></xmlerrmsg>
<xmlhint><![CDATA[wacht]]></xmlhint>
</error>
<error>
<errnoxml>1100016</errnoxml>
<xmlerrmsg><![CDATA[XML run pgm failed]]></xmlerrmsg>
<xmlhint><![CDATA[<pgm>
			<name before='819/37' after='37/819' hex='on'>535]]></xmlhint>
</error>
<error>
<errnoxml>1100004</errnoxml>
<xmlerrmsg><![CDATA[XML run loop failed]]></xmlerrmsg>
<xmlhint><![CDATA[p(54) <pgm]]></xmlhint>
</error>
<jobinfo>
<jobipc>/tmp/Toolkit</jobipc>
<jobipcskey>01039E6B</jobipcskey>
<jobname>XTOOLKIT</jobname>
<jobuser>QTMHHTTP</jobuser>
<jobnbr>896885</jobnbr>
<jobsts>*ACTIVE</jobsts>
<curuser>QTMHHTTP</curuser>
<ccsid>65535</ccsid>
<dftccsid>37</dftccsid>
<paseccsid>819</paseccsid>
<langid>ENU</langid>
<cntryid>US</cntryid>
<sbsname>ZENDSVR</sbsname>
<sbslib>ZENDSVR</sbslib>
<curlib></curlib>
<syslibl>RBTSYSLIB ALTQSYS QSYS QSYS2 QHLPSYS PHSECURE QUSRSYS OPSDLIBP OPSOLIBP PHTOOLS</syslibl>
<usrlibl>QGPL QTEMP</usrlibl>
<jobcpffind>see log scan, not error list</jobcpffind>
</jobinfo>
<joblogscan>
<joblogrec>
<jobcpf>CPF1124</jobcpf>
<jobtime><![CDATA[16/04/13  11:22:40.361704]]></jobtime>
<jobtext><![CDATA[JOB 896885/QTMHHTTP/XTOOLKIT STARTED ON 16/04/13 AT JOB 896885/QTMHHTTP/XTOOLKIT SUBMITTED.]]></jobtext>
</joblogrec>
<joblogrec>
<jobcpf>*NONE</jobcpf>
<jobtime><![CDATA[16/04/13  11:22:40.361704]]></jobtime>
<jobtext><![CDATA[CALL PGM(XMLSERVICE/XMLSERVICE) PARM('/tmp/Toolkit')]]></jobtext>
</joblogrec>
</joblogscan>
<joblog job='XTOOLKIT' user='QTMHHTTP' nbr='896885'>
<![CDATA[5761SS1 V6R1M0 080215                        DISPLAY JOB LOG                        HEMDEV   16/04/13 11:22:40          PAGE    1
  JOB NAME . . . . . . . . . . :   XTOOLKIT        USER  . . . . . . :   QTMHHTTP     NUMBER . . . . . . . . . . . :   896885
  JOB DESCRIPTION  . . . . . . :   ZSVR_JOBD       LIBRARY . . . . . :   ZENDSVR
MSGID      TYPE                    SEV  DATE      TIME             FROM PGM     LIBRARY     INST     TO PGM      LIBRARY     INST
CPF1124    INFORMATION             00   16/04/13  11:22:40.359061  QWTPIIPP     QSYS        04C0     *EXT                    *N
                                     MESSAGE . . . . :   JOB 896885/QTMHHTTP/XTOOLKIT STARTED ON 16/04/13 AT
                                       11:22:40 IN SUBSYSTEM ZENDSVR IN ZENDSVR. JOB ENTERED SYSTEM ON 16/04/13 AT
                                       11:22:40.
CPI1125    INFORMATION             00   16/04/13  11:22:40.359720  QWTPCRJA     QSYS        010F     *EXT                    *N
                                     MESSAGE . . . . :   JOB 896885/QTMHHTTP/XTOOLKIT SUBMITTED.
                                     CAUSE . . . . . :   JOB 896885/QTMHHTTP/XTOOLKIT SUBMITTED TO JOB QUEUE
                                       ZSVR_JOBQ IN ZENDSVR FROM JOB 896074/QUSER/QSQSRVR. JOB
                                       896885/QTMHHTTP/XTOOLKIT WAS STARTED USING THE SUBMIT JOB (SBMJOB) COMMAND
                                       WITH THE FOLLOWING JOB ATTRIBUTES: JOBPTY(5) OUTPTY(5) PRTTXT()
                                       RTGDTA(QCMDB) SYSLIBL(RBTSYSLIB  ALTQSYS    QSYS       QSYS2      QHLPSYS
                                       PHSECURE   QUSRSYS    OPSDLIBP   OPSOLIBP   PHTOOLS) CURLIB(*CRTDFT)
                                       INLLIBL(QGPL       QTEMP) INLASPGRP(*NONE) LOG(4 00 *NOLIST) LOGCLPGM(*YES)
                                       LOGOUTPUT(*JOBEND) OUTQ(/*DEV) PRTDEV(PRT01) INQMSGRPY(*RQD) HOLD(*NO)
                                       DATE(*SYSVAL) SWS(00000000)  MSGQ(QUSRSYS/QTMHHTTP) CCSID(65535)
                                       SRTSEQ(*N/*HEX) LANGID(ENU) CNTRYID(US) JOBMSGQMX(64) JOBMSGQFL(*WRAP)
                                       ALWMLTTHD(*NO) SPLFACN(*KEEP).
*NONE      REQUEST                      16/04/13  11:22:40.361704  QWTSCSBJ                 *N       QCMD        QSYS        0195
                                     MESSAGE . . . . :  -CALL PGM(XMLSERVICE/XMLSERVICE) PARM('/tmp/Toolkit')
]]>
</joblog>
</report>

Exec end: 2013-04-16 09:22:40. Seconds to execute: 0.59806799888611.


Exec start: 2013-04-16 09:22:40
Version of toolkit front end: 1.5.0
IPC: '/tmp/Toolkit'. Control key: *immed
Stmt: call XMLSERVICE.iPLUG512K(?,?,?,?) with transport: ibm_db2
Input XML: <?xml version="1.0" encoding="ISO-8859-1" ?>
Output XML:  
Exec end: 2013-04-16 09:22:40. Seconds to execute: 0.013898849487305.

Db disconnect requested and done.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Creating new conn with database: '*LOCAL', user or i5 naming flag: '', transport: 'ibm_db2', persistence: ''
Going to create a new db connection at 2013-04-16 09:25:25.
Did create a new db connection in 0.040946 seconds.
Exec start: 2013-04-16 09:25:25
Version of toolkit front end: 1.5.0
IPC: '/tmp/ffleer123'. Control key: *cdata *sbmjob(ZENDSVR/ZSVR_JOBD/XTOOLKIT)
Stmt: call XMLSERVICE.iPLUG512K(?,?,?,?) with transport: ibm_db2
Input XML: <?xml version="1.0" encoding="ISO-8859-1" ?>
<script>
<pgm>
			<name before='819/37' after='37/819' hex='on'>53525650474d3031</name>
			<lib before='819/37' after='37/819' hex='on'>5147504c</lib>
			 <func before='819/37' after='37/819' hex='on'>7761636874</func>
</pgm>
</script>
Output XML: <?xml version="1.0" encoding="ISO-8859-1" ?>
<report>
<version>XML Toolkit 1.7.8</version>
<error>
<errnoxml>1100004</errnoxml>
<xmlerrmsg><![CDATA[XML run loop failed]]></xmlerrmsg>
<xmlhint><![CDATA[p(54) <pgm]]></xmlhint>
</error>
<error>
<errnoxml>1000008</errnoxml>
<xmlerrmsg><![CDATA[ILESYM failed]]></xmlerrmsg>
<xmlhint><![CDATA[wacht]]></xmlhint>
</error>
<error>
<errnoxml>1100016</errnoxml>
<xmlerrmsg><![CDATA[XML run pgm failed]]></xmlerrmsg>
<xmlhint><![CDATA[<pgm>
			<name before='819/37' after='37/819' hex='on'>535]]></xmlhint>
</error>
<error>
<errnoxml>1100004</errnoxml>
<xmlerrmsg><![CDATA[XML run loop failed]]></xmlerrmsg>
<xmlhint><![CDATA[p(54) <pgm]]></xmlhint>
</error>
<jobinfo>
<jobipc>/tmp/ffleer123</jobipc>
<jobipcskey>01039E72</jobipcskey>
<jobname>XTOOLKIT</jobname>
<jobuser>QTMHHTTP</jobuser>
<jobnbr>896900</jobnbr>
<jobsts>*ACTIVE</jobsts>
<curuser>QTMHHTTP</curuser>
<ccsid>65535</ccsid>
<dftccsid>37</dftccsid>
<paseccsid>819</paseccsid>
<langid>ENU</langid>
<cntryid>US</cntryid>
<sbsname>ZENDSVR</sbsname>
<sbslib>ZENDSVR</sbslib>
<curlib></curlib>
<syslibl>RBTSYSLIB ALTQSYS QSYS QSYS2 QHLPSYS PHSECURE QUSRSYS OPSDLIBP OPSOLIBP PHTOOLS</syslibl>
<usrlibl>QGPL QTEMP</usrlibl>
<jobcpffind>see log scan, not error list</jobcpffind>
</jobinfo>
<joblogscan>
<joblogrec>
<jobcpf>CPF1124</jobcpf>
<jobtime><![CDATA[16/04/13  11:25:25.439783]]></jobtime>
<jobtext><![CDATA[JOB 896900/QTMHHTTP/XTOOLKIT STARTED ON 16/04/13 AT JOB 896900/QTMHHTTP/XTOOLKIT SUBMITTED.]]></jobtext>
</joblogrec>
<joblogrec>
<jobcpf>*NONE</jobcpf>
<jobtime><![CDATA[16/04/13  11:25:25.439783]]></jobtime>
<jobtext><![CDATA[CALL PGM(XMLSERVICE/XMLSERVICE) PARM('/tmp/ffleer123')]]></jobtext>
</joblogrec>
</joblogscan>
<joblog job='XTOOLKIT' user='QTMHHTTP' nbr='896900'>
<![CDATA[5761SS1 V6R1M0 080215                        DISPLAY JOB LOG                        HEMDEV   16/04/13 11:25:25          PAGE    1
  JOB NAME . . . . . . . . . . :   XTOOLKIT        USER  . . . . . . :   QTMHHTTP     NUMBER . . . . . . . . . . . :   896900
  JOB DESCRIPTION  . . . . . . :   ZSVR_JOBD       LIBRARY . . . . . :   ZENDSVR
MSGID      TYPE                    SEV  DATE      TIME             FROM PGM     LIBRARY     INST     TO PGM      LIBRARY     INST
CPF1124    INFORMATION             00   16/04/13  11:25:25.437375  QWTPIIPP     QSYS        04C0     *EXT                    *N
                                     MESSAGE . . . . :   JOB 896900/QTMHHTTP/XTOOLKIT STARTED ON 16/04/13 AT
                                       11:25:25 IN SUBSYSTEM ZENDSVR IN ZENDSVR. JOB ENTERED SYSTEM ON 16/04/13 AT
                                       11:25:25.
CPI1125    INFORMATION             00   16/04/13  11:25:25.438041  QWTPCRJA     QSYS        010F     *EXT                    *N
                                     MESSAGE . . . . :   JOB 896900/QTMHHTTP/XTOOLKIT SUBMITTED.
                                     CAUSE . . . . . :   JOB 896900/QTMHHTTP/XTOOLKIT SUBMITTED TO JOB QUEUE
                                       ZSVR_JOBQ IN ZENDSVR FROM JOB 896875/QUSER/QSQSRVR. JOB
                                       896900/QTMHHTTP/XTOOLKIT WAS STARTED USING THE SUBMIT JOB (SBMJOB) COMMAND
                                       WITH THE FOLLOWING JOB ATTRIBUTES: JOBPTY(5) OUTPTY(5) PRTTXT()
                                       RTGDTA(QCMDB) SYSLIBL(RBTSYSLIB  ALTQSYS    QSYS       QSYS2      QHLPSYS
                                       PHSECURE   QUSRSYS    OPSDLIBP   OPSOLIBP   PHTOOLS) CURLIB(*CRTDFT)
                                       INLLIBL(QGPL       QTEMP) INLASPGRP(*NONE) LOG(4 00 *NOLIST) LOGCLPGM(*YES)
                                       LOGOUTPUT(*JOBEND) OUTQ(/*DEV) PRTDEV(PRT01) INQMSGRPY(*RQD) HOLD(*NO)
                                       DATE(*SYSVAL) SWS(00000000)  MSGQ(QUSRSYS/QTMHHTTP) CCSID(65535)
                                       SRTSEQ(*N/*HEX) LANGID(ENU) CNTRYID(US) JOBMSGQMX(64) JOBMSGQFL(*WRAP)
                                       ALWMLTTHD(*NO) SPLFACN(*KEEP).
*NONE      REQUEST                      16/04/13  11:25:25.439783  QWTSCSBJ                 *N       QCMD        QSYS        0195
                                     MESSAGE . . . . :  -CALL PGM(XMLSERVICE/XMLSERVICE) PARM('/tmp/ffleer123')
]]>
</joblog>
</report>

Exec end: 2013-04-16 09:25:25. Seconds to execute: 0.42397689819336.


Exec start: 2013-04-16 09:25:25
Version of toolkit front end: 1.5.0
IPC: '/tmp/ffleer123'. Control key: *immed
Stmt: call XMLSERVICE.iPLUG512K(?,?,?,?) with transport: ibm_db2
Input XML: <?xml version="1.0" encoding="ISO-8859-1" ?>
Output XML:  
Exec end: 2013-04-16 09:25:25. Seconds to execute: 0.013909101486206.

Db disconnect requested and done.
When I use the internal key I get the following entries in debug.log:

Code: Select all

$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
Creating new conn with database: '*LOCAL', user or i5 naming flag: '', transport: 'ibm_db2', persistence: ''
Going to create a new db connection at 2013-04-16 09:40:09.
Did create a new db connection in 0.084273 seconds.
Exec start: 2013-04-16 09:40:09
Version of toolkit front end: 1.5.0
IPC: ''. Control key: *cdata *here
Stmt: call XMLSERVICE.iPLUG512K(?,?,?,?) with transport: ibm_db2
Input XML: <?xml version="1.0" encoding="ISO-8859-1" ?>
<script>
<pgm>
			<name before='819/37' after='37/819' hex='on'>53525650474d3031</name>
			<lib before='819/37' after='37/819' hex='on'>5147504c</lib>
			 <func before='819/37' after='37/819' hex='on'>7761636874</func>
</pgm>
</script>
Output XML: <?xml version="1.0" encoding="ISO-8859-1" ?>
<report>
<version>XML Toolkit 1.7.8</version>
<error>
<errnoxml>1100004</errnoxml>
<xmlerrmsg><![CDATA[XML run loop failed]]></xmlerrmsg>
<xmlhint><![CDATA[p(54) <pgm]]></xmlhint>
</error>
<error>
<errnoxml>1000008</errnoxml>
<xmlerrmsg><![CDATA[ILESYM failed]]></xmlerrmsg>
<xmlhint><![CDATA[wacht]]></xmlhint>
</error>
<error>
<errnoxml>1100016</errnoxml>
<xmlerrmsg><![CDATA[XML run pgm failed]]></xmlerrmsg>
<xmlhint><![CDATA[<pgm>
			<name before='819/37' after='37/819' hex='on'>535]]></xmlhint>
</error>
<error>
<errnoxml>1100004</errnoxml>
<xmlerrmsg><![CDATA[XML run loop failed]]></xmlerrmsg>
<xmlhint><![CDATA[p(54) <pgm]]></xmlhint>
</error>
<jobinfo>
<jobipc></jobipc>
<jobipcskey>FFFFFFFF</jobipcskey>
<jobname>QSQSRVR</jobname>
<jobuser>QUSER</jobuser>
<jobnbr>896874</jobnbr>
<jobsts>*ACTIVE</jobsts>
<curuser>QTMHHTTP</curuser>
<ccsid>65535</ccsid>
<dftccsid>37</dftccsid>
<paseccsid>819</paseccsid>
<langid>ENU</langid>
<cntryid>US</cntryid>
<sbsname>QSYSWRK</sbsname>
<sbslib>QSYS</sbslib>
<curlib></curlib>
<syslibl>RBTSYSLIB ALTQSYS QSYS QSYS2 QHLPSYS PHSECURE QUSRSYS OPSDLIBP OPSOLIBP PHTOOLS</syslibl>
<usrlibl>QGPL QTEMP</usrlibl>
<jobcpffind>see log scan, not error list</jobcpffind>
</jobinfo>
<joblogscan>
<joblogrec>
<jobcpf>CPF1124</jobcpf>
<jobtime><![CDATA[16/04/13  11:40:09.905407]]></jobtime>
<jobtext><![CDATA[JOB 896874/QUSER/QSQSRVR STARTED ON 16/04/13 AT 11:21:02]]></jobtext>
</joblogrec>
<joblogrec>
<jobcpf>*NONE</jobcpf>
<jobtime><![CDATA[16/04/13  11:40:09.905407]]></jobtime>
<jobtext><![CDATA[QTMHHTTP QSQSRVR QSQSRVR 7974 QSQSRVR QSQSRVR 7974 User Profile = QTMHHTTP]]></jobtext>
</joblogrec>
<joblogrec>
<jobcpf>CPF9898</jobcpf>
<jobtime><![CDATA[16/04/13  11:40:09.905407]]></jobtime>
<jobtext><![CDATA[QTMHHTTP QSQSRVR QSQSRVR 8066 QSQSRVR QSQSRVR 8066 SERVER MODE CONNECTING JOB IS 858722/QTMHHTTP/ZENDSVR.]]></jobtext>
</joblogrec>
</joblogscan>
<joblog job='QSQSRVR' user='QUSER' nbr='896874'>
<![CDATA[5761SS1 V6R1M0 080215                        DISPLAY JOB LOG                        HEMDEV   16/04/13 11:40:10          PAGE    1
  JOB NAME . . . . . . . . . . :   QSQSRVR         USER  . . . . . . :   QUSER        NUMBER . . . . . . . . . . . :   896874
  JOB DESCRIPTION  . . . . . . :   QDFTSVR         LIBRARY . . . . . :   QGPL
MSGID      TYPE                    SEV  DATE      TIME             FROM PGM     LIBRARY     INST     TO PGM      LIBRARY     INST
CPF1124    INFORMATION             00   16/04/13  11:21:02.110317  QWTPIIPP     QSYS        04C0     *EXT                    *N
                                     MESSAGE . . . . :   JOB 896874/QUSER/QSQSRVR STARTED ON 16/04/13 AT 11:21:02
                                       IN SUBSYSTEM QSYSWRK IN QSYS. JOB ENTERED SYSTEM ON 16/04/13 AT 11:21:02.
*NONE      COMPLETION                   16/04/13  11:40:09.895917  QSQSRVR      QSYS        *STMT    QSQSRVR     QSYS        *STMT
                                     FROM USER . . . . . . . . . :   QTMHHTTP
                                     FROM MODULE . . . . . . . . :   QSQSRVR
                                     FROM PROCEDURE  . . . . . . :   QSQSRVR
                                     STATEMENT . . . . . . . . . :   7974
                                     TO MODULE . . . . . . . . . :   QSQSRVR
                                     TO PROCEDURE  . . . . . . . :   QSQSRVR
                                     STATEMENT . . . . . . . . . :   7974
                                     MESSAGE . . . . :   User Profile = QTMHHTTP
CPF9898    COMPLETION              40   16/04/13  11:40:09.905407  QSQSRVR      QSYS        *STMT    QSQSRVR     QSYS        *STMT
                                     FROM USER . . . . . . . . . :   QTMHHTTP
                                     FROM MODULE . . . . . . . . :   QSQSRVR
                                     FROM PROCEDURE  . . . . . . :   QSQSRVR
                                     STATEMENT . . . . . . . . . :   8066
                                     TO MODULE . . . . . . . . . :   QSQSRVR
                                     TO PROCEDURE  . . . . . . . :   QSQSRVR
                                     STATEMENT . . . . . . . . . :   8066
                                     MESSAGE . . . . :   SERVER MODE CONNECTING JOB IS 858722/QTMHHTTP/ZENDSVR.
                                     CAUSE . . . . . :   THIS MESSAGE IS USED BY APPLICATION PROGRAMS AS A GENERAL
                                       ESCAPE MESSAGE.
]]>
</joblog>
</report>

Exec end: 2013-04-16 09:40:10. Seconds to execute: 0.64838981628418.


Exec start: 2013-04-16 09:40:10
Version of toolkit front end: 1.5.0
IPC: ''. Control key: *immed
Stmt: call XMLSERVICE.iPLUG512K(?,?,?,?) with transport: ibm_db2
Input XML: <?xml version="1.0" encoding="ISO-8859-1" ?>
Output XML:  
Exec end: 2013-04-16 09:40:10. Seconds to execute: 0.0059850215911865.

Db disconnect requested and done.
this is the php script:

Code: Select all

<?php

require_once ('ToolkitService.php');
# $conn = new ToolkitService('*LOCAL'); same as below
$conn = ToolkitService::getInstance ( '*LOCAL' );
$conn->setOptions(array('stateless'=>'true'));
#$conn->setOptions(array('InternalKey'=>'/tmp/ffleer123'));

$result = $conn->PgmCall ( 'SRVPGM01', 'QGPL', null, null, array ('func'=>'wacht') );
if (! $result) {
	echo 'Error calling program. Code: ' . $conn->getErrorCode () . ' Msg: ' . $conn->getErrorMsg () . '<BR><BR>';
} else {
	echo 'Called program successfully.<BR><BR>';
}
$conn->disconnect();
?>  

ffleer
Posts: 17
Joined: Tue Jan 31, 2012 10:44 am

Re: Error calling program. Code: UNEXPECTED Msg: XML run loo

Post by ffleer » Tue Apr 16, 2013 10:49 am

In both scenario's the browser shows this message:

Code: Select all

Error calling program. Code: UNEXPECTED Msg: XML run loop failed (p(54) 

rangercairns
Posts: 222
Joined: Fri Jul 24, 2009 6:28 pm

Re: Error calling program. Code: UNEXPECTED Msg: XML run loo

Post by rangercairns » Tue Apr 16, 2013 9:55 pm

Alan, pinged me on this ... following test worked ok on my machine. Although i never thought to add a after='37/819' to <name,lib,func>, but i don't think that would affect xmlservice find ... mmm ... i wonder what is in play here ...

Code: Select all

function getxml() {
$clob = <<<ENDPROC
<?xml version='1.0'?>
<script>
<pgm>
<name hex='on' before='819/37'>xyz01</name>
<lib hex='on' before='819/37'>xyz02</lib>
<func hex='on' before='819/37'>xyz03</func>
 <parm comment='search this name'>
  <data var='myName' type='10A'>Ranger</data>
 </parm>
 <parm comment='max allowed return'>
  <data var='myMax' type='10i0'>5</data>
 </parm>
 <parm comment='actual count returned'>
  <data var='myCount' type='10i0' enddo='mycount'>0</data>
 </parm>
 <return>
  <ds var='dcRec_t' dim='999' dou='mycount'>
    <data var='dcMyName' type='10A'>na</data>
    <data var='dcMyJob' type='4096A'>na</data>
    <data var='dcMyRank' type='10i0'>0</data>
    <data var='dcMyPay' type='12p2'>0.0</data>
  </ds>
 </return>
</pgm>
</script>
ENDPROC;

Code: Select all

$myHexPgm = bin2hex("ZZSRV");
$myHexLib = bin2hex(test_lib_replace("xyzlibxmlservicexyz"));
$myHexFnc = bin2hex("ZZARRAY");
$was      = array("xyz01","xyz02","xyz03");
$now      = array($myHexPgm,$myHexLib,$myHexFnc);
return str_replace($was,$now,$clob);
}

rangercairns
Posts: 222
Joined: Fri Jul 24, 2009 6:28 pm

Re: Error calling program. Code: UNEXPECTED Msg: XML run loo

Post by rangercairns » Tue Apr 16, 2013 10:05 pm

What do you see when you try this command ???

Code: Select all

call qp2term
> system -i "dspsrvpgm srvpgm(qgpl/srvpgm01) detail(*PROCEXP)" | grep -i w
:
should see your exported func ???
:
example on my machine, we find ZZARRAY detail(*PROCEXP)" ...

Code: Select all

> system -i "dspsrvpgm srvpgm(xmlservice/zzsrv) detail(*PROCEXP)" | grep -i zzarray
 ZZARRAY                                                                    *NO
 ZZARRAY2                                                                   *NO

rangercairns
Posts: 222
Joined: Fri Jul 24, 2009 6:28 pm

Re: Error calling program. Code: UNEXPECTED Msg: XML run loo

Post by rangercairns » Wed Apr 17, 2013 2:43 pm

I will jump forward to the answer (without knowing the problem), i suspect you need to add EXPORT(*ALL) to your compile statement (see below).

Code: Select all

CRTRPGMOD MODULE(XMLSERVICE/ZZSRV) SRCFILE(XMLSERVICE/QRPGLESRC) +
  DBGVIEW(*SOURCE) OUTPUT(*PRINT) REPLACE(*YES)
CRTSRVPGM SRVPGM(XMLSERVICE/ZZSRV) MODULE(XMLSERVICE/ZZSRV) +
  EXPORT(*ALL) ACTGRP(*CALLER)
DLTMOD MODULE(XMLSERVICE/ZZSRV)
-- or -- you may need to add to your export file EXPORT(*SRCFILE)

Code: Select all

STRPGMEXP SIGNATURE('PASESERV 1.0')
   EXPORT SYMBOL('PaseError')
   EXPORT SYMBOL('PaseStart32')
   EXPORT SYMBOL('PaseStop')
   EXPORT SYMBOL('PaseExec32')
ENDPGMEXP

CRTSRVPGM SRVPGM(ZPHPDEMO/PASESERV) +
 MODULE(ZPHPDEMO/PASESERV) +
 EXPORT(*SRCFILE) SRCFILE(ZPHPDEMO/QSRVSRC) +
 ACTGRP(*CALLER)

rangercairns
Posts: 222
Joined: Fri Jul 24, 2009 6:28 pm

Re: Error calling program. Code: UNEXPECTED Msg: XML run loo

Post by rangercairns » Wed Apr 17, 2013 5:04 pm

For other people following this forum entry ...

keyword EXPORT in your RPG program is not enough ... you need CRTSRVPGM EXPORT(*ALL) or EXPORT(*SRCFILE)

Code: Select all

p wacht b export
d wacht pr 
Here is link explians all about binder language ... http://publib.boulder.ibm.com/iseries/v ... 606608.htm
==========
cut/paste
==========
EXPORT(*ALL) indicates that all symbols exported from the modules used in the service program are exported from the service program. ILE C can define exports as global or static. Only external variables declared in ILE C as global are available with EXPORT(*ALL). In ILE RPG, the following are available with EXPORT(*ALL):
* The RPG program name (not to be confused with *PGM object)
* Variables defined with the keyword EXPORT

Post Reply