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
 

 

Replace Non-Numeric to Zeros

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
AJAYREDDY

New User


Joined: 17 Feb 2007
Posts: 47
Location: USA

PostPosted: Tue Jan 25, 2011 11:43 pm    Post subject: Replace Non-Numeric to Zeros
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    Post subject:
Reply with quote

Ajayreddy,

Check this

http://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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm
No new posts Replace repeated JCL with looping REXX prino CLIST & REXX 3 Thu Oct 13, 2016 5:30 am
This topic is locked: you cannot edit posts or make replies. Sort card to replace text using cross... Susanta SYNCSORT 32 Tue Sep 13, 2016 4:17 pm
No new posts Replace function abdulrafi COBOL Programming 13 Mon Sep 12, 2016 10:12 am
No new posts Casting a Binary Number to Numeric in... Bob Steinkraus Java & MQSeries 6 Tue Aug 09, 2016 5:58 pm


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