Fetches output variable further to a sent i5_cmd command.
|
string i5_cmdget ( |
string variable_name |
i5_cmdget function is allways used after i5_cmd with output parameters.
Those parameters can only be fetched with theirs names, type is always string.
|
namvariable |
variable to read name |
|
connection |
Current connection ID |
|
I5_ERR_MEMALLOC |
3 |
Not enough memory |
|
I5_ERR_PHP_HDLCONN |
257 |
This resource has no connection active. |
|
I5_ERR_PHP_RESOURCE_BAD |
261 |
No resource found . |
|
I5_ERR_PHP_TYPEPARAM |
262 |
Type of element x in parameter -1 must be y. Type z was provided. |
|
I5_ERR_PHP_TYPEPARAM |
262 |
Type of element x in parameter -1 must be y. Type z was provided. |
|
I5_ERR_PHP_NBPARAM_BAD |
263 |
Wrong parameter count |
/* Connection to AS400 */
$conn = i5_connect("MY_AS", "USER", "PASSWORD");
/* Executes the command on AS400 */
i5_cmd("user=char(10);usrlib=char(275);syslib=char(165);curl=char(10);rtvjoba user(&user) usrlibl(&usrlib) syslibl(&syslib) curlib(&curl)");
if ($ret) {
$res = i5_cmdget("RC");
if ($res==0) {
$util = i5_cmdget("user", $conn);
$bibl = i5_cmdget("usrlib", $conn);
$sysbibl = i5_cmdget("syslib", $conn);
$curl = i5_cmdget("curl", $conn);
print "User: " . $util. "<br>" ;
print "User libraries list: " . $bibl . "<br>" ;
print "System libraries list: " . $sysbibl ."<br>" ;
print "Current library: " . $curl . "<br>" ;
}
}