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 Incorrect output when trying to add n... monica1 PL/I & Assembler 10 Fri Jan 13, 2017 5:02 pm
No new posts Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm
No new posts Two Selects in a single select query Rohit Umarjikar DB2 1 Fri Nov 04, 2016 8:46 pm
No new posts Syncsort - Hard coded Value in output PORYES SYNCSORT 1 Thu Nov 03, 2016 9:23 am
No new posts output data in CSV Format janmejay COBOL Programming 8 Sat Oct 15, 2016 2:20 pm


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