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 insert a Apostrophe using OUTREC

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: How to insert a Apostrophe using OUTREC
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    Post subject:
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    Post subject:
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 Moderator


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

PostPosted: Fri Aug 17, 2007 8:39 pm    Post subject:
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    Post subject:
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    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 outrec field outside range Danielle.Filteau SYNCSORT 10 Sat Mar 04, 2017 2:37 am
No new posts SORT- outrec ram_vizag DFSORT/ICETOOL 10 Tue Sep 27, 2016 12:50 am
No new posts Insert Lines in JCL with Rexx after a... Willy Jensen CLIST & REXX 3 Tue Aug 30, 2016 4:18 pm
No new posts How to insert a lengthy string havin... vidyaa DB2 7 Thu Aug 25, 2016 5:20 pm
No new posts OUTREC FILELDS FAILS WITH ICE126A 2 ... balaji81_k DFSORT/ICETOOL 8 Sat Jul 02, 2016 1:22 am


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