BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hi,
How can I control the output file name in proc gmap? Currently SAS is producing gmap1.gif, gmap2.gif...and etc. I would like the output name same as the file name. Below is the code that I was submitting.

proc gmap all map=maps.us data=input_data all annotate=input_data;
format upb_pct dqp.;
by dealname;
id state;
choro upb_pct / cempty=CXE9967A
coutline=black
discrete
annotate=maplabel
legend = legend;

run;
quit;
4 REPLIES 4
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
Explore using the NAME="your_prefix_name_goes_here" with the procedure.

Scott Barry
SBBWorks, Inc.


GMAP - CHORO Statement
http://support.sas.com/documentation/cdl/en/graphref/61884/HTML/default/gmap-choro-statement.htm
deleted_user
Not applicable
when i add the name='xxxx' the sas outputs my .gif files as xxxx1, xxxx2, and etc. I am using by variable to create multiple maps by city. How can i make sas to output files by the variable i am using? Since the variable name changes, I want SAS to produce output files for example, atlanta.gif, charlotte.gif, and etc. Is this possible?

Thanks in advance.
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
One technique is to pass your data file and using CALL EXECUTE, generate SAS code that invokes a SAS macro containing your PROC GMAP logic, using a WHERE statement to filter the input with each macro invocation. With the WHERE processing, you can then control the NAME="&your_name_var" which would be the same value as in your WHERE statement filter.

Scott Barry
SBBWorks, Inc.
ChrisNZ
Tourmaline | Level 20
Warning: names are limited to 8 characters in 9.1.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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
  • 4 replies
  • 735 views
  • 0 likes
  • 3 in conversation