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
 

 

Combination String search

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics
View previous topic :: :: View next topic  
Author Message
Keanehelp

New User


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

PostPosted: Fri Jul 05, 2013 2:48 pm    Post subject: Combination String search
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: 1756
Location: UK

PostPosted: Fri Jul 05, 2013 2:52 pm    Post subject:
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: 70
Location: USA, CA.

PostPosted: Fri Jul 05, 2013 3:05 pm    Post subject:
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: 1756
Location: UK

PostPosted: Fri Jul 05, 2013 3:26 pm    Post subject:
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: 662
Location: Pennsylvania

PostPosted: Fri Jul 05, 2013 6:01 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics 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
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
No new posts How to insert a lengthy string havin... vidyaa DB2 7 Thu Aug 25, 2016 5:20 pm


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