Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to get list of tables/libraries

2,690 views
Skip to first unread message

Yves Glodt

unread,
Sep 11, 2003, 2:33:36 AM9/11/03
to

How can I get a list of all the libraries and tables on my as400?

regards,
Yves

----------------------------------------------------------------
ELECTRO SECURITY
Yves Glodt yves.glodt at electrosecurity.lu
Support Informatique
73, rue de Strasbourg Tél: ++352 406 406-1
L-2561 Luxembourg Fax: ++352 406 407
Web: http://www.electrosecurity.lu
----------------------------------------------------------------

Yves Glodt

unread,
Sep 11, 2003, 2:57:44 AM9/11/03
to
Yves Glodt wrote:

>
> How can I get a list of all the libraries and tables on my as400?

by the way, I use an odbc connection from redhat9, and I connect via isql.

Dr. Ugo Gagliardelli

unread,
Sep 11, 2003, 7:25:03 AM9/11/03
to
Yves Glodt wrote:
>
> Yves Glodt wrote:
>
> >
> > How can I get a list of all the libraries and tables on my as400?
>
> by the way, I use an odbc connection from redhat9, and I connect via isql.
>
for example:
SELECT SYSTEM_TABLE_SCHEMA, SYSTEM_TABLE_NAME FROM SYSTABLES ORDERBY SYSTEM_TABLE_SCHEMA

--
Dr.Ugo Gagliardelli,Modena,ItalyCertifiedUindoscrasherAñejoAlcoolInside
Spaccamaroni andate a cagare/Spammers not welcome/Spammers vão à merda
Spamers iros a la mierda/Spamers allez vous faire foutre
Spammers loop schijten/Spammers macht Euch vom Acker

Jonas Temple

unread,
Sep 11, 2003, 8:34:27 AM9/11/03
to
You can query table SYSTABLES, which should be in QSYS2 library
(although you shouldn't have to qualify the table, it should be in the
connection's library list).

Jonas

Yves Glodt <yves....@SPAMTRAPelectrosecurity.lu> wrote in message news:<3f601...@news.vo.lu>...

J Blooker

unread,
Sep 11, 2003, 9:27:08 AM9/11/03
to
You can use SQL to get this information.


Get all user libraries...

SELECT DISTINCT dbxlib
FROM qsys/qadbxatr
WHERE dbxown <> 'QSYS'


Get all user libraries, files...

SELECT DISTINCT dbxlib, dbxfil
FROM qsys/qadbxatr
WHERE dbxown <> 'QSYS'


John B.

Yves Glodt <yves....@SPAMTRAPelectrosecurity.lu> wrote in message news:<3f601...@news.vo.lu>...

Yves Glodt

unread,
Sep 11, 2003, 10:06:28 AM9/11/03
to
J Blooker wrote:
> You can use SQL to get this information.
>
>
> Get all user libraries...
>
> SELECT DISTINCT dbxlib
> FROM qsys/qadbxatr
> WHERE dbxown <> 'QSYS'

Hi John, I tried it an this is my result:

SQL> SELECT DISTINCT dbxlib, dbxfil FROM qsys.qadbxatr WHERE dbxown <>
'QSYS'

+-----------+-----------+
| | |
| | |
| | |
<snip empty result>
| | |
| | |
| | |
| | |
| | |
+-----------+-----------+
7598 rows returned


> Get all user libraries, files...
>
> SELECT DISTINCT dbxlib, dbxfil
> FROM qsys/qadbxatr
> WHERE dbxown <> 'QSYS'


SQL> SELECT DISTINCT dbxlib FROM qsys.qadbxatr WHERE dbxown <> 'QSYS'
+-----------+
| DBXLIB |
+-----------+
| |
| |
<snip empty result>
| |
| |
| |
+-----------+
63 rows returned
SQL>


Why do I see nothing in the rows?
I query the db from isql over unixodbc, in rh9 linux using the iseries
odbc driver (V14) from IBM.

regards,
Yves

> John B.
>
>
>
>
>
> Yves Glodt <yves....@SPAMTRAPelectrosecurity.lu> wrote in message news:<3f601...@news.vo.lu>...
>
>>How can I get a list of all the libraries and tables on my as400?
>>
>>regards,
>>Yves
>>
>>
>>
>>----------------------------------------------------------------
>>ELECTRO SECURITY
>>Yves Glodt yves.glodt at electrosecurity.lu
>>Support Informatique
>>73, rue de Strasbourg Tél: ++352 406 406-1
>>L-2561 Luxembourg Fax: ++352 406 407
>>Web: http://www.electrosecurity.lu
>>----------------------------------------------------------------


--

0 new messages