LIBL issues with UDFs

General discussion on Zend Server for IBM System i

LIBL issues with UDFs

Postby longnoz on Fri Jul 07, 2017 10:26 pm

Hi

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?

Thanks
Attachments
QPJOBLOG_2017-06-27-11.49.17.925000.PDF
Job log - see page 2
(20.8 KiB) Downloaded 86 times
longnoz
 
Posts: 22
Joined: Thu Feb 16, 2012 8:55 pm

Re: LIBL issues with UDFs

Postby aseiden on 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?

Best,
Alan
http://www.seidengroup.com
aseiden
 
Posts: 870
Joined: Thu Apr 09, 2009 5:45 pm

Re: LIBL issues with UDFs

Postby aseiden on Sat Nov 11, 2017 3:44 am

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

Alan Seiden
http://www.seidengroup.com
aseiden
 
Posts: 870
Joined: Thu Apr 09, 2009 5:45 pm


Return to Zend Server for IBM i

Who is online

Users browsing this forum: No registered users and 2 guests