• List of all Libraries with SQL

    From higson.santos@gmail.com@21:1/5 to All on Thu Jul 30 06:38:06 2020
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mike Colangelo@21:1/5 to higson.santos@gmail.com on Thu Aug 6 18:08:31 2020
    On 7/30/2020 6:38 AM, higson.santos@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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From David Keck@21:1/5 to Mike Colangelo on Tue Aug 10 13:56:21 2021
    On Thursday, August 6, 2020 at 9:08:34 PM UTC-4, Mike Colangelo wrote:
    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 very
    much!

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ender Jose Yohan Alvarez@21:1/5 to All on Fri Dec 24 05:50:31 2021
    El martes, 10 de agosto de 2021 a las 16:56:22 UTC-4, David Keck escribió:
    On Thursday, August 6, 2020 at 9:08:34 PM UTC-4, Mike Colangelo wrote:
    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
    very much!
    Gracias

    --
    ***REGULACIÓN DE USO DEL CORREO ELECTRÓNICO DE *Banesco Banco Universal*  HACIA INTERNET*** La información contenida en este correo electrónico y cualquier anexo puede ser de carácter confidencial y es propiedad de Banesco Banco Universal. Sólo está permitido su uso, copia, transmisión,  recepción o distribución a personas debidamente autorizadas. Si usted recibió este correo por error por favor destrúyalo y/o elimine cualquier copia guardada en su sistema y notifique inmediatamente al remitente o a la dirección de correo electrónica *mailmaster@banesco.com* <mailto:mailmaster@banesco.com>. Usted no debe utilizar la información  contenida para ningún propósito ni compartirla con otras personas.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)