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
 

 

Replacing numbers in a string

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
deepaannjohn

New User


Joined: 23 Feb 2006
Posts: 19
Location: Bangalore

PostPosted: Thu Jun 08, 2006 10:23 am    Post subject: Replacing numbers in a string
Reply with quote

Hi,

I have a variable as below
Refn x(20)
It can have values as below
123 3456
xxx 1234
1234 1234 123

I want to replace all the numbers by some random number or hard coded value. The formatting should be retained as such.

Can somebody help please?
Back to top
View user's profile Send private message

IQofaGerbil

Active User


Joined: 05 May 2006
Posts: 183
Location: Scotland

PostPosted: Thu Jun 08, 2006 2:35 pm    Post subject: Re: Replacing numbers in a string
Reply with quote

Try

INSPECT REFn
CONVERTING
”0123456789 “TO
”##########“ (or whatever values you want to apply)
Back to top
View user's profile Send private message
deepaannjohn

New User


Joined: 23 Feb 2006
Posts: 19
Location: Bangalore

PostPosted: Wed Jun 21, 2006 11:13 am    Post subject:
Reply with quote

This did work. Thank You icon_biggrin.gif
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 -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts replacing junk with hyphen Nitin32 DFSORT/ICETOOL 10 Fri Jun 02, 2017 7:47 pm
No new posts Fileaid Update Replace with null string descann Compuware & Other Tools 4 Mon May 15, 2017 3:00 pm
No new posts Replacing same string with different ... vickey_dw DFSORT/ICETOOL 6 Wed Feb 22, 2017 10:44 pm
No new posts Count Trailing Spaces in variable str... Virendra Shambharkar SYNCSORT 10 Thu Feb 02, 2017 12:23 pm
No new posts Incorrect output when trying to add n... monica1 PL/I & Assembler 10 Fri Jan 13, 2017 5:02 pm


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