If I look in SYSFUNCS, this function is in QSYS2 & SYSIBM.
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Joe Pluta
Sent: 06 June 2011 13:17
To: Midrange Systems Technical Discussion
Subject: SQLGETWHERE and SQLGETINCEXPR
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
CREATE VIEW SYSINDEXES (INDEX_NAME FOR "NAME" ...
... CASE WHEN IX.DBXIDXSEL <> 'Y' THEN NULL WHEN IX.DBXIDXSELX IS NOT
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.
This mailing list archive is Copyright 1997-2019 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