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

How to replace '*' with * using sort


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

New User


Joined: 05 Sep 2008
Posts: 15
Location: Hyderabad

PostPosted: Wed Aug 13, 2014 3:52 pm
Reply with quote

Dear All,

I have an requirement to replace all the '*' (single quote*singlequote)in the input file with * using sort card.

Input file: A'*'BBBBB'*'CCCCC'*'DDDD'*''*'EEEE'*'

Output file: A*BBBBB*CCCCC*DDDD**EEEE*

I tried with INREC FINDREP=(IN=C''*'',OUT=C'*') but it is giving syntax error at IN=C''*''. Can you please help us with the syntax

Your quick response is highly appreciable
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Wed Aug 13, 2014 4:05 pm
Reply with quote

You need to have 3 quotes on each side: C'''*'''
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Wed Aug 13, 2014 4:06 pm
Reply with quote

To get a single quote in a character constant, you need to specify two single quotes. And, of course, a character constant has to be bounded by single quotes.

I could be explicit, but that wouldn't be quick enough for you.
Back to top
View user's profile Send private message
pavanchandana

New User


Joined: 05 Sep 2008
Posts: 15
Location: Hyderabad

PostPosted: Wed Aug 13, 2014 4:44 pm
Reply with quote

It worked. Thank you :-)
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 Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts JCL sort card - get first day and las... JCL & VSAM 9
Search our Forums:

Back to Top