PreviousNext
Help > API Functions > Commands & System values > i5_get_system_value
i5_get_system_value

 

Gets value of a system variable.

 

 string i5_get_system_value (string name [, resource connection])

 

Parameters

 

 

name

Name of a system variable.

To know names of system variables, it is possible to use the WRKSYSVAL command on an IBM i terminal.

 

 

Return

The value of the system value in case of success.

False is returned in case of error. For getting the code and error message call i5_error function.

 

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_EMPTY_NAME

314

Object name cannot be empty

 

 

Example

 

 

    $ret = i5_get_system_value('QSRLNBR');

    if(is_bool($ret))

    {

                   print_r("i5_get_system_value error : ".i5_errormsg().'<br/>');

    }

    else

    {

                   echo 'Serial number: '.$ret.'<BR>';

    }