DATA Step, Macro, Functions and more

Proc Geocode issues with non-existent group variable

Reply
New Contributor sp3
New Contributor
Posts: 2

Proc Geocode issues with non-existent group variable

Hi,

 

SAS 9.4 TS Level 1M1

X64_7PRO platform

 

I am having some issues with Proc Geocode. I have followed all of the directions for downloading the correct data from SAS Maps Online - since I need data for Alberta Canada, I have downloaded the latest shape files from GeoBase National Road Network (NRN) files and created the required sas files using the Geobase2Geobase.sas macro.  Everything installed fine.

 

After preparing the data input file in the correct format and importing into SAS, I ran the procedure and it crashed on me while making reference to a missing group variable. I am uncertain why this error occurred since I have no variable named group in the data input file and there are none in any data sets that I can see. Any advice would be appreciated.

 

Here is the code:

 

proc geocode
method = street /* Street method */
data = geocode.fas_mif_location_ab /* Address data to geocode */
out = geocode.geo_fas_mif_location_ab /* Geocoded output data set */
lookupstreet = geocdeab.alberta_m /* Street lookup data set */
direct = geocdeab.gcdirect_can /* English/French directions */
type = geocdeab.gctype_can /* Canadian street types */
addressvar = address /* street address */
addresscountryvar = country /* Input data set country name var */
addressstatevar = province /* Input data set state name var */
addresscityvar = city /* Input data set city name var */
nozip; /* Disable ZIP method */
run;

 

Here is the error message:

 

NOTE: Lookup data set MAPSGFK.WORLD_CITIES used for worldwide geocoding.
ERROR: Variable GROUP not found in GEOCDEAB.GCTYPE_CAN data set.
NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set GEOCODE.GEO_FAS_MIF_LOCATION_AB may be incomplete. When this step was
stopped there were 0 observations and 0 variables.
WARNING: Data set GEOCODE.GEO_FAS_MIF_LOCATION_AB was not replaced because this step was stopped.
NOTE: PROCEDURE GEOCODE used (Total process time):
real time 0.43 seconds
cpu time 0.03 seconds

 

Thanks

Trusted Advisor
Posts: 1,554

Re: Proc Geocode issues with non-existent group variable

You wrote "...created the required sas files using the Geobase2Geobase.sas macro.";

I guess, the problem is somwhere in the macro, while creating the file.

 

If you have another country that works fine, compare variable names of GCTYPE* datasets.

If you saved the log of dataset creation, check it for WARNING / ERROR messages, if any.

 

As I'm using the SAS University Edition, I have no acces to SAS GRAPH.

SAS Employee
Posts: 170

Re: Proc Geocode issues with non-existent group variable

We have a new version of CodeBase2Geocode.sas that should take care of this problem.

Please let us know if this fixes the import.

 

 

Attachment
New Contributor sp3
New Contributor
Posts: 2

Re: Proc Geocode issues with non-existent group variable

Posted in reply to Darrell_sas

Thanks Darrell. I managed to get it working by importing another file that including the missing "Group" variable but I will definitely redo the data import using the new Geocode macro that you have provided. Once I have done so I will report on any progress.

Thanks,

sp3

Ask a Question
Discussion stats
  • 3 replies
  • 230 views
  • 0 likes
  • 3 in conversation