BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Obsidian | Level 7


I am trying to create a GIF animation in SAS studio 3.8. However, I keep getting the warning:

 WARNING: RTF destination does not support GIF images. Using the 
          default static format.

Due to this, I am only producing the individual graphs and not the GIF. Here is my code that came from an example on SAS Blogs:

ods html;
data stocks;
   set sashelp.stocks;
   Month = month(date);      /* 1, 2, 3, ..., 12 */
   Year = year(date);        /* 1986, 1987, ..., 2005 */
proc sort data=stocks; by date; run;

ods graphics / imagefmt=GIF width=4in height=3in;     /* each image is 4in x 3in GIF */
options papersize=('4 in', '3 in')                    /* set size for images */
        nodate nonumber                               /* do not show date, time, or frame number */
        animduration=0.5 animloop=yes noanimoverlay   /* animation details */
        printerpath=gif animation=start;              /* start recording images to GIF */
ods printer file='C:\Users\lindsey.nelson\Gifs';  /* images saved into animated GIF */
ods html select none;                                /* suppress screen output */
proc sgplot data=stocks;
title "Stock Performance";
   by year;                                           /* create 20 images, one for each year */
   series x=month y=close / group=stock;              /* each image is a time series */
   xaxis integer values=(1 to 12);                         
   yaxis min=10 max=210 grid;                         /* set common vertical scale for all graphs */
ods html select all;    
ods listing;                              /* restore screen output */
options printerpath=gif animation=stop;               /* stop recording images */
ods printer close; 
ods html close;     



Accepted Solutions
Super User
ods printer file='C:\Users\lindsey.nelson\myMap.gif';

You needed to give it an actual file name, such as gif.

View solution in original post

Super User
Show the log.

Turn off ODS RTF as indicated in the other post:

ODS RTF CLOSE; *put at top of program;
Super User
ods printer file='C:\Users\lindsey.nelson\myMap.gif';

You needed to give it an actual file name, such as gif.



Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

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.

Get the $99 certification deal.jpg



Back in the Classroom!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 2 in conversation