View previous topic :: View next topic
|
Author |
Message |
yogi.47eie
New User
Joined: 16 Aug 2006 Posts: 45 Location: india
|
|
|
|
Hi all,
I am trying to serach a string which is with in single quotes..
using SRCHFOR i couln't find ?
In 3.14 also not able to do...
string that i need to find is like 'yogi' - note that yogi is with in single quote.....
since i am not that much familiar with Rexx i couln't write any routine ..
can any one of you share the solution for me??
Thanks
Yogi |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
There are general rules for searching or dealing with quoted strings.
What have you tried to do so far and what results did you get |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
and by the way, SUPERC and 3.14 are the same...
O. |
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
Yogi,
Did you try the FIND command?
|
|
Back to top |
|
|
yogi.47eie
New User
Joined: 16 Aug 2006 Posts: 45 Location: india
|
|
|
|
Hi all,
I am going to search the string not with in a single member.It is with in a PDS which is having more than 200 members.
I have tried the srchfor with below options
SRCHFOR ''YOGI'' - error was Null string invalid
SRCHFOR "'YOGI'" - error was Invalid embedded quote
SRCHFOR '"YOGI'" - error was Invalid search-string
we cannot give F ''YOGI'' when we are searching with in a PDS.If its a signle member we can give.
Thanks
Yogi |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
There is an example for your exact problem in the fine manual.
O. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
1) What about sorting for a non quoted string. i.e. Find all occurances and eye scan to deleted non quoted strings.
2) Keep going using 3.14 / SUPERC, keep adding those single quotes to back and front of the search string, and you WILL get there. |
|
Back to top |
|
|
neerajpeddu
New User
Joined: 03 Feb 2006 Posts: 25 Location: Calgary, AB
|
|
|
|
I kind of agree with expat solution.
You can search on the string YOGI using 3.14, then after getting the results, issue the following command.
x all;f all "'YOGI'"
then issue the following command placing the cursor on the bottom most result you found. This will give you the member names.
f p'>' 3 prev
then issue the following command
delete all x
You should have the result you need now.
remember that you should be having the option to view the results instead of browse to issue the above commands. |
|
Back to top |
|
|
neerajpeddu
New User
Joined: 03 Feb 2006 Posts: 25 Location: Calgary, AB
|
|
|
|
Sorry. I should have been more clear. For the 3rd statement, you should continue to do the same placing the cursor on each line you found the result "'YOGI'". Doing it once will give you the last member name only where the string was found. |
|
Back to top |
|
|
Terry Heinze
JCL Moderator
Joined: 14 Jul 2008 Posts: 1249 Location: Richfield, MN, USA
|
|
|
|
Please use BBCode so it's easier to distinguish between single and double quotes and the spacing between them. |
|
Back to top |
|
|
yogi.47eie
New User
Joined: 16 Aug 2006 Posts: 45 Location: india
|
|
|
|
Hi all,
Thanks for the response
Ofer71 ,,,
i have referred the manual that you referred
Example Search strings: Explanation:
===> 'AB C''D' The string (AB C'D) is specified.
from where i got an rough idea of searching a string which is having a single quote
(not with in single quote,but the string which is having a single quote)
Here D is preceded by a single quote & srchfor has given with D preceded by one single quote
i couldnt get the logic behind the way srchfor is issued,
but this reference gave me an idea of searching a string in different manner but with
out any logic..
Yes i gave a search as below
SRCHFOR '''YOGI'
ITS GIVING THE RESULTANT MEMBERS AS I EXPECTED.
i couldn't get the exact logic behind this one...
but still i have tried randomly the string which i am searching for is having the two single quotes
the concerned string was with in two single quotes & i gave a search preceded by the two single quotes
it gave me the result as i expected..
better if we give srchfor the below string also with different manner & update this forum it will be useful
currently i coulnt do that one from here....
will try all the options and update this forum...
if anyone is able to find any other logic behind this kind of search let us know the same...
XPAT,
thanks to XPAT ALSO who gave me an idea to give random search with single quotes preceded by &
followed by the string...
i will try the sort step to find the string which also making sense to me...
Neeraja,
x all;f all "'YOGI'"
for me when i gave the search its giving around 50 members & for each member issuing the command
which is some more painful.if we have less than 10 members then we can use as per the steps you have suggested..
we can use this one after opening a single memebr of PDS od single PS files.
Request everyone to try the same & make sure this is not system specific & it can be used in any system..
Hendry
i am not that much clear with whatever you have stated.. can you share your views also....
Thanks
Yogi |
|
Back to top |
|
|
Terry Heinze
JCL Moderator
Joined: 14 Jul 2008 Posts: 1249 Location: Richfield, MN, USA
|
|
|
|
Yogi,
Please use BBCode so it's easier to distinguish between single and double quotes and the spacing between them. |
|
Back to top |
|
|
yogi.47eie
New User
Joined: 16 Aug 2006 Posts: 45 Location: india
|
|
|
|
Hi Terry,
i have mis spelled your name .... sorry for that,
as i requested can you please elaporate the same a little bit...
i never dealt with BBcode.. what exactly it does & usage..
Regards
Yogi |
|
Back to top |
|
|
Terry Heinze
JCL Moderator
Joined: 14 Jul 2008 Posts: 1249 Location: Richfield, MN, USA
|
|
|
|
Answered your private msg. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
Back to top |
|
|
Sulabh Agrawal
New User
Joined: 29 Sep 2016 Posts: 4 Location: India
|
|
|
|
Use SEARCHFOR '''YOGI'''.
Two single quotes to resolve One Single quote in your PDS and one for your search string. So by giving total three single quotes you can search. |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
Why do you think (if the word can be used in this context) that Yogi has not solved the problem in eight years? |
|
Back to top |
|
|
|