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
 

 

To Remove SPACE and HYPHEN

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> HomeWorks & Requests
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    Post subject: To Remove SPACE and HYPHEN
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: 7936
Location: Bellevue, IA

PostPosted: Tue Aug 11, 2009 4:39 pm    Post subject:
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    Post subject:
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: 7936
Location: Bellevue, IA

PostPosted: Tue Aug 11, 2009 4:43 pm    Post subject:
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: 1239
Location: Richfield, MN, USA

PostPosted: Tue Aug 11, 2009 7:56 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> HomeWorks & Requests All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Remove Special Characters from Mainfr... Rodger Zhang All Other Mainframe Topics 6 Wed Jul 06, 2016 1:12 am
No new posts Difference space showed for TS and it... autobox DB2 1 Thu Apr 14, 2016 1:07 pm
No new posts Remove header only knobi SYNCSORT 5 Mon Feb 15, 2016 10:42 pm
No new posts How to find Table-space and Index-spa... venksiv DB2 5 Wed Feb 03, 2016 6:16 pm
No new posts Append to file, but also remove old r... Garry Carroll JCL & VSAM 3 Mon Jan 25, 2016 8:05 pm


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