IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Need help on searching '82 in SRCHFOR


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
rohanthengal

Active User


Joined: 19 Mar 2009
Posts: 204
Location: Globe, India

PostPosted: Thu Aug 27, 2015 4:56 pm
Reply with quote

Hi Friends,

Any way to search string
Code:
'82
in one library.
If we use SRCHFOR
Code:
 "'82"
then it gives error.

Can anyone please guide to search string '82 in PDS ?
I am getting error since closing single quote is not provided in SRCHFOR. I do not want to provide closing single quote since search criteria is limited to '82.
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2504
Location: Atlanta, Georgia, USA

PostPosted: Thu Aug 27, 2015 5:36 pm
Reply with quote

Try using hex-notation instead -

SRCHFOR X'7DF8F2'

HTH....
Back to top
View user's profile Send private message
Garry Carroll

Senior Member


Joined: 08 May 2006
Posts: 1100
Location: Dublin, Ireland

PostPosted: Thu Aug 27, 2015 6:00 pm
Reply with quote

A quick google found...


Code:
srchfor '''82'


.. and it works !

Garry.
Back to top
View user's profile Send private message
prino
Warnings : 1

Senior Member


Joined: 07 Feb 2009
Posts: 1244
Location: Vilnius, Lithuania

PostPosted: Thu Aug 27, 2015 9:29 pm
Reply with quote

Garry Carroll wrote:
A quick google found...


Code:
srchfor '''82'


.. and it works !

Gee, what a surprise... Why couldn't the TS think of something this complicated...
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 2590
Location: NYC,USA

PostPosted: Fri Aug 28, 2015 2:23 am
Reply with quote

It seems to me a bug unless Garry's method is documented somewhere on IBM's manual. icon_razz.gif
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8569
Location: Dubuque, Iowa, USA

PostPosted: Fri Aug 28, 2015 3:32 am
Reply with quote

Within TSO and many other parts of z/OS, two single quote marks (tics) in a string are replaced by one. This can be seen in the JCL Reference manual in section 4.2 (emphasis added by me):
Quote:
Special Characters in Parameters

The syntax or parameter description indicates if the variable that you code can contain special characters or not. Parameters and subparameters that can contain special characters not used for syntactical functions usually must be enclosed in apostrophes, for example, ACCT='123+456'. Code each apostrophe that is part of the parameter or subparameter as two consecutive apostrophes, for example, code O'NEIL as 'O''NEIL'.
Back to top
View user's profile Send private message
Mickeydusaor

Active User


Joined: 24 May 2006
Posts: 258
Location: Salem, Oregon

PostPosted: Fri Aug 28, 2015 8:02 pm
Reply with quote

A bug that cracks me up, its been this way for 50 years, look at a good assembler or rexx manual.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts Searching a table for the field name? COBOL Programming 8
No new posts ISRSUPC SRCHFOR tool - Query while us... JCL & VSAM 7
This topic is locked: you cannot edit posts or make replies. MEMOAPIX - Searching for a Reference ... All Other Mainframe Topics 13
No new posts SRCHFOR a text in a set of files DFSORT/ICETOOL 7
No new posts SRCHFOR within SDSF list TSO/ISPF 10
Search our Forums:

Back to Top