• Re: List of all Libraries with SQL

    From higson.santos@higson.santos@gmail.com to comp.sys.ibm.as400.misc on Thu Jul 30 06:38:06 2020
    From Newsgroup: comp.sys.ibm.as400.misc

    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
    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From Mike Colangelo@air@vatican_.con to comp.sys.ibm.as400.misc on Thu Aug 6 18:08:31 2020
    From Newsgroup: comp.sys.ibm.as400.misc

    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.
    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From David Keck@davidkeck2014@gmail.com to comp.sys.ibm.as400.misc on Tue Aug 10 13:56:21 2021
    From Newsgroup: comp.sys.ibm.as400.misc

    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!
    --- Synchronet 3.21d-Linux NewsLink 1.2
  • From Ender Jose Yohan Alvarez@eyohan@banesco.com to comp.sys.ibm.as400.misc on Fri Dec 24 05:50:31 2021
    From Newsgroup: comp.sys.ibm.as400.misc

    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|oN DE USO DEL CORREO ELECTR|oNICO DE-a*Banesco Banco-aUniversal*-a HACIA INTERNET***-aLa informaci||n contenida en este correo electr||nico y cualquier anexo puede ser de car|icter confidencial y es propiedad de Banesco-aBanco Universal. S||lo est|i permitido su uso, copia, transmisi||n,-a recepci||n o distribuci||n a personas debidamente autorizadas.-aSi-austed recibi|| este correo por error por favor destr||yalo y/o-aelimine cualquier copia guardada en su sistema y notifique-ainmediatamente al remitente o a la direcci||n de correo electr||nica-a*mailmaster@banesco.com* <mailto:mailmaster@banesco.com>. Usted no debe utilizar la informaci||n-a contenida para ning||n prop||sito ni compartirla con otras personas.
    --- Synchronet 3.21d-Linux NewsLink 1.2