View previous topic :: View next topic
|
Author |
Message |
vinit_infy Warnings : 1 New User
Joined: 07 Apr 2005 Posts: 56
|
|
|
|
I need to search a string within a PDS. This PDS have some of PS files as members. All the PS having data. I need to search in these data.
Please advise me. Please don't advise using ISPF -->3.14. |
|
Back to top |
|
|
ranjit_bh
New User
Joined: 06 Apr 2005 Posts: 7
|
|
|
|
Hi Vinit,
If you could provide more details about the requirement it might be useful. You could also mention why you do not wish to use the 3.14/3.15 ISPF search utility.
Regards,
Ranjit |
|
Back to top |
|
|
radhakrishnan82
Active User
Joined: 31 Mar 2005 Posts: 435 Location: chennai, India
|
|
|
|
vinit,
You can write a scan jcl and search a string in the PDS. |
|
Back to top |
|
|
sribks2005
New User
Joined: 04 Apr 2005 Posts: 20 Location: Mysore
|
|
|
|
hi,
In TSO , go to the option K [ PDS and Library Management Tools-> PDSMAN].
PDSMAN provides facility to process the members of a PDS. It can be either
1. Searching for a string in members of a PDS
2. Scaning for a string and replacing it with another string in all members of that PDS.
Follow the steps
============================
1. Select the option 7 [Member Scan/Replace Utility] from the screen you get after going to PDSMAN option.
2.Give the PDS name, select the option either S (scan) or R(replace).
3. Select either the foreground or batchground procees. Give "*" in sysout field.
4. Press enter, if you want to process all the members of the PDS , then keep blank for "member" field and press enter in the next screen you get.
5. Give the string name you want to search
6. for replace operation, you have to give both the string to be replaced and a string to be replaced with.
7. you also have filtering facility here to narrow down your search output.
8.press enter
9. If it is a foreground operation you have selected int the first screen, then you will get the details on the members that have satisfied the condition you have specified immediately on the screen.
10. If you have selected batch mode, then a jcl will be created and submitted. one advantage here is you can save the output of your search criteria in a data set. If you don't want this , you can just specify foregroung mode of operation.
===========================
please tell us , why you don't want to use 3.14 option of TSO for the same purpose.
Thank you |
|
Back to top |
|
|
vinit_infy Warnings : 1 New User
Joined: 07 Apr 2005 Posts: 56
|
|
|
|
Hi Ranjit,
Actually i want to see the JCL for this. Also as ii know by 3.14 we can only search in one member. But i want to do for multiple members once.
Regards,
Vinit |
|
Back to top |
|
|
somasundaran_k
Active User
Joined: 03 Jun 2003 Posts: 134
|
|
|
|
Vinit
you can serach all the members in a PDS at once. You don't have to search each members one by one. Use the wild card '*'
for the member name.
Like YOUR.PDS(*) as the search library. This will search all the members in the PDS. Also you have the option to search Foreground and Background.So you can select the Background option and create a job for this.
Here is a sample job for your refernce.
Code: |
//SEARCH EXEC PGM=ISRSUPC,
// PARM=(SRCHCMP,
// '')
//NEWDD DD DSN=YOUR.DATASET1,
// DISP=SHR
// DD DSN=YOUR.DATASET2,
// DISP=SHR
//OUTDD DD SYSOUT=(*)
//SYSIN DD *
SRCHFOR 'your search string'
/*
|
hth
-Som |
|
Back to top |
|
|
vinit_infy Warnings : 1 New User
Joined: 07 Apr 2005 Posts: 56
|
|
|
|
Thanks Som. |
|
Back to top |
|
|
notonly4u
New User
Joined: 26 Apr 2005 Posts: 87 Location: Hyderabad
|
|
|
|
Dear Vnit,
You can use file-aid option 3.6 to do the search.
It is much simple and faster too....
Hope iam right. If anything wrong please make a note.
Thanks, |
|
Back to top |
|
|
andycool
New User
Joined: 12 Apr 2005 Posts: 64
|
|
|
|
Hi Guys,
As posted by somsundar above, i also have a similar requirement:
I need to find a string like '123456' in a single dataset
Code: |
=============================
//SEARCH EXEC PGM=ISRSUPC,
// PARM=(SRCHCMP,
// ' ')
//NEWDD DD DSN=YOUR.DATASET1,
// DISP=SHR
//OUTDD DD SYSOUT=(*)
//SYSIN D *
SRCHFOR '123456'
/*
============================= |
Will the above piece of code serve my purpose?
Also, i wud really appreciate if any1 throws light on the utility "ISRSUPC" and its parameters, this is very new to me.
Thanks in advance, |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
Back to top |
|
|
andycool
New User
Joined: 12 Apr 2005 Posts: 64
|
|
|
|
Hey superk,
What is exactly want is :
In a job
1. Search for the string in the Variable Block dataset.
2. If found execute the next step in job.
3. If not found terminate the job.
For instance:
========ANDYCOOL.TEST.DATA========
165780078203043
290780078203043
===============================
From the above dataset which is a Variable Block dataset, i need to find if any record starts with '165', If yes the next step in the job shud be executed else the job shud terminate.
I guess i can do this by the SORT utility. Below is a code which will copy the selected record to some other dataset, i need to know how shud i modify it to meet my above mentioned requirements.
/*
//S1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=... input file
//SORTOUT DD DSN=... output file
//SYSIN DD *
OPTION COPY
INCLUDE COND=(1,3,CH,EQ,C'165')
/*
Please let me know, Thanks in advance, |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
This should work:
Code: |
//STEP0001 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN=input.dataset ...
//T1 DD DSN=&&T1,DISP=(NEW,PASS),UNIT=VIO
//TOOLIN DD DATA
COPY FROM(IN) USING(CTL1)
COUNT FROM(T1) EMPTY
/*
//CTL1CNTL DD DATA
INCLUDE COND=(5,3,CH,EQ,C'165')
OUTFIL FNAMES=T1
/*
//*
// IF (STEP0001.RC = 0) THEN <== DATA FOUND
//STEP0002 EXEC PGM=whatever
// ENDIF
//*
|
|
|
Back to top |
|
|
andycool
New User
Joined: 12 Apr 2005 Posts: 64
|
|
|
|
yeah...it worked ,
Thanks SuperK
Regards |
|
Back to top |
|
|
lokeshmaremalla
New User
Joined: 13 Sep 2006 Posts: 2
|
|
|
|
Hi,
In the below example how can i insert the regular expressions in 'your search string'.
Code: |
//SEARCH EXEC PGM=ISRSUPC,
// PARM=(SRCHCMP,
// '')
//NEWDD DD DSN=YOUR.DATASET1,
// DISP=SHR
// DD DSN=YOUR.DATASET2,
// DISP=SHR
//OUTDD DD SYSOUT=(*)
//SYSIN DD *
SRCHFOR 'your search string'
/* |
Thnaks in advance,
Lokesh |
|
Back to top |
|
|
guptae
Moderator
Joined: 14 Oct 2005 Posts: 1208 Location: Bangalore,India
|
|
|
|
Hi there,
U can also use fairscan for this. |
|
Back to top |
|
|
neelesht
New User
Joined: 24 Jul 2006 Posts: 99 Location: Los Angeles
|
|
|
|
Hi,
You can also use PDSMAN EZYedit to search a string in a PDS.
Enjoy,
Neelesh |
|
Back to top |
|
|
lokeshmaremalla
New User
Joined: 13 Sep 2006 Posts: 2
|
|
|
|
Hi,
Could any one please give me a program to find a string in PDS with regular expression.
Here is my regular expression to search a string.
"^abc" |
|
Back to top |
|
|
itjagadesh
New User
Joined: 05 Dec 2006 Posts: 89 Location: chennai
|
|
|
|
HI ALL,
IN MY CASE TSO OPTION K WAS NOT AVAILABLE?
how to replace a string in all the pds members |
|
Back to top |
|
|
Deepthy Jose P
New User
Joined: 07 Mar 2007 Posts: 40 Location: India
|
|
|
|
Can i have the above Jcl updated for the Complete search update option.
ie. searchfor 'string' replace by 'new string' ? |
|
Back to top |
|
|
Binaya
New User
Joined: 03 Jul 2007 Posts: 77 Location: Hyderabad
|
|
|
|
Another way to find a string in the members of PDS is:
in command line type:--> SRCHFOR "STRING NAME" |
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
Binaya,
Quote: |
in command line type:--> SRCHFOR "STRING NAME" |
isn't this command site-specific? the member/PDS name is not specified in the command. is that fine? |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Quote: |
in command line type:--> SRCHFOR "STRING NAME" |
This command is working for me as well..but it just says that in particular member of PDS "string" is present. But how many time in that member, which line is not displayed. If members are enough, then I think not a good information is visible after execution of this command. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
|
|
Quote: |
n command line type:--> SRCHFOR "STRING NAME" |
the command is not site specific ...
is ISPF release dependent specific ....
when posting command syntax and results it would be useful
( to avoid useless searches and network traffic )
to post a little bit of info on the environment
at least the ISPF/zOS level |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
enrico-sorichetti wrote: |
the command is not site specific ...
is ISPF release dependent specific .... |
Thanks for the information e-s. After your post, I tried searching about this & got this link on the same topic. |
|
Back to top |
|
|
Deepthy Jose P
New User
Joined: 07 Mar 2007 Posts: 40 Location: India
|
|
|
|
notonly4u wrote: |
Dear Vnit,
You can use file-aid option 3.6 to do the search.
It is much simple and faster too....
Hope iam right. If anything wrong please make a note.
Thanks, |
I need the Jcl for the File-aid option 3.6 to do the search -update. |
|
Back to top |
|
|
|