BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Linlin
Lapis Lazuli | Level 10

When are you going to move back?

art297
Opal | Level 21

Unknown.  Always possible as I've maintained my US Citizenship, am fully vested in Social Security, and am not wanted by the police.

Haikuo
Onyx | Level 15

Art, are you sure about the part of "not wanted"?

just messing with you :smileysilly:. Since you are the "President", and we happen to need a new one by 2016, so please do come back. This country is so desperately in need of a leader who  knows Arithmetic (yes I now you are way overqualified) and some Psychology (might help to reach across the aisle).

And Happy Veterans Day!

Haikuo

TomKari
Onyx | Level 15

Yeah, Art!

Our fifth column is already preparing the ground for you...

http://www.youtube.com/watch?v=BrhA0sEkuaM

art297
Opal | Level 21

: Nice!  I hadn't seen that before.  Your link didn't show the video, but here is one that does:

The Canada Party - "Meet The Canada Party" - YouTube

Haikuo
Onyx | Level 15

I think I figure it out, the leading/trailing blanks have to be grouped out:

data have;

infile cards truncover;

input add $char100.;

cards;

   12345 1/2 START ST APT C

111 DRUMMER LN APT1

2222  N. N CIRCULAR RD #2

  2255 N N ALLNIGHT RD # 3

333 W   W. MACRODRIVEN DR UNIT4

  44444 1/4 DROPLIGHT AVE STE 5 STE 5

5555 STANDARDFREQ BLVD 57

;

data want;

   set have;

   retain _r;

    _r=prxparse("/ +((st)|(ln)|(rd)|(dr)|(ave)|(cir)|(blvd)) +/i");

   _t1=prxchange("s/ +\d\/\d +/ /", -1, add);

    _t2=prxchange("s/(( +e|w|s|n)( +|\. +)){2}/\1/i", -1, _t1);

    call prxsubstr(_r,_t2,_start,_len);

    address=compbl(compress(left(substr(_t2,1,_start+_len-1)),'.'));

  drop _:;

  run;

  proc print;run;

Thanks, Art.

Haikuo

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 20 replies
  • 1848 views
  • 6 likes
  • 5 in conversation