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: 7254

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: 10211
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 SQZ pipe delimited file with 1 column... Rick Silvers DFSORT/ICETOOL 2 Sun Nov 06, 2016 8:11 pm
No new posts Two Selects in a single select query Rohit Umarjikar DB2 1 Fri Nov 04, 2016 8:46 pm
No new posts Joinkeys operation when key1 and key2... Susanta DFSORT/ICETOOL 5 Wed Nov 02, 2016 5:35 pm
No new posts Single COPY CICS TS datasets and when... Kyle Carroll CICS 2 Tue Oct 11, 2016 9:47 pm
No new posts To trim spaces in a pipe delimited da... Nish84 COBOL Programming 16 Mon Oct 10, 2016 1:54 pm


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