IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Combination String search


IBM Mainframe Forums -> All Other Mainframe Topics
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Keanehelp

New User


Joined: 27 May 2008
Posts: 71
Location: USA, CA.

PostPosted: Fri Jul 05, 2013 2:48 pm
Reply with quote

Hi,

Requirement -

To find all the programs in a data set which Update table 'A'.

Current Solution -
1. Search all the programs of the data set for the table name.
2. From the result set of step 1 search programs having string ' UPDATE '
3. From the result set of step 2 -> Manually find all the programs Updating Table 'A'.

Desired Solution -

In a single utility I should get a list of programs pdating table 'A'.

I tried Search utility but couldn't find anything of my use.

Please let me know if anyone has developed a code for this amd also excuse me if this has already been answered or is a naive question. But my team needs this urgently.

Thanks.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Fri Jul 05, 2013 2:52 pm
Reply with quote

SRCHFOR has the ability to search for multiple strings. However, you may be able to do this with an SQL query against the releveant table. And, why not post in the DB2/SQL section?
Back to top
View user's profile Send private message
Keanehelp

New User


Joined: 27 May 2008
Posts: 71
Location: USA, CA.

PostPosted: Fri Jul 05, 2013 3:05 pm
Reply with quote

Thanks for the response.

SRCHFOR searches in 'OR' mode.
For example if I have two strings 'ABC' and 'DEF', then with multiple Strings option SRCHFOR will give (as per my knowledge) me programs containg 'ABC' OR programs containg 'DEF' in one go.

However

I need programs containing 'ABC' AND 'DEF'

Also I need a code/utility for general string search (Not resticted to DB2, was just an example).

Thanks
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Fri Jul 05, 2013 3:26 pm
Reply with quote

Did you try the FINDALL option of SRCHFOR?
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 792
Location: Pennsylvania

PostPosted: Fri Jul 05, 2013 6:01 pm
Reply with quote

You may want to look at SYSIBM.SYSTABAUTH.

This is what I use to obtain this information.

I was searching as you are, but I found too many variations in how things were coded.

This method however, does miss Dynamic SQL.

The columns that may interest you are in bold.

___ GRANTOR
___ GRANTEE
___ GRANTEETYPE
___ DBNAME
___ SCREATOR
___ STNAME
___ TCREATOR
___ TTNAME
___ AUTHHOWGOT
___ TIMESTAMP
___ DATEGRANTED
___ TIMEGRANTED
___ UPDATECOLS
___ ALTERAUTH
___ DELETEAUTH
___ INDEXAUTH
___ INSERTAUTH
___ SELECTAUTH
___ UPDATEAUTH ='Y'
___ IBMREQD
___ GRANTEELOCATION
___ LOCATION
___ COLLID
___ CONTOKEN
___ CAPTUREAUTH
___ REFERENCESAUTH
___ REFCOLS
___ GRANTEDTS
___ TRIGGERAUTH
___ GRANTORTYPE
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> All Other Mainframe Topics

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts PARSE Syntax for not fix length word ... JCL & VSAM 7
No new posts Search two or more word with FILEAID Compuware & Other Tools 15
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
No new posts file manager is doing string conversion IBM Tools 3
Search our Forums:

Back to Top