Sorry, I made a mistake. Change
when (subwords(line,1,3) = 'Directory entry type') then to when (subwords(line,1,3) = 'Directory entry type') & (word(line,5) = 'Indirect') then ----- Original Message ----- From: "Gert van der Kooij" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, March 21, 2002 11:58 PM Subject: Re: [DB2EUG] How can I get a listing of local databases via a db2 command line. > Something like: > > 'db2 list db directory|rxqueue' > do while queued() > 0 > parse pull line > select > when (subwords(line,1,2) = 'Database name') then > Dbname = word(line,4) > when (subwords(line,1,3) = 'Directory entry type') then > say 'Local Dbname = ' Dbname > otherwise nop > end > > ----- Original Message ----- > From: <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Thursday, March 21, 2002 10:56 PM > Subject: Re: [DB2EUG] How can I get a listing of local databases via a db2 > command line. > > > > > > 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 > > > > - > ::: 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
