Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 71
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: 2230
Location: Hampshire, 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: 71
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: 2230
Location: Hampshire, 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: 726
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 String to ASCII conversion JPLMARTINS COBOL Programming 4 Sun Sep 29, 2019 12:00 am
No new posts Convert string to packed format ajaydwivedi4u COBOL Programming 6 Sat Sep 21, 2019 5:01 pm
No new posts Search the strings present in ps file... Bhuvana Narasimhan All Other Mainframe Topics 8 Thu Aug 22, 2019 8:20 pm
No new posts Search string from concatenated input... srini24 JCL & VSAM 8 Sat Mar 30, 2019 9:51 pm
No new posts Search an array inside an array amitc23 COBOL Programming 5 Thu Jan 24, 2019 4:19 pm

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