Hi. Interesting problem. I copied/pasted your code from this posting in my SAS interactive, and it didn't run. I went to the sasCommunity website, copied/pasted the code from there (which I know it's the same code you have) and it ran! I get this: DRIVING DISTANCE BETWEEN 12203 AND 20500 : 373 mi (TIME: 5 hours 54 mins ) When I ran your posted code I get this: CANNOT FIND THE DISTANCE OR TIME BETWEEN 12203 AND 20500, TRY ANOTHER COMBINATION The code that is working: * enter two zip codes; %let z1=12203; %let z2=20500; * no changes required below this line; filename x url "http://maps.google.com/maps?daddr=&z2.%nrstr(&saddr)=&z1"; filename z temp; data _null_; infile x recfm=f lrecl=1 end=eof; file z recfm=f lrecl=1; input @1 x $char1.; put @1 x $char1.; if eof; call symputx('filesize',_n_); run; data _null_; infile z recfm=f lrecl=&filesize. eof=done; input @ '<div class="altroute-rcol altroute-info"> <span>' @; input text $50.; distance = input(scan(text,1," "),comma12.); units = scan(text,2,"< "); time = scan(text,5,"<>"); file print; put "DRIVING DISTANCE BETWEEN &z1 AND &z2 : " distance units" (TIME: " time ")"; stop; done: file print; put "CANNOT FIND THE DISTANCE OR TIME BETWEEN &z1 AND &z2, TRY ANOTHER COMBINATION"; run; filename x clear; filename z clear; The code that is not working: * enter two zip codes; %let z1=12203; %let z2=20500; * no changes required below this line; filename x url "http://maps.google.com/maps?daddr=&z2.%nrstr(&saddr)=&z1"; filename z temp; data _null_; infile x recfm=f lrecl=1 end=eof; file z recfm=f lrecl=1; input @1 x $char1.; put @1 x $char1.; if eof; call symputx('filesize',_n_); run; data _null_; infile z recfm = f lrecl = &filesize. eof = done; input @ '<div class = "altroute-rcol altroute-info"> <span>' @; input text $50.; distance = input(scan(text, 1, " "), comma12.); units = scan(text,2,"< "); time = scan(text,5,"<>"); file print; put "DRIVING DISTANCE BETWEEN &z1 AND &z2 : " distance units" (TIME: " time ")"; stop; done: file print; put "CANNOT FIND THE DISTANCE OR TIME BETWEEN &z1 AND &z2, TRY ANOTHER COMBINATION"; run; filename x clear; filename z clear; What is the difference?????
... View more