If you want to check the library list, where a specific view is found, you
can run the following query:
Select a.Schema_Name
from Library_List_Info a join SysTables b on Schema_Name = Table_Schema
Where Table_Type = 'V'
and Table_Name = 'YOURVIEWNAME'
Order By Ordinal_Position
Limit 1;
Mit freundlichen Grüßen / Best regards
Birgitta Hauser
Modernization ? Education ? Consulting on IBM i
Database and Software Architect
IBM Champion since 2020
"Shoot for the moon, even if you miss, you'll land among the stars." (Les
Brown)
"If you think education is expensive, try ignorance." (Derek Bok)
"What is worse than training your staff and losing them? Not training them
and keeping them!"
"Train people well enough so they can leave, treat them well enough so they
don't want to. " (Richard Branson)
"Learning is experience ? everything else is only information!" (Albert
Einstein)
-----Original Message-----
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Justin
Taylor
Sent: Wednesday, 8 January 2025 19:28
To: MIDRANGE-L <midrange-l@xxxxxxxxxxxxxxxxxx>
Subject: Re: View/UDF - What library?
Correction, it's a SQL UDF not RPG.
Rob, JOB_LOCK_INFO gives the view library but I'm concerned about
performance. I was really hoping for a special register or SQL variable
that would have the library .
Birgitta, my question isn't about creating a view. I just need to know when
the view runs what library it resides in. The view calls a UDF. When a
user queries *LIBL/My_View, IBMi resolves to a view in a specific library,
and the UDF needs to know what that library is. The UDF has several dynamic
SELECT statements and they need to use the same library as where the view
resides.
Thanks
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit:
https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://archive.midrange.com/midrange-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.
As an Amazon Associate we earn from qualifying purchases.