BookmarkSubscribeRSS Feed
deleted_user
Not applicable
When creating multple graphs to a page and outfiling them they automatically have the title template. How can I change this?
Is there a way to specify the name its saved as?
I dont want to outgraph until they are formatted 6 per page therefore the initial graphs are stored in a template drive.
1 REPLY 1
Cynthia_sas
SAS Super FREQ
Hi:
I don't understand what you mean by "outfiling" and "outgraph" and "template drive" -- when SAS uses SAS/Graph procedures, in SAS 9.1.3, all the graphs are stored in internal SAS-specific format in a catalog called WORK.GSEG -- in that catalog (or a catalog you designate), the entries either have the names that you assign with the NAME= option or they have names that SAS/Graph assigns (GCHART, GCHART1, GPLOT, GPLOT1, etc).

When you use ODS as a "sandwich" around a program that creates graphs or does a replay, then the images from the SAS/Graph catalog are put into a form that's appropriate for the ODS destination. So, if you create ODS HTML files, then (depending on your device driver), ODS makes an <IMG> tag that points to a device-specific version of what's in the SAS/Graph catalog.

You could have an entry called GCHART in Work.GSEG that would become GCHART.GIF or GCHART.JPG or GCHART.PNG, depending on your device driver. If you created an ODS RTF or ODS PDF file, however, your graphs from the WORK.GSEG catalog get translated to internal RTF or PDF format (there's no IMG tag in RTF or PDF).

Adding a SAS/Graph template into the mix and a GREPLAY complicates the naming a bit. That's because the "new" image (whether it's 2 or 3 or 6 images per page) IS a different kind of image and needs a different name -- the image based on the SAS/Graph template is also stored in WORK.GSEG (or another catalog that you specify) -- so it really should not use the same name as one of the existing entries. When you use a SAS/Graph Template in a GREPLAY -- a new entry gets added to the WORK.GSEG catalog called "Template". This is not a drive -- it is an entry in the SAS/Graph catalog, WORK.GSEG. If you run a second Greplay step, then SAS/Graph creates a second entry called Templat1. You can name this image that's based on a SAS/Graph Template with this kind of syntax:

[pre]
ods rtf file='c:\temp\wombat.rtf';
ods pdf file='c:\temp\wombat.pdf';
ods html path='c:\temp' (url=none)
body='wombat.html'
style=sasweb;
goptions reset=all rotate=portrait;

proc greplay igout=work.gseg
tc=sashelp.templt template=v2s nofs;
treplay 1:gchart 2:gchart1 name='wombat';
run;
quit;
ods _all_ close;
ods listing;

[/pre]


This code creates an entry in WORK.GSEG that is named "Wombat" and so when you replayed this entry, that is the name you'd use (instead of "Template"). The same kind of naming applies to WORK.GSEG..if you ran a second job with name='wombat' and an entry already existed with that name, then SAS/Graph would call the new entry WOMBAT1.

For more help with your GREPLAY and your SAS/Graph task, you might consider contacting Tech Support. I've glossed over some of the internal workings of SAS/Graph catalogs and SAS/Graph templates for the sake of brevity and if you need more detail, then Tech Support or the documentation for SAS/Graph are your best resource.

cynthia

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 1 reply
  • 647 views
  • 0 likes
  • 2 in conversation