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

How to insert a Apostrophe using OUTREC


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

New User


Joined: 27 Apr 2007
Posts: 20
Location: Chennai

PostPosted: Fri Aug 17, 2007 5:14 pm
Reply with quote

How to insert a Apostophe using OUTREC.

I want to insert a string in a File in certain position.
I want to insert a string namely "sam's". This particular string has a apostophe in it. Normally if I try like this

OUTREC FIELDS=(1:C'SAM'S',
....
.....


It would throw a error since it encountered a apostophe already.

So, how to insert using OUTREC?
Back to top
View user's profile Send private message
saiprasadh

Active User


Joined: 20 Sep 2006
Posts: 154
Location: US

PostPosted: Fri Aug 17, 2007 5:35 pm
Reply with quote

Hi Swami

Use the below Sort Card

Code:
OUTREC FIELDS=(1:C'SAI',4:C'''S',.....)

Thanks
Sai
Back to top
View user's profile Send private message
Swami-gs

New User


Joined: 27 Apr 2007
Posts: 20
Location: Chennai

PostPosted: Fri Aug 17, 2007 6:18 pm
Reply with quote

Hi Sai

Thanks for your info.

it works fine.
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 Aug 17, 2007 8:39 pm
Reply with quote

Quote:
it works fine.


Well, yes, but Sai's solution is more complicated than it needs to be. You just need to use two apostrophes for each one apostrophe. So it would just be:

Code:

    OUTREC FIELDS=(1:C'SAM''S',...)
Back to top
View user's profile Send private message
Swami-gs

New User


Joined: 27 Apr 2007
Posts: 20
Location: Chennai

PostPosted: Thu Aug 23, 2007 8:44 pm
Reply with quote

Thanks Frank,

Finally after a long trial and error method on what Sai said. I finally got the idea which you told now. Anyway thanks !!!
Back to top
View user's profile Send private message
View previous topic : : View next topic  
Post new topic   Reply to topic All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Simplify SORT CARD to combine INREC a... DFSORT/ICETOOL 6
No new posts Sort to insert record in an empty file. DFSORT/ICETOOL 5
No new posts Insert header record with record coun... DFSORT/ICETOOL 14
No new posts Insert system time/date (timestamp) u... DFSORT/ICETOOL 5
No new posts Identify Program Insert DB2 7
Search our Forums:


Back to Top