Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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 Replacing same string with different ... vickey_dw DFSORT/ICETOOL 6 Wed Feb 22, 2017 10:44 pm
No new posts Count Trailing Spaces in variable str... Virendra Shambharkar SYNCSORT 10 Thu Feb 02, 2017 12:23 pm
No new posts IMS Database backup info ashek15 IMS DB/DC 14 Wed Nov 16, 2016 5:29 am
This topic is locked: you cannot edit posts or make replies. Checking wether a string starts from ... sundaram.naveen CLIST & REXX 9 Thu Oct 06, 2016 11:56 am
No new posts Random Password (in string format) ge... ezhavendhan COBOL Programming 10 Mon Aug 29, 2016 3:18 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us