× 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 Sam but the SBMJOB is within XMLSERVICE and I have no control over
this so I can't change the way the job is submitted.

Or can you advise any options to control this ?

Don Brown





From: "Sam" <cdssi@xxxxxxx>
To: "'Web Enabling the IBM i \(AS/400 and iSeries\)'"
<web400@xxxxxxxxxxxx>
Date: 08/07/2017 11:52 PM
Subject: Re: [WEB400] PHP Call to Service program fails
Sent by: "WEB400" <web400-bounces@xxxxxxxxxxxx>



I think the default for the keyword INLLIBL in SBMJOB command is not
*CURRENT or it is not being changed to *CURRENT while submitting, If it is
for example *JOBD then it will use jobd's library list. While issuing
sbmjob
command change it to *CURRENT.

You can see what is the current default by prompting SBMJOB command

-----Original Message-----
From: WEB400 [mailto:web400-bounces@xxxxxxxxxxxx] On Behalf Of Don Brown
Sent: Saturday, July 8, 2017 12:57 AM
To: Web Enabling the IBM i (AS/400 and iSeries) <web400@xxxxxxxxxxxx>
Subject: Re: [WEB400] PHP Call to Service program fails

IBMi is R720
I have duplicated the issue on Zend 6, 7 and 8

It is definitely a library list issue.

I have the library list being set on every call as in the following code,

function getToolkitService() {
$toolkitServiceObj = false;
try {
$toolkitServiceObj = ToolkitService::getInstance(DATABASE,
DATABASE_USER, DATABASE_PASSWORD, DB_EXTENSION);
} catch (Exception $e) {
logEvent("Error getting a Toolkit Connection to the System i: " .
$e->getMessage(), "Y");
}
$toolkitServiceObj->CLCommand("CHGLIBL LIBL(XAPSW XAPDTA PGIDTA PGISW
CDBV70DTA CDBV70SW DKTV71DTA DKTV71SW LIBHTTP ISSV70DTA ISSV70SW )
CURLIB(*CRTDFT)");
return $toolkitServiceObj;
}

In the log I can see the library list being changed but then it appears a
new XMLSERVICE job is being submitted and this new job process the call
but
has the default library list not the changed library list.

Here is the log.

So I am not sure how I get the sbmjob of XMLSERVICE to have the same
library
list as the job submitting it




Exec start: 2017-07-07 08:40:01
Version of toolkit front end: 1.6.0
IPC: '/tmp/Toolkit'. Control key: *cdata
*sbmjob(ZENDPHP7/ZSVR_JOBD/XTOOLKIT)
Stmt: call ZENDPHP7.iPLUG512K(?,?,?,?) with transport: ibm_db2
Input XML: <?xml version="1.0" encoding="ISO-8859-1" ?>
<script>
<cmd>CHGLIBL LIBL(PGIDTA PGISW CDBV70DTA CDBV70SW DKTV71DTA DKTV71SW
LIBHTTP ISSV70DTA ISSV70SW XAPSW XAPDTA) CURLIB(*CRTDFT)</cmd>
</script>
Output XML: <?xml version="1.0" encoding="ISO-8859-1" ?>
<script>
<cmd><success><![CDATA[+++ success CHGLIBL LIBL(PGIDTA PGISW CDBV70DTA
CDBV70SW DKTV71DTA DKTV71SW LIBHTTP ISSV70DTA ISSV70SW XAPSW XAPDTA)
CURLIB(*CRTDFT)]]></success>
</cmd>
</script>
Exec end: 2017-07-07 08:40:01. Seconds to execute: 0.01140284538269.
Exec start: 2017-07-07 08:40:01
Version of toolkit front end: 1.6.0
IPC: '/tmp/A'. Control key: *cdata *sbmjob(ZENDPHP7/ZSVR_JOBD/XTOOLKIT)
Stmt: call ZENDPHP7.iPLUG512K(?,?,?,?) with transport: ibm_db2
Input XML: <?xml version="1.0" encoding="ISO-8859-1" ?>
<script>
<pgm name='ISSSRV003' lib='ISSV70SW' func='UPDATEDRVDEBINFO'>
<parm comment='pUser'><data var='UserName' type='10A'>A</data></parm>
<parm comment='pCoy'><data var='company' type='3A'>1</data></parm>
<parm comment='pAc'><data var='account' type='6A'>O00001</data></parm>
<parm comment='pcompanycode'><data var='companycode'
type='3A'>MSD</data></parm>
<parm comment='pEmail'><data var='emailAddress'
type='50A'>aaaaaaaaaaaaaaa</data></parm>
<parm comment='pPhone'><data var='phone' type='15A'>3861
0342</data></parm>
<parm comment='pMobile'><data var='mobilePhone' type='15A'>0412 345
678</data></parm>
<parm comment='preturncode'><data var='returnCode' type='1A'>
</data></parm>
</pgm>
</script>
Output XML: <?xml version="1.0" encoding="ISO-8859-1" ?>
<report>
<version>XML Toolkit 1.9.9.3</version>
<error>
<errnoxml>1100004</errnoxml>
<xmlerrmsg><![CDATA[XML run loop failed]]></xmlerrmsg>
<xmlhint><![CDATA[p(54) <pgm name='ISSSRV003' lib='ISSV70SW'
func='UPDATEDRVDE]]></xmlhint>
</error>
<error>
<errnoxml>1000007</errnoxml>
<xmlerrmsg><![CDATA[ILELOAD failed]]></xmlerrmsg>
<xmlhint><![CDATA[UPDATEDRVDEBINFO]]></xmlhint>
</error>
<error>
<errnoxml>1100016</errnoxml>
<xmlerrmsg><![CDATA[XML run pgm failed]]></xmlerrmsg>
<xmlhint><![CDATA[<pgm name='ISSSRV003' lib='ISSV70SW'
func='UPDATEDRVDEBINFO]]></xmlhint>
</error>
<error>
<errnoxml>1100004</errnoxml>
<xmlerrmsg><![CDATA[XML run loop failed]]></xmlerrmsg>
<xmlhint><![CDATA[p(54) <pgm name='ISSSRV003' lib='ISSV70SW'
func='UPDATEDRVDE]]></xmlhint>
</error>
<xmloutput><![CDATA[<?xml version="1.0" encoding="ISO-8859-1" ?>
<script>
<pgm name='ISSSRV003' lib='ISSV70SW' func='UPDATEDRVDEBINFO'>
</pgm>
]]></xmloutput>
<jobinfo>
<jobipc>/tmp/A</jobipc>
<jobipcskey>010859C8</jobipcskey>
<jobname>XTOOLKIT</jobname>
<jobuser>PHPUSER</jobuser>
<jobnbr>269623</jobnbr>
<jobsts>*ACTIVE</jobsts>
<curuser>PHPUSER</curuser>
<ccsid>37</ccsid>
<dftccsid>37</dftccsid>
<paseccsid>819</paseccsid>
<langid>ENU</langid>
<cntryid>AU</cntryid>
<sbsname>ZENDPHP7</sbsname>
<sbslib>ZENDPHP7</sbslib>
<curlib></curlib>
<syslibl>MSDSYS QSYS QSYS2 QHLPSYS QUSRSYS</syslibl>
<usrlibl>QGPL QTEMP</usrlibl>
<jobcpffind>see log scan, not error list</jobcpffind>
</jobinfo>
<joblogscan>
<joblogrec>
<jobcpf>CPF1124</jobcpf>
<jobtime><![CDATA[07/07/17 18:40:01.913873]]></jobtime>
<jobtext><![CDATA[Job 269623/PHPUSER/XTOOLKIT started on 07/07/17 at Job
269623/PHPUSER/XTOOLKIT submitted.]]></jobtext>
</joblogrec>
<joblogrec>
<jobcpf>*NONE</jobcpf>
<jobtime><![CDATA[07/07/17 18:40:01.913873]]></jobtime>
<jobtext><![CDATA[CALL PGM(ZENDPHP7/XMLSERVICE)
PARM('/tmp/A')]]></jobtext>
</joblogrec>
<joblogrec>
<jobcpf>MCH3401</jobcpf>
<jobtime><![CDATA[07/07/17 18:40:01.913873]]></jobtime>
<jobtext><![CDATA[QLEPM QleActBndPgmCommon__FPPvPULP24Qle_ActBndPgmInf 34
Cannot resolve to object XAPSRV006S. Type and Subtype Either a system
po]]></jobtext>
</joblogrec>
<joblogrec>
<jobcpf>CPF3CF2</jobcpf>
<jobtime><![CDATA[07/07/17 18:40:01.913873]]></jobtime>
<jobtext><![CDATA[QLETOOL ECRaise 79 PLUGILE ILERSLV 9224 Error(s)
occurred during running of QleActBndPgmLong API.]]></jobtext>
</joblogrec>
</joblogscan>
<joblog job='XTOOLKIT' user='PHPUSER' nbr='269623'>
<![CDATA[5770SS1 V7R2M0 140418 Display Job Log
MSD520 07/07/17 18:40:02 UTC+10:00S Page 1
Job name . . . . . . . . . . : XTOOLKIT User . . . . . . :
PHPUSER Number . . . . . . . . . . . : 269623
Job description . . . . . . : ZSVR_JOBD Library . . . . . :
ZENDPHP7
MSGID TYPE SEV DATE TIME FROM
PGM LIBRARY INST TO PGM LIBRARY INST
CPF1124 Information 00 07/07/17 18:40:01.866088 QWTPIIPP

QSYS 04C9 *EXT *N
Message . . . . : Job
269623/PHPUSER/XTOOLKIT started on 07/07/17 at
18:40:01 in subsystem ZENDPHP7 in
ZENDPHP7. Job entered system on 07/07/17
at 18:40:01.
CPI1125 Information 00 07/07/17 18:40:01.866486 QWTPCRJA

QSYS 0110 *EXT *N
Message . . . . : Job
269623/PHPUSER/XTOOLKIT submitted.
Cause . . . . . : Job
269623/PHPUSER/XTOOLKIT submitted to job queue
ZSVR_JOBQ in ZENDPHP7 from job
265487/QUSER/QSQSRVR. Job
269623/PHPUSER/XTOOLKIT was started

using the Submit Job (SBMJOB) command
with the following job attributes:
JOBPTY(5) OUTPTY(5) PRTTXT()
RTGDTA(QCMDB) SYSLIBL(MSDSYS QSYS
QSYS2 QHLPSYS QUSRSYS)
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/PHPUSER) CCSID(37)
SRTSEQ(*N/*HEX) LANGID(ENU)
CNTRYID(AU) JOBMSGQMX(16) JOBMSGQFL(*NOWRAP)
ALWMLTTHD(*NO) SPLFACN(*KEEP)
ACGCDE().
*NONE Request 07/07/17 18:40:01.867588 QWTSCSBJ

*N QCMD QSYS 0195
Message . . . . : -CALL
PGM(ZENDPHP7/XMLSERVICE) PARM('/tmp/A')
MCH3401 Escape 40 07/07/17 18:40:01.913789 #mnrnrl

000518 QLEAWI QSYS *STMT
To module . . . . . . . . . : QLEPM
To procedure . . . . . . . :
QleActBndPgmCommon__FPPvPULP24Qle_ActBndPgmInf
o_Long_tPiPvPci
Statement . . . . . . . . . : 34
Message . . . . : Cannot resolve to

object XAPSRV006S. Type and Subtype
X'0203' Authority X'0000'.
Cause . . . . . : Either a system
pointer or a data pointer can not be
resolved. For a system pointer, it
can not be resolved to object XAPSRV006S,
type and subtype X'0203',
authorization X'0000', because either the named
object was not in any context
referred to or the correct object was located
but the user profile did not have
the required authority. The object types
for some common type or subtype
codes follow: -- 0190-Access group,
0201-Program, 0401-Library, --
0701-Journal receiver, 0801-User profile,
0901-Journal, -- 0B90-Data space,
0C01-Directory, 0C90-Data space index, --
0E01-Job queue, 0E02-Output queue,
0E03-Message file, -- 0E0A-User index,
0A01-Data queue, 1401-Class of
service description -- 1501-Mode description,
0E05-Session description, --
1001-Device description, 1101-Line description,
-- 1201-Controller description,
1901-File, 1902-Message queue, -- 1903-Job
description, 1904-Class,
1905-Command, 1906-Table, -- 1908-Edit description,
1909-Subsystem description, --
190A-Data area, 190C-Graphic symbol set,
190D-Chart format, -- 1911-Query
definition, 1912-Folder, -- 1915-Panel
group, 1916-Menu group description,

-- 1920-Data dictionary, 192D-Management
collection, 19D0 Work control block

table, -- 19D2-System value,
1B01-Process control space, --
1E01-Byte stream file, 1E03-Local socket,
1E06-Character special file, --
1E07-First-in first-out special file For a
data pointer, it can not be
resolved because the named object is not located
within any program activation
currently known to the process. Recovery . .
. : Either specify the correct
object name or specify the correct
authority for the object.
CPF3CF2 Escape 30 07/07/17 18:40:01.913873 QLEAWI
QSYS *STMT XMLSERVICE ZENDPHP7 *STMT
From module . . . . . . . . : QLETOOL
From procedure . . . . . . : ECRaise
Statement . . . . . . . . . : 79
5770SS1 V7R2M0 140418 Display Job Log MSD520
07/07/17 18:40:02 UTC+10:00S Page 2
Job name . . . . . . . . . . : XTOOLKIT User . . . . . . :
PHPUSER Number . . . . . . . . . . . : 269623
Job description . . . . . . : ZSVR_JOBD Library . . . . . :
ZENDPHP7
MSGID TYPE SEV DATE TIME FROM
PGM LIBRARY INST TO PGM LIBRARY INST
To module . . . . . . . . . : PLUGILE
To procedure . . . . . . . : ILERSLV
Statement . . . . . . . . . : 9224
Message . . . . : Error(s) occurred

during running of QleActBndPgmLong API.
Cause . . . . . : Call your service

organization and report the problem.
Materials to accompany the problem
are: -- Job log of the failing API. --
Actual parameters specified on the
API.
]]>
</joblog>
</report>

Exec end: 2017-07-07 08:40:02. Seconds to execute: 0.48960304260254.

Don Brown

MSD Information Technology

Suite 5/29 McDougall Street Milton Q 4064
( 07 3368 7888
+ PO Box 1629 MILTON Q 4054
Ê 07 3368 7877
* Don.Brown@xxxxxxxxxx
È 0408 751 644
þ www.msd.net.au www.architect4web.com.au





I am a proud supporter of THE REFERRAL NETWORK and recommend the services
of the other member businesses. For more information please checkout the
website www.refnet.net.au





From: "Hiebert, Chris" <chris.hiebert@xxxxxxxxxxxxxx>
To: "Web Enabling the IBM i (AS/400 and iSeries)"
<web400@xxxxxxxxxxxx>
Date: 08/07/2017 01:50 AM
Subject: Re: [WEB400] PHP Call to Service program fails
Sent by: "WEB400" <web400-bounces@xxxxxxxxxxxx>



You don't mention any version information in your post.


The Toolkit Instance will contain the last error.

$ret = $conn->PgmCall('ISSSRV003', ISS_SW_LIBRARY, $param, NULL,
array('func'=>'UPDATEDRVDEBINFO'));
print"Ret = " . $ret;
if ($ret) {
... success ...
} else {
$result = "Execution failed." . $conn->getLastError();
}



---- We added a call to another service program into ISSSRV003
This makes it sound like it can't find the other service program.

Are the service programs in the same library?

Run this command and see what library is listed for the other service
program.

DSPSRVPGM SRVPGM(ISSSRV003) DETAIL(*SRVPGM)

If it is *LIBL, then you will need to make sure that the second library is

in the connection's library list.


Here is where the Toolkit log is by default on Zend Server 8.5
/usr/local/zendsvr6/var/log/toolkit.log

On Zend Server 9.1 is in the same subfolder:
/usr/local/zendphp7/var/log/toolkit.log

The setting that controls where the log file resides is in the
"toolkit.ini" file.

The ini file can also activate a Toolkit debug logging mode:

debug = false
debugLogFile = "/usr/local/zendphp7/var/log/tkit_debug.log"

On our system the toolkit files were generally found under the zend server

folder:
/usr/local/zendsvr6/share/ToolkitAPI

On 9.1 it should have a symbolic link under the share. Otherwise it's
probably in var/libraries.
/usr/local/zendphp7/share/ToolkitAPI
/usr/local/zendphp7/var/libraries/PHP_Toolkit_for_IBMI_i/default/library
/usr/local/zendphp7/var/libraries/PHP_Toolkit_for_IBMI_i/1.6.1/library

Locate the Toolkit folder and open the ini file to determine where the log

is going.


Chris Hiebert
Senior Programmer/Analyst
Disclaimer: Any views or opinions presented are solely those of the author

and do not necessarily represent those of the company.


-----Original Message-----
From: WEB400 [mailto:web400-bounces@xxxxxxxxxxxx] On Behalf Of Don Brown
Sent: Wednesday, June 28, 2017 6:54 PM
To: Web400@Midrange. Web400 <web400@xxxxxxxxxxxx>
Cc: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
Subject: [WEB400] PHP Call to Service program fails

Hello

I have posted this on web400 and midrange as I am not sure if it is php
(web) issue or rpg issue and I have spent so many hours trying to find an
answer ...

We have this piece of code ...

$ret = $conn->PgmCall('ISSSRV003', ISS_SW_LIBRARY, $param, NULL,
array('func'=>'UPDATEDRVDEBINFO'));
print"Ret = " . $ret;
if (isset($ret['io_param']['returnCode'])) {
$returnCode = $ret['io_param']['returnCode'];
if ($returnCode === '1') {
$result = 'Update failed. If update fails again please
report the issue. (1)';
} elseif ($returnCode === '0') {
$result = '**OK';
} else {
$result = "Unable to update the contact details. Unknown
Return code ({$returnCode})"; // Unknown failure
}
} else {
$result = "Execution failed.";
}

The service program ISSSRV003 and procedure UPDATEDRVDEBINFO do exist and
have been tested in interactive environment.

We added a call to another service program into ISSSRV003 procedure
UPDATEDRVDEBINFO like this;

rSaveDrv = SaveDrvContact(pToken:mdrmtu:pPhone:pMobile:pEmail);

If we comment this line out the above call to UPDATEDRVDEBINFO works
perfectly.
If it is included in the program we get $result = "Execution failed.";
which indicates the call to the service program procedure failed.

To further confuse the issue, if the line is commented out I can put
ISSSRV003 in debug from Rdi for user PHPUSER and when we execute the PHP
code the program stops in debug and I can step through the program, but if

we put the line above back in and do the test again the program does not
appear in the debug session. And to make sure all was correct we removed
the line again and did the debug test again and the program stopped in the

debug session.

The XMLSERVICE job has the correct library list and if we copy that
library list to the green screen interactive environment and do a test
call it works perfectly. We even tried this logged on as PHPUSER to see
if it may be an authority thing - Nope!

I just can not find any error message anywhere - not in the ZEND Http
jobs, Not in the Zend subsystem jobs, Not in the /LOGS files - Nothing.

Any suggestions where I can find what is causing this would really be
appreciated.

Thank you



Don Brown
--
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.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.