i would like to get a list of all libraries with a SQL Statement. I
can get all tables with
SELECT * FROM qsys2/systables
and all columns are retrievable from qsys2/syscolumns. Is there
anything like this for libraries?
Regards,
Arne Gellhaus
"Arne Gellhaus" <gell...@gmx.de> wrote in message
news:8bb46d08.02022...@posting.google.com...
Sam
"Arne Gellhaus" <gell...@gmx.de> wrote in message
news:8bb46d08.02022...@posting.google.com...
No. At least not on the AS/400 i am using ;-). This had been too easy.
Arne
> Hi,
> i would like to get a list of all libraries with a SQL Statement. I
> can get all tables with
> SELECT * FROM qsys2/systables
If what You need is just a list of libraries (containing tables)
you can perform
SELECT distinct table_schema FROM qsys2/systables
You will however be missing libraries containing programs and
any other objs
Bye
Federico
--
Posted via Mailgate.ORG Server - http://www.Mailgate.ORG
This way i did it before, but i want to be able to see empty
libraries, and this is - as you stated before - not possible this way.
After reading many articles on the net, i think it is just not
possible "the right way".
I am using now (as BPCI writes before) a
call qsys/qcmdexc('dspobjd obj(*all/*all) objtype(*lib)
output(*outfile) outfile(qtemp/liblist)', 0000000076.00000)
to create a list of libraries and then
SELECT odObnm FROM qtemp/liblist
to retrieve it.
Thank you all :-)
Arne
you could use
select distinct dbxlib from QSYS.QADBXATR
for a list of all libraries. QSYS.QADBXATR contains a list of all tables
in all libraries. For example I use the following to retrieve a list of
DB tables that are PF files:
select dbxlib, dbxlfi from QSYS.QADBXATR where dbxrel='Y' and
dbxatr='PF'
returns a library/long filename list.
Peter
In article <8bb46d08.02022...@posting.google.com>,
gell...@gmx.de says...