I am trying to geocode a large number of addresses at once using proc geocode. SAS sometimes gets hung up trying to geocode a single address that is overly general (made up example= 311 N.E. with a valid city, state and zip) and stops the entire geocoding proccess by producing the error below.
This makes it really difficult to geocode a lot of addresses at once because the geocoding program stops entirely. Is there a way to:
1) keep this error from happeining
Or
2) get sas to continue where it left off once it encounters the error
NOTE: The map data sets in library MAPSGFK are based on the digital maps from GfK GeoMarketing and are covered by their Copyright.
For additional information, see http://support.sas.com/mapsonline/gfklicense.
NOTE: Address data set had only 1 observations. Intermediate progress times not output.
ERROR: An exception has been encountered.
Please contact technical support and provide them with the following traceback information:
The SAS task name is [GEOCODE ]
Segmentation Violation
Traceback of the Exception:
2 The SAS System 10:11 Thursday, March 23, 2017
ERROR: An exception has been encountered.
Please contact technical support and provide them with the following traceback information:
The SAS task name is [GEOCODE ]
Segmentation Violation
Here is an example of my geocode program:
PROC GEOCODE
METHOD=STREET /* Geocoding method */
DATA=work.tmp_geocode1 /* Input address data */
OUT=GeoData.tmp_geocode_outputTEST1 /* Output data set */
lookupstreet=SASHELP.USM /*needs to point at USM dataset downloaded from SAS*/
attribute_var=(tract block);
RUN;
I have SAS 9.3.
When you get a segmentation violation (which is basically a memory-related access error and signals a bug), you should put this immediately to the attention of SAS technical support.
This might help, although it says it's for 9.4: http://support.sas.com/kb/48/454.html
Art, CEO, AnalystFinder.com
@TB2 wrote:
This makes it really difficult to geocode a lot of addresses at once because the geocoding program stops entirely. Is there a way to:
1) keep this error from happeining
Pre-validate your data (data check) that all of your addresses have required elements. And yes I know all too well that some folks address data is very messy.
Worked with open source R ggmap
311 N E, Washington, DC 20002
%utl_submit_r64('
source("c:/Program Files/R/R-3.3.2/etc/Rprofile.site",echo=T);
library("ggmap");
lonlat_sample <- as.numeric(geocode("311 N E, Washington, DC 20002"));
class(lonlat_sample);
lonlat_sample;
res <- revgeocode(lonlat_sample, output="more");
res$postal_code;
res$neighborhood;
');
[1] "numeric"
[1] -77.00153 38.89586
[1] 20002
Levels: 20002
[1] Northeast Washington
Levels: Northeast Washington
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.