BookmarkSubscribeRSS Feed
kumargupt
Calcite | Level 5

Hi,

I am getting following ERROR message while executing the below code in SAS Eguide 7.12 ; SASVersion:9.4 ; O.S : Linux64  .

Request anyof you to suggest how the below code can be executed ?

 

Error Message:

ERROR: The connection was reset by a peer..

 

Code:

%let ll1=%str(42.691560,-73.827840);

%let ll2=%str(35.805410,-78.797679);

 

* no changes required below this line;

 

filename x url "https://www.google.com/maps/dir/&ll1/&ll2/?force=lite";

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 @ 'miles' +(-15) @ '"' distance :comma12. text $30.;

units = scan(text,1,'"');

time = scan(text,3,'"');

file print;

put "DRIVING DISTANCE BETWEEN &ll1 AND &ll2 : "

distance units" (TIME: " time ")";

stop;

done:

file print;

put "CANNOT FIND THE DRIVING DISTANCE BETWEEN &ll1 AND &ll2 : " /

"TRY ANOTHER PAIR OF COORDINATES";

stop;

run;

 

filename x clear;

filename z clear;

4 REPLIES 4
ballardw
Super User

I've seen that error as a general browser error with nothing to do with SAS.

 

Since you are using a google URL as a data source that may be more of an internect connection/ status issue.

 

Since I get a "connection refused" I suspect it may be something on the URL.

kumargupt
Calcite | Level 5

Thanks for the Reponse.

 

I checked and the URL is valid.

URL:https://www.google.com/maps/dir/42.691560,-73.827840/35.805410,-78.797679/?force=lite

 

I tried again and still the same Error.

 

Thanks.

andreas_lds
Jade | Level 19

Did you check the url from sas server or from your computer?

kumargupt
Calcite | Level 5

I checked the URL using the browser (IE) in Local computer.

Donot know how to check using SAS server.

Could you please help?

 

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 4 replies
  • 2597 views
  • 0 likes
  • 3 in conversation