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: 206
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: 2501
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: 1205
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

Senior Member


Joined: 07 Feb 2009
Posts: 1315
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: 3076
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: 8700
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 for a member but don't know... TSO/ISPF 6
No new posts SRCHFOR ‘string’ command inside P... TSO/ISPF 14
No new posts SRCHFOR with LMDLIST or LMMLIST TSO/ISPF 7
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
Search our Forums:

Back to Top