× 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.



I know that the Zend port of PHP for i5 has a way to call (snippet from
documentation below) but have not tried it yet (it's on the list)

Example — i5 Program Call
The i5 program call process contains the following PHP functions:
1. i5_connect
2. i5_program_prepare
3. i5_program_call
4. i5_close
The sample PHP script below invokes an i5 program.
<?
/* Connect to i5 Machine */
$conn = i5_connect($i5_server_ip, $i5_uname, $i5_pass); if ($conn ===
false) {
print ("FAIL : Failed to connect to server : $i5_server_ip, with
user name : $i5_uname and password : $i5_pass");
$errorTab = i5_error();
var_dump($errorTab);
die();
}
/* Prepare File for execution */
$desc = array (
array ("name"=>"city", "io"=>I5_IN, "type" => I5_TYPE_CHAR,
"length"
=> "15"),
array ("name"=>"zip", "io"=>I5_IN, "Type" => I5_TYPE_CHAR,
"length"
=> "5"),
array ("name"=>"result", "io"=>I5_INOUT, "type" => I5_TYPE_CHAR,
"length" => "40")
);
$prog = i5_program_prepare("EACDEMO/RPCVBDEMO", $desc); if ($prog ===
FALSE){
$errorTab = i5_error();
echo 'Program prepare failed \n';
var_dump($errorTab);
die();
}
/* Execute Program */
$params = array ("city" => "Ramat Gun",
"zip" => "12",
"result" => " ");
$retvals = array("result" => "result");
$ret = i5_program_call($prog,$params, $retvals) ; if ($ret === FALSE){
$errorTab = i5_error();
echo 'FAIL : i5_program_call failure code \n';
var_dump($errorTab);
die();
}
$exp_res = sprintf ("RSLT :%-15s AND %-5s",$params["city"],
$params["zip"]);
if (strcmp ($result, $exp_res) != 0) {
print ("FAIL : The program returned \"$result\" \n where it
should have been \"{$exp_res}\""); } $close_val = i5_program_close
($prog); if ($close_val === false ) {
print ("FAIL : i5_program_close returned fales, closing an open
prog.\n");
$errorTab = i5_error();
var_dump($errorTab);
}
i5_close($conn) || print ("FAIL : Failed to disconnect from server :
$i5_server_ip");
?>





As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.