08-22-2017 10:20 AM
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: The connection was reset by a peer..
* no changes required below this line;
filename x url "https://www.google.com/maps/dir/&ll1/&ll2/?force=lite";
filename z temp;
infile x recfm=f lrecl=1 end=eof;
file z recfm=f lrecl=1;
input @1 x $char1.;
put @1 x $char1.;
infile z recfm=f lrecl=&filesize. eof=done;
input @ 'miles' +(-15) @ '"' distance :comma12. text $30.;
units = scan(text,1,'"');
time = scan(text,3,'"');
put "DRIVING DISTANCE BETWEEN &ll1 AND &ll2 : "
distance units" (TIME: " time ")";
put "CANNOT FIND THE DRIVING DISTANCE BETWEEN &ll1 AND &ll2 : " /
"TRY ANOTHER PAIR OF COORDINATES";
filename x clear;
filename z clear;
08-22-2017 10:58 AM
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.
08-23-2017 04:43 AM
Thanks for the Reponse.
I checked and the URL is valid.
I tried again and still the same Error.