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

Squeezing variable length spaces to a single space


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
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
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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Tue Aug 07, 2012 8:06 pm
Reply with quote

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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Tue Aug 07, 2012 8:25 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Store the data for fixed length COBOL Programming 1
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts PARSE Syntax for not fix length word ... JCL & VSAM 7
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top