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

How to add character symbbol single quotes in the output?


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
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
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: 1436
Location: Bangalore,India

PostPosted: Fri Jan 25, 2008 11:46 am
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: 1287
Location: Chennai, India

PostPosted: Fri Jan 25, 2008 11:46 am
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
Reply with quote

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

DFSORT Developer


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

PostPosted: Fri Jan 25, 2008 10:19 pm
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts TRIM everything from input, output co... DFSORT/ICETOOL 1
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
No new posts Joinkeys - 5 output files DFSORT/ICETOOL 7
No new posts How to append a PS file into multiple... JCL & VSAM 3
No new posts Help in extracting data between doubl... DFSORT/ICETOOL 5
Search our Forums:

Back to Top