Amadeus cookies policy - you'll see this message only once.

Amadeus use cookies on this website. They help us to know a little bit about you and how you use our website, which improves the browsing experience and marketing - both for you and for others. They are stored locally on your computer or mobile device. To accept cookies, continue browsing as normal. Or, go to the privacy policy for more information.

The COMPBL Function for Compressing Embedded Blanks

The COMPBL function will remove all leading and trailing blanks but will retain single embedded blanks, which is useful for name fields. Consider the following SAS Program:

data _null_;
  input @1 name $20.; 
  put name=;
Amadeus    Software


55   data _null_;
56     input @1 name $20.; 
57     name=compbl(name);
58     put name=; 
60   datalines;
name=Amadeus Software NOTE: DATA statement used (Total process time): real time 0.39 seconds cpu time 0.00 seconds 62 run;