BookmarkSubscribeRSS Feed
P5C768
Obsidian | Level 7

Are there any output options for PROC GMAP that don't produce two separate files in the output destination?  I have tried using goptions=png and goptions=gif, but both of them produce two files for each map, a .htm file and a .png file.  I am running a loop that creates hundred of maps using gmaps, which I want to output and then use the image files to create a animated GIF, so I would like to avoid duplication of the files if possible.

Also, is there a way to control the names of the output?  I.e. changing them from gmap1, gmap2 etc. to something more descriptive?

Thanks!

3 REPLIES 3
GraphGuy
Meteorite | Level 14

You can control the name of the .png file by using the name= option after the /

For example...

choro sales / levels=5 name="foo";

It is often handy to use a macro variable's value for the name, or If you're using 'by' processing you can use the by-value.

If you're using ods html, I think it's going to create an html file.  Probably easiest to just delete them, or always use the same html file name (so it is overwritten each time).

P5C768
Obsidian | Level 7

Is there another ODS besides HTML that I could use to produce pictures from PROC GMAP? 

ballardw
Super User

It's been awhile since I used this method but there's a graphics option GSFNAME. No ods destination needed.

You would need some thing like this with a different name in each file ref before the gmap call, pick a device that generates the desired output type, GIF, PNG whatever, and have the extention match. Up to you to put your name in the filename. If you have a data set with the names and parameters Call Execute might be the best way to control the process.

filename fileref 'filename.XXX';

goptions device=devicename gsfname=fileref

  gsfmode=replace; /* replace in case you rerun the code you don't want the graphs appending*/

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