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

Using Outrec how to display a string having quote


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
rammraju

New User


Joined: 05 Mar 2005
Posts: 65
Location: Hyderabad

PostPosted: Thu Feb 22, 2007 6:21 pm
Reply with quote

Hi,
Using Outrec I am trying to display a string which has a single quote in it. I am getting error, can some one please help me in this. Following is my code

Code:
OUTREC FIELDS=(15:C'XYZ'sBook',1,10,25X)


Actually I wan to display the string XYZ'sBook starting in column 15 and then a data after that.

Thanks in advance

With Regards,
Back to top
View user's profile Send private message
rammraju

New User


Joined: 05 Mar 2005
Posts: 65
Location: Hyderabad

PostPosted: Thu Feb 22, 2007 7:48 pm
Reply with quote

Got the answer to my question...

we have to use " if we have to print ' in the middle of a string. So my code would be

Code:
OUTREC FIELDS=(15:C'XYZ"sBook',1,10,25X)


Thanks,
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: Thu Feb 22, 2007 10:19 pm
Reply with quote

Right. Note that's an apostrophe ('), not a quote (") and you need to use two apostrophes within a literal to get one apostrophe.
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 Replace each space in cobol string wi... COBOL Programming 3
No new posts PARSE Syntax for not fix length word ... JCL & VSAM 7
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
No new posts file manager is doing string conversion IBM Tools 3
No new posts Search string in job at regular Spool... CLIST & REXX 0
Search our Forums:

Back to Top