PreviousNext
Help > API Functions > Job logs > i5_jobLog_list_read
i5_jobLog_list_read

 

 Get an array for a job log entry.

 

    array i5_jobLog_list_read (resource list)

Parameters

 

 

list

Resource returned by i5_jobLog_list function

 

Return

 

Array with the message element if OK, false if failed.

 

I5_ERR_BEOF

14

End or begin of file reached

I5_ERR_PHP_HDLDFT

256

No default connection found.

I5_ERR_PHP_OPTIONSTYPE

259

The type of " I5_OPTIONS_ALIAS" option must be x and not x

I5_ERR_PHP_OPTIONSNUMBER

260

Option number -1 is unknown.

I5_ERR_PHP_TYPEPARAM

262

Type of element x in parameter -1 must be y. Type z was provided.

 

 

Example

 

 

/*Get job informations given in the request parameters*/
$jobName = $_POST["jobName"];

$userName = $_POST["userName"];

$jobNumber = $_POST["jobNumber"];

 

$HdlJob = i5_jobLog_list(array(I5_JOBNAME=>$jobName,

I5_USERNAME=>$userName, I5_JOBNUMBER=>$jobNumber));

if (is_bool($HdlJob)){

 $ret = i5_error();

 print_r($ret);

} else {

 $continue = true;

 while($continue) {

  $data = i5_jobLog_list_read($HdlJob);

  if (is_bool($data)){

   if (i5_errno() != 14){

    $ret = i5_error();

    print_r($ret);

   }

   break;

  } else {

   echo " - ".$data[I5_LOBJ_MSGDTA]."<BR>";

   if (isset($data[I5_LOBJ_MSGHLP]))

    echo $data[I5_LOBJ_MSGHLP]."<BR>";

  }

 }

}
i5_jobLog_list_close(
$HdlJob);