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
and all columns are retrievable from qsys2/syscolumns. Is there
anything like this for libraries?
Regards,
Arne Gellhaus
Em quinta-feira, 21 de fevereiro de 2002 07:15:23 UTC-4, Arne Gellhaus escreveu:
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
and all columns are retrievable from qsys2/syscolumns. Is there
anything like this for libraries?
Regards,
Arne Gellhaus
Very simple,
You can use
SELECT * FROM TABLE (QSYS2.OBJECT_STATISTICS('*ALL','*LIB') ) AS X
or simple
SELECT OBJNAME, OBJTYPE, OBJOWNER, OBJTEXT FROM TABLE (QSYS2.OBJECT_STATISTICS('*ALL','*LIB') ) AS X
On 7/30/2020 6:38 AM, higson...@gmail.com wrote:Responses are useful not not only to the original poster at the time of the post but also anyone else, even across time. If he hadn't posted then neither would have you, and I may not have found what I needed. qsys2.sysschemas, very nice. Thank you very
Em quinta-feira, 21 de fevereiro de 2002 07:15:23 UTC-4, Arne Gellhaus escreveu:
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
and all columns are retrievable from qsys2/syscolumns. Is there
anything like this for libraries?
Regards,
Arne Gellhaus
Very simple,
You can use
SELECT * FROM TABLE (QSYS2.OBJECT_STATISTICS('*ALL','*LIB') ) AS X
or simple
SELECT OBJNAME, OBJTYPE, OBJOWNER, OBJTEXT FROM TABLE (QSYS2.OBJECT_STATISTICS('*ALL','*LIB') ) AS X
Did you notice that the post to which you replied is almost 18.5 years old?
Anyway, try this:
select * from qsys2.sysschemas
I don't think any of the IBM i Services views and table functions were around in 2002, but they are now.
On Thursday, August 6, 2020 at 9:08:34 PM UTC-4, Mike Colangelo wrote:very much!
On 7/30/2020 6:38 AM, higson...@gmail.com wrote:
Em quinta-feira, 21 de fevereiro de 2002 07:15:23 UTC-4, Arne Gellhaus escreveu:
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
and all columns are retrievable from qsys2/syscolumns. Is there
anything like this for libraries?
Regards,
Arne Gellhaus
Very simple,
You can use
SELECT * FROM TABLE (QSYS2.OBJECT_STATISTICS('*ALL','*LIB') ) AS X
or simple
SELECT OBJNAME, OBJTYPE, OBJOWNER, OBJTEXT FROM TABLE (QSYS2.OBJECT_STATISTICS('*ALL','*LIB') ) AS X
Did you notice that the post to which you replied is almost 18.5 years old?
Anyway, try this:
select * from qsys2.sysschemas
I don't think any of the IBM i Services views and table functions were around in 2002, but they are now.Responses are useful not not only to the original poster at the time of the post but also anyone else, even across time. If he hadn't posted then neither would have you, and I may not have found what I needed. qsys2.sysschemas, very nice. Thank you
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 185 |
Nodes: | 16 (1 / 15) |
Uptime: | 84:53:52 |
Calls: | 3,750 |
Files: | 11,172 |
Messages: | 3,462,058 |