|
View previous topic :: View next topic
|
| Author |
Message |
Swami-gs
New User
Joined: 27 Apr 2007 Posts: 20 Location: Chennai
|
|
|
|
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 |
|
 |
saiprasadh
Active User
Joined: 20 Sep 2006 Posts: 154 Location: US
|
|
|
|
Hi Swami
Use the below Sort Card
| Code: |
| OUTREC FIELDS=(1:C'SAI',4:C'''S',.....) |
Thanks
Sai |
|
| Back to top |
|
 |
Swami-gs
New User
Joined: 27 Apr 2007 Posts: 20 Location: Chennai
|
|
|
|
Hi Sai
Thanks for your info.
it works fine. |
|
| Back to top |
|
 |
Frank Yaeger
DFSORT Developer

Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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 |
|
 |
Swami-gs
New User
Joined: 27 Apr 2007 Posts: 20 Location: Chennai
|
|
|
|
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 |
|
 |
|
|