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 add character symbbol single quotes in the output?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
kennedy_zhu

New User


Joined: 30 Nov 2007
Posts: 27
Location: China

PostPosted: Fri Jan 25, 2008 11:29 am    Post subject: How to add character symbbol single quotes in the output?
Reply with quote

Hi, I don't know how to add a single quotes -> ' in outpout file.

my src like that ->

Code:

//SYSIN     DD *                       
  SORT FIELDS=COPY                     
  OUTREC FIELDS=(C'SRCHFOR  ',C' '',1,8)
/*     


I got a syntax errro, could anybody tell me what's the correct sentence?

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

murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1439
Location: Bangalore,India

PostPosted: Fri Jan 25, 2008 11:46 am    Post subject:
Reply with quote

Kennedy,

Code:
OUTREC FIELDS=(C'SRCHFOR ',C' ''',1,8)

Note: All are single quotes in the above outrec statement.
Back to top
View user's profile Send private message
Aaru

Senior Member


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

PostPosted: Fri Jan 25, 2008 11:46 am    Post subject: Reply to: How to add character symbbol single quotes in the
Reply with quote

Kennedy,

Quote:
I don't know how to add a single quotes -> ' in outpout file.


You need to code two apostrophes to display one apostrophe, e.g. C'''' to get '.
Back to top
View user's profile Send private message
kennedy_zhu

New User


Joined: 30 Nov 2007
Posts: 27
Location: China

PostPosted: Fri Jan 25, 2008 12:35 pm    Post subject:
Reply with quote

It works. Thank you very much! : P
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Fri Jan 25, 2008 10:19 pm    Post subject:
Reply with quote

Note that you don't need two constants (C) here. You can do the same thing with one:

Code:

  OUTREC FIELDS=(C'SRCHFOR  ''',1,8)


If you find the double apostrophes for one apostrophe confusing, you can use X'7D' instead.

Code:

  OUTREC FIELDS=(C'SRCHFOR  ',X'7D',1,8) 
Back to top
View user's profile Send private message
kennedy_zhu

New User


Joined: 30 Nov 2007
Posts: 27
Location: China

PostPosted: Mon Jan 28, 2008 7:48 am    Post subject:
Reply with quote

That's cool, Frank. Thx!
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Translating Quotes Khadhar Basha CLIST & REXX 6 Tue May 09, 2017 11:52 am
No new posts find RACF group for access to spooled... jzhardy JCL & VSAM 1 Mon May 08, 2017 11:46 am
This topic is locked: you cannot edit posts or make replies. SDSF multiple spool datasets extracte... PJAlarcon CLIST & REXX 1 Fri Apr 21, 2017 10:50 pm
No new posts Strings with double quotes having pro... raja Arumugam All Other Mainframe Topics 11 Thu Mar 30, 2017 10:34 am
No new posts Data replication from multiple Db2 ta... kishpra DB2 9 Mon Mar 27, 2017 9:58 pm


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