× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Using Chuck's input as guidance, I was doing a little more research on the QADBXREF file and its associated views. One of those is a view called SYSINDEXES. For fun and excitement, I tried to duplicate the view (CRTDUPOBJ) and not surprisingly I can only duplicate it using a profile with *ALLOBJ authority, not with normal *PUBLIC authority. But then I saw something interesting. When I created the view with the right authority and then took a look at the created object with DSPFD, the associated SQL has an unusual piece to it. You can do it yourself by doing a CRTDUPOBJ and then doing a DSPFD, but the relevant bit is this part:

CREATE VIEW SYSINDEXES (INDEX_NAME FOR "NAME" ...
... CASE WHEN IX.DBXIDXSEL <> 'Y' THEN NULL WHEN IX.DBXIDXSELX IS NOT NULL
THEN IX.DBXIDXSELX ELSE TESTLIB.SQLGETWHERE(IX.DBXLIB,IX.DBXFIL) END ...

Note the call to procedure TESTLIB.SQLGETWHERE. I didn't create that function! It doesn't actually seem to exist; if I try to call it myself I get SQLGETWHERE in TESTLIB not found. If I call it unqualified I get results. This works fine:

SELECT SQLGETWHERE(DBXLIB,DBXFIL) from QADBXREF

Which brings me to my primary question. Maybe the function is in the system library list, but I can't find it on the system anywhere. Where would I look to find more information about this function? I haven't been able to find it anywhere. I looked in SYSFUNCS, but no luck. Is it some sort of undocumented built-in function?

And the minor corollary question is that the generated VIEW in the DSPFD doesn't seem to be quite right: certainly as written the query wouldn't seem to work since there is no SQLGETWHERE in TESTLIB. Maybe that's just an artifact of DSPFD, though.

Joe

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.