Of course, the really elegant way to do this would be to use the sqledgne
("Get Next Database Directory Entry") API (see the "Administrative API
Reference" manual for documentation). This is available for REXX (see the
dbcat.cmd sample program) and other languages. I assume this will work
with REXX for Windows too, so it may be your best bet.
Steve Westfall
Equifax, Inc.
Tim_Traxson@jb
hunt.com To: [EMAIL PROTECTED]
Sent by: cc:
owner-db2eug@l Subject: Re: [DB2EUG] How can I get a
listing of local databases via a db2 command
ugwash.org line.
03/21/2002
03:56 PM
Please respond
to Tim_Traxson
That example didn't come out like I wanted. Maybe this will be better.
Search for the word "indirect" and go back a retrieve the database
name that is 4 lines above it.
Database 5 entry:
Database alias = TESTDB
Database name = TESTDB<===Retrieve this
Database drive = D:\DB2
Database release level = 9.00
Comment =
Directory entry type = Indirect<===Find this
Catalog node number = 0
Thanks,
Tim Traxson
[EMAIL PROTECTED]
479-820-8811
----- Forwarded by Tim Traxson/Corporate/JBHunt on 03/21/2002 03:53 PM
-----
Tim_Traxson@jb
hunt.com To: [EMAIL PROTECTED]
Sent by: cc:
owner-db2eug@l Subject: Re: [DB2EUG] How can
I get a listing of local databases via a
ugwash.org db2 command line.
03/21/2002
03:42 PM
Please respond
to Tim_Traxson
I knew the list database directory option was available but didn't know
there was
a way to read a previous line once I find the keyword "indirect". My idea
is to
pipe the list database directory to a file and use the file as an input
file to look for the
"Directory entry type = Indirect" then read back four lines
and get the database name. Anyone know how to do this with rexx?
Database 5 entry:
Database alias = TESTDB
Database name = TESTDB
<=======================================
Database drive = D:\DB2
|
Database release level = 9.00
|
Comment = |
Directory entry type = Indirect<========Find this.....retrieve
this==
Catalog node number = 0
Thanks,
Tim Traxson
[EMAIL PROTECTED]
479-820-8811
Steve.Westfall@e
quifax.com To: [EMAIL PROTECTED]
cc: [EMAIL PROTECTED],
[EMAIL PROTECTED]
03/21/2002 03:33 Subject: Re: [DB2EUG] How
can I get a listing of local
PM databases via a db2 command
line.
Tim,
The "LIST DATABASE DIRECTORY" command lists ALL databases, local and
remote. The local databases have "indirect" listed as the Directory entry
type. Since you're using REXX for Windows, you could probably pull these
from the output.
Steve Westfall
Equifax, Inc.
Tim_Traxson@jb
hunt.com To: [EMAIL PROTECTED]
Sent by: cc:
owner-db2eug@l Subject: [DB2EUG] How can I
get a listing of local databases via a db2 command
ugwash.org line.
03/21/2002
01:37 PM
Please respond
to Tim_Traxson
Hello list,
I am currently working on some automation and want to know of a way to get
a listing
of only the local databases that are cataloged on a machine. I thought the
list active
databases might be the direction to go, but would only be effective if all
of the databases
had a connection at all times. Apparently that is not the case here.
DB2 UDB NT version 6.1
REXX for Windows
Anyone have any other ideas?
Thanks,
Tim Traxson
[EMAIL PROTECTED]
479-820-8811
-
::: When replying to the list, please use 'Reply-All' and make sure
::: a copy goes to the list ([EMAIL PROTECTED]).
*** To unsubscribe, send 'unsubscribe' to [EMAIL PROTECTED]
*** For more information, check http://www.db2eug.uni.cc
-
::: When replying to the list, please use 'Reply-All' and make sure
::: a copy goes to the list ([EMAIL PROTECTED]).
*** To unsubscribe, send 'unsubscribe' to [EMAIL PROTECTED]
*** For more information, check http://www.db2eug.uni.cc
-
::: When replying to the list, please use 'Reply-All' and make sure
::: a copy goes to the list ([EMAIL PROTECTED]).
*** To unsubscribe, send 'unsubscribe' to [EMAIL PROTECTED]
*** For more information, check http://www.db2eug.uni.cc
-
::: When replying to the list, please use 'Reply-All' and make sure
::: a copy goes to the list ([EMAIL PROTECTED]).
*** To unsubscribe, send 'unsubscribe' to [EMAIL PROTECTED]
*** For more information, check http://www.db2eug.uni.cc