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

How to replace '_' by '-'


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sudip_ghanvat

New User


Joined: 05 Apr 2007
Posts: 15
Location: pune

PostPosted: Fri Sep 19, 2008 12:00 am
Reply with quote

I have string 'BA_AUDIT_REPORT_WK'.
I need to replace underscore by '-'. Is it possible to do in REXX?

Thanks,
Sudip Ghanvat
Back to top
View user's profile Send private message
PeD

Active User


Joined: 26 Nov 2005
Posts: 459
Location: Belgium

PostPosted: Fri Sep 19, 2008 12:02 am
Reply with quote

Translate
Back to top
View user's profile Send private message
sudip_ghanvat

New User


Joined: 05 Apr 2007
Posts: 15
Location: pune

PostPosted: Fri Sep 19, 2008 12:02 am
Reply with quote

Hi

Could you please provide me detail SYNTAX for Translate command.

Thanks
Back to top
View user's profile Send private message
PeD

Active User


Joined: 26 Nov 2005
Posts: 459
Location: Belgium

PostPosted: Fri Sep 19, 2008 12:03 am
Reply with quote

Could you open the REXX reference manual.

There is an access to that from this forum.

Cheers

Pierre
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Fri Sep 19, 2008 12:06 am
Reply with quote

/* REXX */
str = 'BA_AUDIT_REPORT_WK'
Say str
str = Translate(str,'-','_')
Say str

TRANSLATE function.
Back to top
View user's profile Send private message
sudip_ghanvat

New User


Joined: 05 Apr 2007
Posts: 15
Location: pune

PostPosted: Fri Sep 19, 2008 12:11 am
Reply with quote

Thanks Kevin

Your solution work successfull.
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 -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
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 replace word 'MONTH' with current mon... SYNCSORT 11
No new posts To replace jobname in a file with ano... SYNCSORT 12
No new posts Conditional replace values in output ... DFSORT/ICETOOL 3
Search our Forums:

Back to Top