View previous topic :: View next topic
|
Author |
Message |
Gopalakrishna551
New User
Joined: 03 Jan 2018 Posts: 2 Location: india
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10886 Location: italy
|
|
|
|
did You ever hear of ISPF search-for and extended-search-for
Quote: |
Occupation: software engineer |
|
|
Back to top |
|
|
Willy Jensen
Active Member
Joined: 01 Sep 2015 Posts: 734 Location: Denmark
|
|
|
|
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 |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2593 Location: Silicon Valley
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10886 Location: italy
|
|
|
|
Quote: |
I can use F ALL gopal in the 2nd PDS |
seems to tell something else |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2593 Location: Silicon Valley
|
|
|
|
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 |
|
|
Gopalakrishna551
New User
Joined: 03 Jan 2018 Posts: 2 Location: india
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
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 |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2454 Location: Hampshire, UK
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10886 Location: italy
|
|
|
|
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 |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2593 Location: Silicon Valley
|
|
|
|
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 |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2140 Location: USA
|
|
|
|
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" - ?????
"by taking the names one by one automatically" - ?????
"this partcular dataset contains 1000 names" - ??????
It nothing except shame, trying to appear with questions like this one at the MAINFRAME EXPERTS FORUM.
This is the level of kindergarten. |
|
Back to top |
|
|
|