View previous topic :: View next topic
|
Author |
Message |
Keanehelp
New User
Joined: 27 May 2008 Posts: 71 Location: USA, CA.
|
|
|
|
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 |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
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 |
|
|
Keanehelp
New User
Joined: 27 May 2008 Posts: 71 Location: USA, CA.
|
|
|
|
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 |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
Did you try the FINDALL option of SRCHFOR? |
|
Back to top |
|
|
daveporcelan
Active Member
Joined: 01 Dec 2006 Posts: 792 Location: Pennsylvania
|
|
|
|
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 |
|
|
|