Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Search for a String in DB2 Database

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
Manju-Pacha

New User


Joined: 21 Mar 2007
Posts: 7
Location: Bangalore

PostPosted: Wed Mar 21, 2007 11:17 am    Post subject: Search for a String in DB2 Database
Reply with quote

Hi,

I need to search tables in DB2 database in Mainframe Z/OS for a particular string irrespective of which column that search string lies.
Is there any method to do so using any mainframe DB2 utility or any third party tools like SQL Squirrel Assistant which we use to connect to DB2 database?

Thanks,
Manju
Back to top
View user's profile Send private message

vini_srcna

Active User


Joined: 26 May 2005
Posts: 178
Location: Copenhagen, Denmark

PostPosted: Wed Mar 21, 2007 1:12 pm    Post subject:
Reply with quote

Upto my knowledge i dont think you can do that.
I would have unloaded the data into PS file and put a F command.
This would be OK if you have less data.
Back to top
View user's profile Send private message
Manju-Pacha

New User


Joined: 21 Mar 2007
Posts: 7
Location: Bangalore

PostPosted: Wed Mar 21, 2007 1:54 pm    Post subject: Re: Search for a String in DB2 Database
Reply with quote

we need to do this for almost entire tables in client DB..quite a huge amount of data icon_sad.gif
I heard about freetext search feature in SQL SERVER, query is of the format
Select * from table_name where FREETEXT(*, 'search string?)

* indicates search entire columns

Would like to know whether anything of similar type is available for DB2 thru some add on DB2 products.
Back to top
View user's profile Send private message
vini_srcna

Active User


Joined: 26 May 2005
Posts: 178
Location: Copenhagen, Denmark

PostPosted: Wed Mar 21, 2007 3:02 pm    Post subject:
Reply with quote

Is that on Z/OS platform or LUW ..?
Back to top
View user's profile Send private message
Manju-Pacha

New User


Joined: 21 Mar 2007
Posts: 7
Location: Bangalore

PostPosted: Wed Mar 21, 2007 3:27 pm    Post subject: Re: Search for a String in DB2 Database
Reply with quote

Its Z-OS.

But if we can perform search using some products that can be installed in Windows machine and then connect to mainframe Db2, that would also be fine.
Back to top
View user's profile Send private message
vini_srcna

Active User


Joined: 26 May 2005
Posts: 178
Location: Copenhagen, Denmark

PostPosted: Wed Mar 21, 2007 6:42 pm    Post subject:
Reply with quote

I dont think we have such option now. I'm wondering howcome you have such requirement. You have to search for a string..that is ok.
But searching for a string in a DB2 table irrespective of column name makes no sense to me. In fact i have never come across this kind of situtaion. I dont think there would be some add on product or third party product for this kind of search. Please let me know if you find solution for this. thanks
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Mar 22, 2007 12:26 am    Post subject:
Reply with quote

Hello,

Is this something you need to do once? Is the data constantly maintained or is it historical data. What is considered huge at your location?

One thing you could do is to create a "new" DB2 table that only has one column that is the entire width of the problem table (or you could strip out all but the pic x(nn) fields as the text search wouldn't include prices, quantities, rates, etc. You could unload the "real" data and load the data you want to search.

Once unloaded, you could also transfer the data to an NT box (with today's xfer speed even high volumes can be sent rather quickly) and load it into SQL Server and use FREETEXT there.

I too am curious how a given text value could be "just anywhere" icon_smile.gif
Back to top
View user's profile Send private message
Manju-Pacha

New User


Joined: 21 Mar 2007
Posts: 7
Location: Bangalore

PostPosted: Thu Mar 22, 2007 9:13 am    Post subject:
Reply with quote

Thanks Dick & Vini for your feedback.
This is part of an impact analysis for a retail client where we just have few IP adresses and domain names as input and we need to find the impact of IP/domain migration in entire client applications.
As of now we don't have inputs on which all tables/columns in db, these info are stored. For programs and other components we used search options in ISPF, but for DB2 we didn't find any such help.

Just was trying to find out if any options are available incase we don't get specific info about tables from SMEs.

Thanks a lot!

Manju
Back to top
View user's profile Send private message
vini_srcna

Active User


Joined: 26 May 2005
Posts: 178
Location: Copenhagen, Denmark

PostPosted: Thu Mar 22, 2007 10:47 am    Post subject:
Reply with quote

You are welcome..!

Quote:
As of now we don't have inputs on which all tables/columns in db, these info are stored. Just was trying to find out if any options are available incase we don't get specific info about tables from SMEs.


Lets say you found the solution but still you need to know the table names icon_smile.gif
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Mar 22, 2007 6:59 pm    Post subject:
Reply with quote

You're welcome and good luck icon_smile.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts line 52: Name or string > 250 char... Ashishpanpaliya CLIST & REXX 5 Sat Oct 14, 2017 2:29 am
No new posts HEX value search in a DB2 query maxsubrat DB2 2 Wed Oct 04, 2017 3:04 pm
No new posts Moving UDB database to Db2 on z/OS Keith Hooley DB2 4 Wed Sep 27, 2017 12:38 am
No new posts Search for a string in many PDS KARTHIGADEVI CLIST & REXX 5 Fri Sep 08, 2017 2:32 pm
No new posts How to change a string containing the... chong.zhou TSO/ISPF 6 Tue Aug 29, 2017 4:54 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us