BookmarkSubscribeRSS Feed
Antaralib
Obsidian | Level 7

Hi, I have SAS9.1.

I am trying to create a university-country map from a dataset.

I tried :

proc gmap data = have map=maps.new;
id university;
choro country;
run;
quit;

 

gives me the error:

 

167 proc gmap data = data = have map=maps.new;
ERROR: Libname MAPS is not assigned.
168 id university;
169 choro country;
NOTE: The previous statement has been deleted.
170 run;

 

I need to dedupe the new dataset into the university column. NOt sure if gmap is not valid.

 

Any help will be appreciated.

5 REPLIES 5
Reeza
Super User

1. Check if you have SAS/GRAPH licensed, if you can run GCHART procs you do. Otherwise run the code below and make sure SAS/GRAPH shows up in the list. 

proc setinit; run;

2. For PROC GMAP data points to the data set that has the data that you want to graph. MAP= refers to the data that has the mapping data. Check your default SAS library and see what the maps library is called and which dataset has the US boundaries that you want. Your log is saying that maps doesn't exist, but I'm fairly certain it's been around, even in SAS 9.1. Take a look at your library, it may be called mapssas or maps or something along those lines. 

 

2b. Did you create a library called maps and import a SHP file you called NEW to the library? That's what your code is implying.

 

3. Why are you using SAS 9.1 -> upgrades are included in your license. If because your work hasn't updated, let them know it's more than 15 years old. If it's because you're using an illegal copy, and assuming you're only using it for learning purposes consider using SAS University Edition which is free, and then you can use GTL with polygon plots to make maps. 

Darrell_sas
SAS Employee

The error seems to indicate that Proc GMAP is there but the MAPS library is not.

I would suspect that you do not have the MAPS Library loaded on your system or you have defined MAPS to a location that does not exist.  There is not a "new" data set in the official MAPS library.

 

 

Antaralib
Obsidian | Level 7

@Darrell_sas

Indeed there is no maps library.

Reeza
Super User

It may be installed but not assigned. See where your SASHELP folder resides and if it's there.  

 

If you had a valid SAS 9.3+ license you could download them from the web. 

 

Are you sure you're on SAS 9.1? 

Darrell_sas
SAS Employee

It used to be that the installer had a choice of installing MAPS or not.  And I think it was at 9.1 and before.  So it is possible that the person installing decided not to. 

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 5 replies
  • 1487 views
  • 2 likes
  • 3 in conversation