LIBL issues with UDFs

General discussion on Zend Server for IBM System i
Post Reply
Posts: 33
Joined: Thu Feb 16, 2012 8:55 pm

LIBL issues with UDFs

Post by longnoz » Fri Jul 07, 2017 10:26 pm


We have a file that is an SQL view that is based on several files combined, but most importantly some of the fields use SQL UDF's in their computations. When we compose an SQL select statement on this file and execute it from within PHP, it fails with an error message in the QSQSRVR job saying that, in essence, the UDF or some subcomponents of it can not be found. Because they are not in the LIBL. The error message can be found in the attached PDF file.

I temporarily solved the problem by adding the library to the QUSRLIBL system value. But this caused other problems on the system so I can not use this as a permanent solution

I tried setting my LIBL in my db2_connect, but this did not seem to have any impact:
//$db = db2_connect($serial_no,strtoupper($_SERVER['PHP_AUTH_USER']),strtoupper($_SERVER['PHP_AUTH_PW']),array('i5_libl' => 'SFALIBR QS36F', 'i5_naming' => DB2_I5_NAMING_ON));

I tried using the toolkit to set the LIBL as well, but it seems to only affect the HTTP server job, and not the QSQSRVR job

Any ideas?

Job log - see page 2
(20.8 KiB) Downloaded 313 times

Posts: 875
Joined: Thu Apr 09, 2009 5:45 pm

Re: LIBL issues with UDFs

Post by aseiden » Thu Nov 09, 2017 4:31 am

Dear Longnoz,

The usual library list techniques should work.
i5_libl (underneath it does CHGLIBL)
JOBD (best way--set initial library list in the JOBD of the user profile)
toolkit (yes, this works. If it didn't affect the library list then you may have made a mistake. Use stateless mode to work within the QSQSRVR db2 job).

Your example showed db2_connect, not db2_pconnect. Confirming that this is what your actual code did, too?


Posts: 875
Joined: Thu Apr 09, 2009 5:45 pm

Re: LIBL issues with UDFs

Post by aseiden » Sat Nov 11, 2017 3:44 am

Solution: Longnoz told me offline that his db2_connect, using i5_libl, worked after all.

Alan Seiden

Post Reply