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
 

 

Squeezing variable length spaces to a single space

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

New User


Joined: 17 Jun 2012
Posts: 20
Location: INDIA

PostPosted: Tue Aug 07, 2012 7:41 pm    Post subject: Squeezing variable length spaces to a single space
Reply with quote

Hi,

I need to remove additional spaces in a record. These recrds contains spaces and the number of spaces depends on the Field length

i have records in below format :-

CITY (21 length) <-20 SPACES-> STATE(3) <-1 SPACES> ZIP(10 digit)

for example
Quote:

AVENTURA <-20 SPACES-> FL 331802795
LAWRENCEVILLE <-20 SPACES-> GA 300443783
HALLANDALE BEACH <-20 SPACES-> FL 330097236


I want to get rid of those 20 spaces and replace a single space. the 20 spaces is always not the case.. it may change


like the output should be something like
Quote:

AVENTURA FL 331802795
LAWRENCEVILLE GA 300443783
HALLANDALE BEACH FL 30097236


Pls let me know if i can use squeeze option to remove spaces and replace with a single space.
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7307

PostPosted: Tue Aug 07, 2012 8:06 pm    Post subject: Reply to: Squeezing variable length spaces to a single space
Reply with quote

Like this one? Another question from today...
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10232
Location: italy

PostPosted: Tue Aug 07, 2012 8:25 pm    Post subject: Reply to: Squeezing variable length spaces to a single space
Reply with quote

since You can post You have also internet connection,
send a PM to Kolusu asking for help

or look at his email address using the IBM employee directory
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 Data replication from multiple Db2 ta... kishpra DB2 1 Mon Mar 27, 2017 9:58 pm
No new posts Splitting of single report to seperat... abdulrafi TSO/ISPF 3 Mon Mar 27, 2017 3:59 pm
No new posts Count the length of the record & ... sreekusr DFSORT/ICETOOL 4 Thu Mar 23, 2017 7:52 pm
No new posts Append data from two files into a sin... Praveen04 DFSORT/ICETOOL 5 Thu Mar 16, 2017 7:29 pm
No new posts IMS DB-How to update a record (a sing... Nic Clouston IMS DB/DC 9 Thu Mar 09, 2017 4:38 pm


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