Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How to search a string which is with in single quotes??

 
Post new topic   This topic is locked: you cannot edit posts or make replies.    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
View previous topic :: :: View next topic  
Author Message
yogi.47eie

New User


Joined: 16 Aug 2006
Posts: 28
Location: india

PostPosted: Mon Jul 28, 2008 7:06 pm    Post subject: How to search a string which is with in single quotes??
Reply with quote

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
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Mon Jul 28, 2008 7:16 pm    Post subject:
Reply with quote

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
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Tue Jul 29, 2008 1:01 am    Post subject:
Reply with quote

and by the way, SUPERC and 3.14 are the same...

O.
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Tue Jul 29, 2008 12:03 pm    Post subject: Reply to: How to search a string which is with in single quo
Reply with quote

Yogi,

Did you try the FIND command?

Code:
F ''string''
Back to top
View user's profile Send private message
yogi.47eie

New User


Joined: 16 Aug 2006
Posts: 28
Location: india

PostPosted: Tue Jul 29, 2008 5:50 pm    Post subject: Reply to: How to search a string which is with in single quo
Reply with quote

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
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Tue Jul 29, 2008 6:03 pm    Post subject:
Reply with quote

There is an example for your exact problem in the fine manual.

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

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Tue Jul 29, 2008 6:05 pm    Post subject:
Reply with quote

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
View user's profile Send private message
neerajpeddu

New User


Joined: 03 Feb 2006
Posts: 25
Location: Calgary, AB

PostPosted: Tue Jul 29, 2008 6:19 pm    Post subject: Reply to: How to search a string which is with in single quo
Reply with quote

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
View user's profile Send private message
neerajpeddu

New User


Joined: 03 Feb 2006
Posts: 25
Location: Calgary, AB

PostPosted: Tue Jul 29, 2008 6:22 pm    Post subject: Reply to: How to search a string which is with in single quo
Reply with quote

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
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1238
Location: Richfield, MN, USA

PostPosted: Tue Jul 29, 2008 8:40 pm    Post subject:
Reply with quote

Please use BBCode so it's easier to distinguish between single and double quotes and the spacing between them.
Back to top
View user's profile Send private message
yogi.47eie

New User


Joined: 16 Aug 2006
Posts: 28
Location: india

PostPosted: Wed Jul 30, 2008 12:31 am    Post subject: Reply to: How to search a string which is with in single quo
Reply with quote

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
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1238
Location: Richfield, MN, USA

PostPosted: Wed Jul 30, 2008 12:37 am    Post subject:
Reply with quote

Yogi,
Please use BBCode so it's easier to distinguish between single and double quotes and the spacing between them.
Back to top
View user's profile Send private message
yogi.47eie

New User


Joined: 16 Aug 2006
Posts: 28
Location: india

PostPosted: Wed Jul 30, 2008 12:55 am    Post subject: Reply to: How to search a string which is with in single quo
Reply with quote

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
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1238
Location: Richfield, MN, USA

PostPosted: Wed Jul 30, 2008 1:08 am    Post subject:
Reply with quote

Answered your private msg.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Wed Jul 30, 2008 11:41 am    Post subject:
Reply with quote

VB tags l

Using VB tags to make your post more easily readable
Back to top
View user's profile Send private message
Sulabh Agrawal

New User


Joined: 29 Sep 2016
Posts: 3
Location: India

PostPosted: Thu Oct 20, 2016 6:19 pm    Post subject: Reply to: How to search a string which is with in single quotes??
Reply with quote

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
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1738
Location: Bloomington, IL

PostPosted: Thu Oct 20, 2016 6:26 pm    Post subject:
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   This topic is locked: you cannot edit posts or make replies.    IBMMAINFRAMES.com Support Forums -> TSO/ISPF All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Two Selects in a single select query Rohit Umarjikar DB2 1 Fri Nov 04, 2016 8:46 pm
No new posts Single COPY CICS TS datasets and when... Kyle Carroll CICS 2 Tue Oct 11, 2016 9:47 pm
This topic is locked: you cannot edit posts or make replies. Checking wether a string starts from ... sundaram.naveen CLIST & REXX 9 Thu Oct 06, 2016 11:56 am
No new posts Random Password (in string format) ge... ezhavendhan COBOL Programming 10 Mon Aug 29, 2016 3:18 pm
No new posts How to insert a lengthy string havin... vidyaa DB2 7 Thu Aug 25, 2016 5:20 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us