Start of change

ERRNO_INFO scalar function

The ERRNO_INFO scalar function returns descriptive text that corresponds to an errno value.

The function requires that Option 13 (System Openness Includes) of the IBM i operating system is installed.

Authorization: See Note below.

Read syntax diagramSkip visual syntax diagram ERRNO_INFO ( ERRNO =>  errno )
The schema is SYSTOOLS.
errno
An integer representing an errno value returned from an API call.
The result of the function is VARCHAR(256). If no descriptive text for the errno is found, the null value is returned.

Note

This function is provided in the SYSTOOLS schema as an example of how to embed a C language interface in an SQL scalar function. Similar to other Db2® for i provided tools within SYSTOOLS, the SQL source can be extracted and used as a model for building similar helper functions, or to create a customized version within a user-specified schema.

Services provided in SYSTOOLS have authorization requirements that are determined by the interfaces used to implement the service. To understand the authority requirements, extract the SQL for the service and examine the implementation.

Example

Return information for errno 3025.

VALUES SYSTOOLS.ERRNO_INFO(3025);
End of change