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

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: 10275
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 Read two inputs and write into output... murali.andaluri DFSORT/ICETOOL 1 Wed Jul 26, 2017 7:35 pm
No new posts Can I traverse a STEM variable? chong.zhou CLIST & REXX 5 Wed May 31, 2017 3:54 pm
No new posts Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts VSAM Space Allocation mrgnndhmk JCL & VSAM 7 Sat Apr 22, 2017 12:42 am


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