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;

9 REPLIES 9
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?

 

SPalanimuthu
Calcite | Level 5

is there any solution for this error,

i am facing the same issue and looking for some solutions 

SASKiwi
PROC Star

@SPalanimuthu - If you search SAS Support for this error like I did you will get 110 hits. You will have to give a lot more details of what SAS processing you were doing when you got this error.

 

SASKiwi_0-1718137234579.png

 

SPalanimuthu
Calcite | Level 5
I am running this same code and getting the same error logs.

Options SSLCALISTLOC='/sas_dir/sas_PROD/SAS94M6/SASHome_Node/SASSecurityCertificateFramework/1.1/cacerts/trustedcerts.pem';

* enter two zip codes;
%let z1=11714;
%let z2=06905;

* no changes required below this line;
filename x url "https://www.google.com/maps/dir/&z1/&z2/?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 &z1 AND &z2 : "
distance comma6. +1 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;

/*PROC OPTIONS OPTION=SSLCALISTLOC DEFINE VALUE LOGNUMBERFORMAT;*/
/*RUN;*/


Log:

1 The SAS System 13:58 Tuesday, June 11, 2024

1 ;*';*";*/;quit;run;
2 OPTIONS PAGENO=MIN;
3 %LET _CLIENTTASKLABEL='Program';
4 %LET _CLIENTPROCESSFLOWNAME='Standalone Not In Project';
5 %LET _CLIENTPROJECTPATH='';
6 %LET _CLIENTPROJECTPATHHOST='';
7 %LET _CLIENTPROJECTNAME='';
8 %LET _SASPROGRAMFILE='';
9 %LET _SASPROGRAMFILEHOST='';
10
11 ODS _ALL_ CLOSE;
12 OPTIONS DEV=SVG;
13 GOPTIONS XPIXELS=0 YPIXELS=0;
14 %macro HTML5AccessibleGraphSupported;
15 %if %_SAS_VERCOMP_FV(9,4,4, 0,0,0) >= 0 %then ACCESSIBLE_GRAPH;
16 %mend;
17 FILENAME EGHTML TEMP;
18 ODS HTML5(ID=EGHTML) FILE=EGHTML
19 OPTIONS(BITMAP_MODE='INLINE')
20 %HTML5AccessibleGraphSupported
21 ENCODING='utf-8'
22 STYLE=HTMLBlue
23 NOGTITLE
24 NOGFOOTNOTE
25 GPATH=&sasworklocation
26 ;
NOTE: Writing HTML5(EGHTML) Body file: EGHTML
27
28 Options
28 ! SSLCALISTLOC='/sas_dir/sas_PROD/SAS94M6/SASHome_Node/SASSecurityCertificateFramework/1.1/cacerts/trustedcerts.pem';
29
30 * enter two zip codes;
31 %let z1=11714;
32 %let z2=06905;
33
34 * no changes required below this line;
35 filename x url https://www.google.com/maps/dir/&z1/&z2/?force=lite;
36 filename z temp;
37
38 data _null_;
39 infile x recfm=f lrecl=1 end=eof;
40 file z recfm=f lrecl=1;
41 input @1 x $char1.;
42 put @1 x $char1.;
43 if eof;
44 call symputx('filesize',_n_);
45 run;

ERROR: The connection was reset by a peer..
NOTE: The file Z is:
Filename=/sas_work/SAS_work0B9500000197_psan-la13.systems.emblemhealth.com/#LN00061,
Owner Name=v-spalanimuthu,
Group Name=sas_ux_users,
Access Permission=-rw-rw-r--,
Last Modified=11Jun2024:16:21:59

NOTE: 0 records were written to the file Z.
NOTE: The SAS System stopped processing this step because of errors.
2 The SAS System 13:58 Tuesday, June 11, 2024

NOTE: DATA statement used (Total process time):
real time 0.16 seconds
cpu time 0.03 seconds


46
47 data _null_;
48 infile z recfm=f lrecl=&filesize. eof=done;
_
24
WARNING: Apparent symbolic reference FILESIZE not resolved.
ERROR 24-2: Invalid value for the LRECL option.

49 input @ 'miles' +(-15) @ '"' distance :comma12. text $30.;
50 units = scan(text,1,'"');
51 time = scan(text,3,'"');
52 file print;
53 put "DRIVING DISTANCE BETWEEN &z1 AND &z2 : "
54 distance comma6. +1 units" (TIME: " time ")";
55 stop;
56 done:
57 file print;
58 put "CANNOT FIND THE DISTANCE OR TIME BETWEEN &z1 AND &z2, TRY ANOTHER COMBINATION";
59 run;

NOTE: The SAS System stopped processing this step because of errors.
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds


60
61 filename x clear;
NOTE: Fileref X has been deassigned.
62 filename z clear;
NOTE: Fileref Z has been deassigned.
63
64 /*PROC OPTIONS OPTION=SSLCALISTLOC DEFINE VALUE LOGNUMBERFORMAT;*/
65 /*RUN;*/
66
67
68 %LET _CLIENTTASKLABEL=;
69 %LET _CLIENTPROCESSFLOWNAME=;
70 %LET _CLIENTPROJECTPATH=;
71 %LET _CLIENTPROJECTPATHHOST=;
72 %LET _CLIENTPROJECTNAME=;
73 %LET _SASPROGRAMFILE=;
74 %LET _SASPROGRAMFILEHOST=;
75
76 ;*';*";*/;quit;run;
77 ODS _ALL_ CLOSE;
78
79
80 QUIT; RUN;
81

SASKiwi
PROC Star

I suggest you open a Tech Support track for this. They are in the best position to help with this type of problem.

Kurt_Bremser
Super User

When you use that URL in a browser, you get a full Google Maps page with multiple elements, but nothing in text form.

From where did you get that code, and why do you think it could work at all?

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 9 replies
  • 3494 views
  • 0 likes
  • 6 in conversation