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

Replacing numbers in a string


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
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
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Replacing 'YYMMDD' with date, varying... SYNCSORT 3
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts PARSE Syntax for not fix length word ... JCL & VSAM 7
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
Search our Forums:

Back to Top