I've got the following PHP code, to call a CL program with 4 parameters. The
first 2 parms are "input" and the last two are "output" from the CL program.
The CL program is being called but it returns a status code of "not found"
for that particular user id. I am able to call the same CL program from a
LANSA Web program, passing the same user id and password combination as in
the PHP script, the difference being that my CL program validates the user
id and password when called from my LANSA Web program.



Am I missing something on my program call? How can I go about debugging this
to figure out what's going on?



<?php

$conn = i5_connect("localhost", "$USER", "$PASSWORD") or die( "Connection
error is :" . i5_errormsg());



$desc = array (

array ( "name"=>"userid",

"io"=>I5_INOUT,

"type" => I5_TYPE_CHAR,

"length"=> "10"),

array ( "name"=>"password",

"io"=>I5_INOUT,

"type" => I5_TYPE_CHAR,

"length"=> "10"),

array ( "name"=>"usrhndl",

"io"=>I5_INOUT,

"type" => I5_TYPE_CHAR,

"length"=> "12"),

array ( "name"=>"sts",

"io"=>I5_INOUT,

"type" => I5_TYPE_CHAR,

"length"=> "2")

);



// Prepare Program

$prog = i5_program_prepare("PRODOBJ/VALID8USER", $desc) or die("FAIL :
i5_program_prepare<br />\n".i5_error());



// Execute Program

$input = array( "userid"=>$inpUser,


"password"=>$inpPwd,

"usrhndl"=>"",

"sts"=>""

);

$output = array( "userid"=>"user",


"password"=>"pass",


"usrhndl"=>"usrhndl",

"sts"=>"sts"

);



$ret = i5_program_call($prog, $input, $output) or die("FAIL :
i5_program_call<br />".i5_error());

if ($ret === TRUE) {

echo "<br />The return values are - <br />Status:
<strong>".$sts."</strong><br />User handle for user
<strong>".$user."</strong> is <strong>".$usrhndl."</strong> <br />";

}



$close_val = i5_program_close($prog) or die("FAIL : i5_program_close<br
/>\n".i5_error());



i5_close($conn);

?>



Thanks in advance for any help,


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.