Page 1 of 1

ClCommand issue

Posted: Thu Dec 10, 2015 3:48 am
by greg7308
This is probably not something that should be done I know ... but I have a php page served up on lpar(3), depending on the data returned from input files on lpar(3) it will display options. Those options relate to lpars (1,2,3,4) and then when i click on the link I want to open a file on the target lpar and display it to the screen.

It only works when the traget file is also on lpar(3)

Debug gives this error "Call to a member function CLCommand() on null"

I am guessing despite me opening new connections to the target lpar it doesn't allow me to mix and match data sources onto the one screen?

is that true?

zend server 8.8, php 5.5 installed on all lpars from the same save files so should be same release.


Re: ClCommand issue

Posted: Thu Dec 10, 2015 2:42 pm
by scottgcampbell
Check your toolkit debug log (/usr/local/zendsvr6/var/log/tkit_debug.log is the default) and see if there is anything in there. It would appear that your toolkit object wasn't working for some reason, it's null. Can you post any code? What do the links look like (are they all going to LPAR3)?

Re: ClCommand issue

Posted: Fri Dec 11, 2015 3:37 am
by greg7308
Hi Scott,

Short answer is that the log does not exist. There is a debug.log on lpar3, but it only has the following ... (this is on a failed attempt to any lpar excpet lpar3)

Code: Select all

Exec start: 2015-12-11 15:28:42                                             
Version of toolkit front end: 1.5.0                                         
IPC: '/tmp/'. Control key: *cdata *sbmjob(ZENDSVR6/ZSVR_JOBD/XTOOLKIT)      
Stmt: call ZENDSVR6.iPLUG32K(?,?,?,?) with transport: ibm_db2               
Input XML: <?xml version="1.0" encoding="ISO-8859-1" ?>                     
<cmd>CLRPFM FILE(TEMPFILES/FMPGOAT)</cmd>                                   
The CLRPFM is not processed, and the php page serves up this message
"Toolkit request failed. Possible reason: a CCSID not matching that of system, or updated PTFs may be required. Database code (if any): 57017. Message: Character conversion between CCSID 1208 and CCSID 65535 not valid."

The underlying question is - should the page on LPAR3 be able to connect to a diifferent LPAR based on an option selected and then run these other CLCommand strings on that target LPAR?

Re: ClCommand issue

Posted: Fri Dec 11, 2015 3:52 am
by greg7308
This is basically the code portion ...

Code: Select all

$options = array('i5_naming'=>DB2_I5_NAMING_ON,'autocommit'=>DB2_AUTOCOMMIT_ON);
$splf_db = db2_connect($db, $ReqUsr, $ReqPwd, $options);

try { $splf_tkso = ToolkitService::getInstance($db, $DB2Usr, $DB2Pwd); } catch (Exception $e) { echo  $e->getMessage(), "\n"; exit(); } 
$splf_tkso->setToolkitServiceParams(array('InternalKey'=>"/tmp/", 'debug'=>true, 'plug' => "iPLUG32K"));


$qual_job = trim($jnmbr)."/".trim($juser)."/".trim($jname);
$cpysplf_cmd = "CPYSPLF FILE($sname) TOFILE(TEMPFILES/FMPGOAT) JOB($qual_job) SPLNBR($snmbr)";

I am happy the username/password and jobname/number etc details are correct.


Re: ClCommand issue

Posted: Fri Dec 11, 2015 2:58 pm
by scottgcampbell

Yes I get the same thing, never tried accessing remote resources before. Maybe Alan or Tony have an example they can share for the details on how it should work.


Re: ClCommand issue

Posted: Mon Dec 14, 2015 4:04 am
by greg7308
Thanks Scott - nice to know I'm not alone in this. I'll see if I can think of a way to do it differently.

DB2 works how i need, I can repoint it to any lpar and fire off an sql to get data from a file on that target lpar, but the xtoolkit seems locked down somehow.