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

Replace Non-Numeric to Zeros


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

New User


Joined: 17 Feb 2007
Posts: 52
Location: USA

PostPosted: Tue Jan 25, 2011 11:43 pm
Reply with quote

I have a file with 404 FB length. At position 223 length 5 there are some non-numeric values. example spaces, G, T, A etc etc. I want to replace them with Zeros if they have any. Can we do this with IFTHEN and OVERLAY statements. How do we declare non-numeric value in IFTHEN clause?

Example: If input at position 223 has below values

Code:

12345
50G00
19673
70L00
00355
90G00
00 00
00L00


The output should be

Code:

12345
50000
19673
70000
00355
90000
00000
00000


Please note: The non-numeric can be anything Alphabetic/spaces.
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Tue Jan 25, 2011 11:50 pm
Reply with quote

Ajayreddy,

Check this

www.ibmmainframes.com/viewtopic.php?t=52127&highlight=findrep
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 Issues Converting From ZD to Signed N... DFSORT/ICETOOL 4
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
Search our Forums:

Back to Top