MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

SEARCH a string having single quotes within search string

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
pvrajesh31
Beginner


Joined: 10 Aug 2004
Posts: 31
Topics: 11

PostPosted: Thu Dec 28, 2006 5:32 pm    Post subject: SEARCH a string having single quotes within search string Reply with quote

Hi,
I am trying search a string which is having quotes within string. i.e.
search string is SYS='P' .

When i tried to put search string double quotes it is showing error as below

Code:
                              Search-For Utility        Invalid imbedded quote
Command ===>                                                                   
                                                                   More:     +
Search String  . . "SYS='T'"                                                   
                                                                               
ISPF Library:                                                                 
   Project . . .                                                               
   Group . . . .          . . .          . . .          . . .                 
   Type  . . . .                                                               
   Member  . . .                 (Blank or pattern for member selection list, 
                                   "*" for all members)                       
Other Partitioned, Sequential or VSAM Data Set:                               
   Data Set Name . . . 'B.TEST.JCL'                                           
   Volume Serial . . .           (If not cataloged)                           
                                                                               
Listing Data Set . . . SRCHFOR.LIST                                           
Data Set Password  . .           (If Search-For data set password protected)   
                                                                               
Enter "/" to select option               Execution Mode        Output Mode     
   Specify additional search strings     1  1. Foreground      1  1. View     
   Mixed Mode                               2. Batch              2. Browse   
.  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .

can somebody help me out ?

Thanks in advance.

Rajesh
Code:

_________________
Rajesh
Back to top
View user's profile Send private message
Grant
Beginner


Joined: 02 Dec 2002
Posts: 45
Topics: 1
Location: Sydney, NSW, Australia

PostPosted: Thu Dec 28, 2006 6:41 pm    Post subject: Reply with quote

Try:

'SYS=''T'''
Back to top
View user's profile Send private message
Bill Dennis
Advanced


Joined: 03 Dec 2002
Posts: 579
Topics: 1
Location: Iowa, USA

PostPosted: Fri Dec 29, 2006 9:10 am    Post subject: Reply with quote

The string soes NOT need to be enclosed in quotes. You double the embedded quotes. Do this:

SYS=''T''
_________________
Regards,
Bill Dennis

Disclaimer: My comments on this foorum are my own and do not represent the opinions or suggestions of any other person or business entity.
Back to top
View user's profile Send private message
pvrajesh31
Beginner


Joined: 10 Aug 2004
Posts: 31
Topics: 11

PostPosted: Tue Jan 02, 2007 12:05 pm    Post subject: Reply with quote

Hi Grant,

'SYS=''T''' is not working. It does not give any error but it failed in producing the required results.
_________________
Rajesh
Back to top
View user's profile Send private message
pvrajesh31
Beginner


Joined: 10 Aug 2004
Posts: 31
Topics: 11

PostPosted: Tue Jan 02, 2007 12:14 pm    Post subject: Reply with quote

Hi Bill,
The string i need to search is having single quotes SYS='T'.

SYS="T" does not find SYS='T' but it finds SYS="T" occurrences.
_________________
Rajesh
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12382
Topics: 75
Location: San Jose

PostPosted: Tue Jan 02, 2007 12:19 pm    Post subject: Reply with quote

pvrajesh31,

try this

Code:

'SYS=''T'''


All of them are single quotes

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
pvrajesh31
Beginner


Joined: 10 Aug 2004
Posts: 31
Topics: 11

PostPosted: Tue Jan 02, 2007 12:25 pm    Post subject: Reply with quote

Hi Kolusu,
It works fine.

Thanks.
_________________
Rajesh
Back to top
View user's profile Send private message
Bill Dennis
Advanced


Joined: 03 Dec 2002
Posts: 579
Topics: 1
Location: Iowa, USA

PostPosted: Tue Jan 02, 2007 1:21 pm    Post subject: Reply with quote

pvrajesh31 wrote:

SYS="T" does not find SYS='T' but it finds SYS="T" occurrences.


You must use all single qoutes in my example, too. It works for me either with the entire string enclosed in single quotes (as kolusu shows) or not enclosed (my example).
_________________
Regards,
Bill Dennis

Disclaimer: My comments on this foorum are my own and do not represent the opinions or suggestions of any other person or business entity.
Back to top
View user's profile Send private message
pvrajesh31
Beginner


Joined: 10 Aug 2004
Posts: 31
Topics: 11

PostPosted: Tue Jan 02, 2007 2:49 pm    Post subject: Reply with quote

Hi Bill,
Sorry. I took your answer as T enclosed in two double quotes. That is why it didn't work.

I have one more question. I want to find all the words starting with letter 'J' (i.e. JXXXX) in all members of a PDS dataset . This can be done using PICTURE find command (i.e. F P'J@@@' ALL) for a single member in an ISPF editor. But my doubt is : can we use this command in 3.14 search utility on all members of a PDS dataset ? If yes, How ?

Waiting for your reply.
_________________
Rajesh
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group