Desktop productivity for business analysts and programmers

SAS PROC GEOCODE ISSUE

Reply
Occasional Contributor
Posts: 8

SAS PROC GEOCODE ISSUE

Running this code. It used to work but not anymore. Any suggestion would be great.

 

proc geocode
data = work.test
out = work.geocoded
method = street
lookupstreet = USM.USM;
run;
QUIT;

 

Error message:

NOTE: Address data set had only 10 observations. Intermediate progress times not output.
ERROR: Invalid Operation.
ERROR: Termination due to Floating Point Exception
NOTE: The SAS System stopped processing this step because of errors.
NOTE: There were 1 observations read from the data set WORK.TEST.
WARNING: The data set WORK.GEOCODED may be incomplete. When this step was stopped there were 0 observations and 20 variables.
NOT

PROC Star
Posts: 1,146

Re: SAS PROC GEOCODE ISSUE

I haven't used PROC GEOCODE, but when I see messages like that in SAS I tend to think it's not something that the user did.

 

I would suggest you throw it over the wall to Tech Support. They have the right tools to diagnose things like this.

 

Just one thought...did you change processor architecture on the underlying computer between when it worked and when it didn't?

 

Tom

SAS Employee
Posts: 23

Re: SAS PROC GEOCODE ISSUE

Strange that this code used to work but suddenly began crashing. Can you please:

  1. Submit '%put &sysvlong;' to get the SAS version.
  2. Submit '%put &syshostinfolong;' to output the operating system.
  3. Add 'debug=4' to your proc geocode syntax and resubmit. This will enable the program tracing code which will provide an idea of where it crashed..

Also, submit the code below using the sample lookup data in the SASHELP library. It should get one street level match and one ZIP code match. If it runs, then the problem may be related to the lookup data in your USM library. But even if that is the case, proc geocode should end gracefully and not crash:

 

data test;
  length address $64 city $24 state $2;
  infile datalines dlm=',';
  input address city state zip;
cards;
500 SAS Campus Dr, Cary, NC, 27513
11500 Red Rock Canyon Dr, Katy, TX, 77450
;

proc geocode debug=4
data = work.test
out = work.geocoded
method = street
lookupstreet = /*USM.USM*/ sashelp.geoexm;
run;
QUIT;

 

Please post the results of the code submittals above. Thanks.

 

Occasional Contributor
Posts: 8

Re: SAS PROC GEOCODE ISSUE

Thank you.

I ran the code against sashelp library and it ran well.

I followed your suggestion for my test case and here is an error

 

%put &sysvlong;
9.04.01M3P062415
25 %put &syshostinfolong;
X64_7PRO WIN 6.1.7601 Service Pack 1 Workstation
26 proc geocode DEBUG=4
27 data = work.TEST
28 out = WORK.GEOCODED
29 method = street
30 lookupstreet = USM.USM
31 ;
32 run;

DEBUG option parsed
DEBUG level: DEBUG=4
Input parameter parsing complete
Create scatter read destinations for address data set vars
Create scatter read destinations for M data set vars
Create scatter read destinations for S data set vars
Create scatter read destinations for P data set vars
Create scatter read destinations for T data set vars
Create scatter read destinations for D data set vars
Create scatter read destinations for city lookup data set vars
Create scatter read destinations for state/province name/abbreviation data set vars
Create scatter read destinations for lookup data set vars
Create scatter write destinations for output data set vars
Call address matching function doGeocoding()
Address data set: gcb->nobs = 1
NOTE: Address data set had only 1 observations. Intermediate progress times not output.
Get var names and name lengths for WHERE clause buffer
Street matching enabled
ZIP code matching enabled
City+state matching enabled

2 The SAS System 11:14 Tuesday, August 9, 2016

Address obs: 1
ADDRESS: 2042 MOMANY ST
DDS WHERE (prefix): MOMANY
TDS WHERE (prefix): MOMANY
DDS WHERE (suffix): ST
TDS WHERE (suffix): NAME='ST'
ERROR: Invalid Operation.
ERROR: Termination due to Floating Point Exception
NOTE: The SAS System stopped processing this step because of errors.
NOTE: There were 1 observations read from the data set WORK.TEST.
WARNING: The data set WORK.GEOCODED may be incomplete. When this step was stopped there were 0 observations and 20 variables.
WARNING: Data set WORK.GEOCODED was not replaced because this step was stopped.
NOTE: PROCEDURE GEOCODE used (Total process time):
real time 0.01 seconds
cpu time 0.03 seconds

33
34 GOPTIONS NOACCESSIBLE;
35 %LET _CLIENTTASKLABEL=;
36 %LET _CLIENTPROCESSFLOWNAME=;
37 %LET _CLIENTPROJECTPATH=;
38 %LET _CLIENTPROJECTNAME=;
39 %LET _SASPROGRAMFILE=;
40
41 ;*';*";*/;quit;run;
42 ODS _ALL_ CLOSE;
43
44
45 QUIT; RUN;
46

SAS Employee
Posts: 23

Re: SAS PROC GEOCODE ISSUE

So you geocoded the sample addresses in Cary and Katy with no crash while using the sashelp.geoexm lookup data. But your address data crashes using your USM.USM lookup data.

 

Your debug trace shows your address being geocoded is 2042 MOMANY ST. I searched the USM 2015 lookup data set for MOMANY streets and found two in the US:

  • Oregon, OH 43616
  • Saint Joseph, MI 49085

I am not sure which state your address is in, so I geocoded MOMANY ST in both states using the same version of SAS as you and also on a 64 bit Windows platform with service pack 1. I used the USM lookup data generated from the 2015 TIGER files. I also geocoded the MOMANY ST addresses on another 64 bit Windows server also running 9.4M3 SAS. I am unable to duplicate the crash on either machine.

 

Please submit this code to provide details on your WORK.TEST and USM.USM data sets:

 

ods pdf file='c:\temp\contents2.pdf';
title 'Address Data Set';
proc contents data=work.test; run;
proc print data=work.test; run;
title 'USM Data Set';
proc contents data=usm.usm; run;
data USMheader;
  set usm.usm (firstobs=1 obs=5);
run;
title 'USM Header Obs';
proc print data=header; run;
ods pdf close;

I ran that on my PC and my output file is attached as contents1.pdf. Please upload your output file which will be c:\temp\contents2.pdf. I am wondering if there are differences in your copy of USM.

Occasional Contributor
Posts: 8

Re: SAS PROC GEOCODE ISSUE

Thank you so much for your help.

 

Super User
Posts: 11,123

Re: SAS PROC GEOCODE ISSUE

[ Edited ]

Did the SAS version get updated?

Or change from BASE to Enterprise guide or some form of SAS Studio?

 

I believe Proc Geocode is part of SAS/Graph. If you no longer have SAS/Graph the procedure may not be available.

Ask a Question
Discussion stats
  • 6 replies
  • 615 views
  • 0 likes
  • 4 in conversation