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

Utility for search operation


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Gopalakrishna551

New User


Joined: 03 Jan 2018
Posts: 2
Location: india

PostPosted: Wed Jan 03, 2018 11:07 am
Reply with quote

Hi,

I have a set of members in 1st PDS file with the following data
{gopal,krishna,sangepu,krish,venkat}

and i have another 2nd PDS data set which have 1000 members.
I need a search utility for searching whether the contents of PDS1 i.e. gopal,krishna etc are existed or not in the 2nd PDS one by one automatically in the background..

I can use F ALL gopal in the 2nd PDS but if i do that i need to search one by one which is a hectic task if i need to found 100 members in 1000 members dataset.

I want to simplify this and need a utility so that i can run that utility in background...

Any help appreciated.

Thanks,
Gopal
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Wed Jan 03, 2018 1:28 pm
Reply with quote

did You ever hear of ISPF search-for and extended-search-for icon_question.gif

Quote:
Occupation: software engineer
icon_eek.gif
Back to top
View user's profile Send private message
Willy Jensen

Active Member


Joined: 01 Sep 2015
Posts: 712
Location: Denmark

PostPosted: Wed Jan 03, 2018 2:46 pm
Reply with quote

As enrico writes, the ISPF Search utility dialogs (3.14 and 3.15) can generate a batch job. My personal favorite is the PDS86 program in file 182 at cbttape.org. It does text search across all or selected members, amongst other things. This of course requires that you are allowed to install a program.
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2545
Location: Silicon Valley

PostPosted: Wed Jan 03, 2018 10:28 pm
Reply with quote

Quote:
searching whether the contents of PDS1

It seems like not really a search-for task, as I know it. I think you want to compare the member names. Save each member name list to a data set then compare those data sets.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Thu Jan 04, 2018 12:32 am
Reply with quote

Quote:
I can use F ALL gopal in the 2nd PDS


seems to tell something else
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2545
Location: Silicon Valley

PostPosted: Thu Jan 04, 2018 6:58 am
Reply with quote

I was confused by the statement of requirement. I think this is what was meant:

Quote:
I need a search utility for searching whether the member names of PDS1 i.e. gopal,krishna etc are referenced or not in the 2nd PDS one by one automatically in the background.
Back to top
View user's profile Send private message
Gopalakrishna551

New User


Joined: 03 Jan 2018
Posts: 2
Location: india

PostPosted: Thu Jan 04, 2018 5:45 pm
Reply with quote

Let me clarify my requirement once again..

I have below 5 names

Gopal
krish
krishna
vera
pedro

I need a utility which runs in background to find out whether these 5 names are existed in a particular data set by taking the names one by one automatically. this partcular dataset contains 1000 names.

i.e. the utility should pick gopal and find out whether it existed in particular data set ,then pick krish and finding it in the data set, then pick krishna and do the same for the rest of names ..

as per my understanding 3.14 & 3.15 allows us to find out whether a particular string exists in a data set or not..

correct me if anything wrong

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

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Jan 04, 2018 5:54 pm
Reply with quote

Quote:

I have a set of members in 1st PDS file with the following data
{gopal,krishna,sangepu,krish,venkat}

Are these values within any given member of the PDS, or are they member names ?
I would guess that they are member names but your terminology doesn't make this absolutely clear as I would understand that DATA would be actual data within a MEMBER

Quote:
and i have another 2nd PDS data set which have 1000 members.
I need a search utility for searching whether the contents of PDS1 i.e. gopal,krishna etc are existed or not in the 2nd PDS one by one automatically in the background..

Please see the requested clarification above

Quote:
I can use F ALL gopal in the 2nd PDS but if i do that i need to search one by one which is a hectic task if i need to found 100 members in 1000 members dataset.

I want to simplify this and need a utility so that i can run that utility in background...

What have you tried so far, and what problems have you encountered
Which code language are you suggesting, COBOL, REXX, whatever
What logic have you developed and need further help with

Suggestions -
List the members of both PDS datasets (assuming the values mentioned are members)
Maybe try a SORT solution using Joinkeys to see what's common between the two PDS datasets
There will be lots of examples of both parts on the forum, and you could code it all in one little REXX exec too
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


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

PostPosted: Thu Jan 04, 2018 6:04 pm
Reply with quote

Quote:
as per my understanding 3.14 & 3.15 allows us to find out whether a particular string exists in a data set or not.

Correct and it can search for multiple strings at once and in the background. But, you will need one execution per target data set (not file) if, indeed, you are talking about sequential data sets and not PDSes.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Fri Jan 05, 2018 1:07 am
Reply with quote

something along the lines of
Code:
//SEARCH  EXEC PGM=ISRSUPC,                                           
//             PARM=(SRCHCMP,XREF,'ANYC')                                                   
//NEWDD     DD DSN=<pds1>,                         
//             DISP=SHR                                                   
//          DD DSN=<pdsn>,                         
//             DISP=SHR       
...
...
...
//          DD DSN=<pdsn>,                         
//             DISP=SHR       
//OUTDD  DD SYSOUT=<the sysout class>                                                 
//SYSIN  DD *                                                           
SRCHFOR  <string1>
SRCHFOR  <string2>
...
...
...
SRCHFOR  <stringn>


should work

just substitute for pds1,pds2,...,pdsn
the PDSes to be searched
and for string1,string2,...,stringn
the strings to be found
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2545
Location: Silicon Valley

PostPosted: Fri Jan 05, 2018 3:26 am
Reply with quote

Quote:
by taking the names one by one automatically


Enrico provided a sample job. There is not a tool that will build the job for your automatically.
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2010
Location: USA

PostPosted: Tue Jan 09, 2018 1:24 am
Reply with quote

Gopalakrishna551 wrote:
I need a utility which runs in background to find out whether these 5 names are existed in a particular data set by taking the names one by one automatically. this partcular dataset contains 1000 names.

I would recommend, besides of playing computer games and clicking gadgets, also start trying to understand the fundamental IT terminology; at least, find out the difference between "dataset", "partitioned dataset", "names", "members"

"Whether these 5 names existed" - ????? icon_axe.gif
"by taking the names one by one automatically" - ????? icon_pray.gif
"this partcular dataset contains 1000 names" - ?????? icon_butt.gif

It nothing except shame, trying to appear with questions like this one at the MAINFRAME EXPERTS FORUM.

This is the level of kindergarten. 36_8_9.gif
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 -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
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 REASON 00D70014 in load utility DB2 6
No new posts first column truncated in search result IBM Tools 13
No new posts ISRSUPC search utility - using high l... TSO/ISPF 2
Search our Forums:

Back to Top