The GREPLAY Procedure |
You can use the GREPLAY procedure to create new graphics output by replaying existing graphics output in templates. Templates are often used to replay several graphics entries from the same catalog on one display or page. The GREPLAY procedure creates new graphics output when replaying graphics output with a template.
You can create your own templates, or you can use the templates provided with SAS/GRAPH that are stored in the SASHELP.TEMPLT catalog.
The following guidelines describe how to generate two graphs, and replay the graphics output on one page using a SASHELP.TEMPLT entry:
Generate two graphs with PROC GCHART using the default names (GCHART GCHART1).
Start the GREPLAY procedure with the NOFS option specified.
Define the input catalog with the IGOUT= option (WORK.GSEG).
Assign the template catalog with the TC= option (SASHELP.TEMPLT contains the template entries).
Assign a template to replay your graphs with the TEMPLATE statement (V2).
Assign the graphs you want to replay with the TREPLAY statement (GCHART GCHART1).
End the GREPLAY procedure with the QUIT statement.
For example, the following statements replay the entries GRAPH1 and GRAPH2 into the V2 template, which is stored in the catalog SASHELP.TEMPLT. The TC statement specifies the catalog that contains the template, and the TEMPLATE statement specifies the template. The TREPLAY statement assigns each entry to a panel. (The V2 template has two panels, so there is an assignment for panel 1 and panel 2.)
proc gchart data=sashelp.class; hbar age/discrete; run; hbar height; run; quit; proc greplay igout=work.gseg nofs; tc sashelp.templt; template v2; treplay 1:gchart 2:gchart1; quit;
Note: If the GOUT= option is not specified when creating the charts, then the output is stored in the temporary WORK.GSEG catalog.
When you replay graphics output in a template, the new GRSEG output that is created by the GREPLAY procedure is automatically provided a default name, Template, and it is stored in the output catalog WORK.GSEG. The default GRSEG description is "Graphics Replay".
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.