PreviousNext
Help > API Functions > Job logs > i5_jobLog_list
i5_jobLog_list

 

 Opens job log.

 

   resource i5_jobLog_list ([array elements, resource connection])

Parameters

 

 

elements

JobName, JobUser, JobNumber, MaxMessage, Direction (default is current job)

 

connection

Result of i5_connect

 

 

Use i5_jobLog_list_read function to retrieve the job entries from this handle.

 

Return

 

The resource for fetching job log list if OK and false if failed.

 

I5_ERR_DESC_WRONG_DATAOP

41

Wrong operation on a data field of a description

I5_ERR_PARSEXML

42

Internal error; please contact Aura Equipements.

error number 42

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.

I5_ERR_PHP_LOCALHOST_NOT_PERMIT

286

you must specify the AS/400 address

I5_ERR_PHP_EXECUTE

289

You cannot read a request with parameters without calling the I5_execute function.

I5_ERR_PHP_NO_COMMAND

290

Empty command line or name

I5_ERR_PHP_ELEMENT_MISSING

304

An element of the array has a wrong type within

function_name(type) function.

I5_ERR_PHP_BAD_KEYNAME

306

Name x is not a property name for a program description

 

 

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);

 

 

See also

 

Job Log Constants (i5_jobLog_list) array elements constants