View previous topic :: View next topic
|
Author |
Message |
tecnokrat Warnings : 1 Active User
Joined: 22 May 2009 Posts: 160 Location: Bangalore
|
|
|
|
Actually i want to search a string at a particular position of the members in the PDS. does the SRCHFOR command be given for search along with a condition
Code: |
INCLUDE COND(1,6,EQ,C'STRING') |
Does this suffice |
|
Back to top |
|
|
Kumar Saraboji
New User
Joined: 15 Sep 2009 Posts: 8 Location: India
|
|
|
|
Hi,
If I have understood your requirement, please find below for the answer to the first part of your query.
SRCHFOR 'STRING' 1:6
I didnt get your second part - condition?? |
|
Back to top |
|
|
Srihari Gonugunta
Active User
Joined: 14 Sep 2007 Posts: 295 Location: Singapore
|
|
|
|
You can try this.
Code: |
//SEARCH EXEC PGM=ISRSUPC,
// PARM=(SRCHCMP,
// '')
//NEWDD DD DSN=YOUR.PDS,DISP=SHR
//OUTDD DD SYSOUT=*
//SYSIN DD *
SRCHFOR 'STRING'
CMPCOLM 1:6
/* |
|
|
Back to top |
|
|
Srihari Gonugunta
Active User
Joined: 14 Sep 2007 Posts: 295 Location: Singapore
|
|
|
|
Code: |
SRCHFOR 'ABC',4:40 Finds string "ABC" if it starts in column 4 -> 40 |
If we use CMPCOLM,
Code: |
CMPCOLM, Compare Columns. Searches only the columns to be searched from each source line. |
|
|
Back to top |
|
|
tecnokrat Warnings : 1 Active User
Joined: 22 May 2009 Posts: 160 Location: Bangalore
|
|
Back to top |
|
|
tecnokrat Warnings : 1 Active User
Joined: 22 May 2009 Posts: 160 Location: Bangalore
|
|
|
|
If the SRCHFOR is to be run in a loop untill all the members in a PDS are done
Help me out in the looping ...can we go with the steps like STEP01
STEP02....?????????? |
|
Back to top |
|
|
Srihari Gonugunta
Active User
Joined: 14 Sep 2007 Posts: 295 Location: Singapore
|
|
|
|
Have you tried the above job? It will search all the members of the PDS. |
|
Back to top |
|
|
tecnokrat Warnings : 1 Active User
Joined: 22 May 2009 Posts: 160 Location: Bangalore
|
|
|
|
sorry i dint try it ok i will try it and let u know thanks in advance |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
tecnokrat wrote: |
sorry i dint try it ok i will try it and let u know thanks in advance |
Then DO NOT ask questions which would have been answered if you had bothered to have gotten off your butt and actually tested it |
|
Back to top |
|
|
tecnokrat Warnings : 1 Active User
Joined: 22 May 2009 Posts: 160 Location: Bangalore
|
|
|
|
Thanks srihari.
I got the required output.
My second condition is to individually take the count of the members for that particular string.
Code: |
SRCHFOR 'STRING1'
CMPCOLM 1:6
COUNT =COUNT + 1
|
and also i need to have an and query like
Code: |
SRCHFOR 'STRING1'
CMPCOLM 1:6
AND SRCHFOR 'STRING2'
CMPCOLM 1:6
will this be able to acheive my requirement ????? |
|
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
Take a look at the LMTO & XREF process options.
O. |
|
Back to top |
|
|
|