Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 Split 1 file into 10 output Files - S... Prasanth Kumar SYNCSORT 5 Sat Sep 16, 2017 12:02 am
No new posts More than 1 Include criteria for sing... Roy Ware SYNCSORT 6 Wed Sep 13, 2017 11:45 pm
No new posts BUILD OUTFIL based on condition other... balaji81_k DFSORT/ICETOOL 13 Fri Sep 08, 2017 11:06 pm
No new posts Hardcoded negative sign value in output scdinesh SYNCSORT 8 Fri Sep 08, 2017 5:28 am
No new posts SORT Trailer Count - LRECL Output co... amorante DFSORT/ICETOOL 5 Tue Aug 29, 2017 8:57 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us