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

To Remove SPACE and HYPHEN


IBM Mainframe Forums -> HomeWorks & Requests
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Jerin Joseph

New User


Joined: 03 Aug 2009
Posts: 6
Location: bangalore

PostPosted: Tue Aug 11, 2009 2:58 pm
Reply with quote

I have one filed with max of 28 character length(Alphanumeric filed).In this at any place there may be one HYPHEN or SPACE will be present I need to remove this hyphen and space and to combine the data.How this cab be done..??

For Example: 123456-8910 like this i need to change this to 1234568910
123456<> 8910 like this need to chnage to 1234568910

<> indicating a presence of space.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8697
Location: Dubuque, Iowa, USA

PostPosted: Tue Aug 11, 2009 4:39 pm
Reply with quote

You could tell us which language you need to implement this in -- since the choice of language influences the method used.
Back to top
View user's profile Send private message
Jerin Joseph

New User


Joined: 03 Aug 2009
Posts: 6
Location: bangalore

PostPosted: Tue Aug 11, 2009 4:42 pm
Reply with quote

The language is COBOL
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8697
Location: Dubuque, Iowa, USA

PostPosted: Tue Aug 11, 2009 4:43 pm
Reply with quote

Use Reference Modification. If you don't know about it, use the manuals link at the top of the page to get to the COBOL Language Reference manual and read up on it. If you have specific questions about using it, please post again.
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1249
Location: Richfield, MN, USA

PostPosted: Tue Aug 11, 2009 7:56 pm
Reply with quote

To add to Robert's suggestion, using reference modification, define an output field and move the input field characters, skipping over the hyphens and spaces, one at a time to the output field.
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 -> HomeWorks & Requests

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
No new posts Remove leading zeroes SYNCSORT 4
No new posts Merge 2 lines based on Space from a S... DFSORT/ICETOOL 5
No new posts How to remove block of duplicates DFSORT/ICETOOL 8
Search our Forums:

Back to Top