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 Append data from two files into a sin... Praveen04 DFSORT/ICETOOL 5 Thu Mar 16, 2017 7:29 pm
No new posts Problem reading GTF trace output danik56 ABENDS & Debugging 7 Thu Mar 16, 2017 1:02 pm
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts IMS DB-How to update a record (a sing... Nic Clouston IMS DB/DC 9 Thu Mar 09, 2017 4:38 pm
No new posts How to get current date -1 and curren... murali.andaluri DFSORT/ICETOOL 3 Wed Mar 08, 2017 2:09 pm


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