GREPLAY Procedure

Example 2: Replaying GSLIDE Procedure Output in a Template

Features:
GREPLAY statement options::
GOUT=,
IGOUT=
TEMPLATE=

TREPLAY statement

Other features:

PROC GSLIDE

Sample library member: GRERGOT1
Note: This example requires template NEWTEMP, which is created in Creating a Template. In order to run this program, you must first run the program in Creating a Template to create the NEWTEMP template. Otherwise, an error will occur in this program.
This program uses template NEWTEMP, which is created by the program in Creating a Template. The TREPLAY statement in this example replays four catalog entries that contain graphics output into template NEWTEMP. The NEWTEMP template contains four equally sized panels, and one large, full-size panel. Note that assignments are made to all but one panel. Because the fourth panel is not listed in the TREPLAY statement, it does not appear in the graphics output. The HSIZE= option, and the VSIZE= option are adjusted, to reflect the overall output dimension. Alternatively, you could use XPIXELS= and YPIXELS= to adjust the graphics output size..
GREPLAY output

Program

goptions reset=all border hsize=5.14in vsize=4.13in;
ods html close;
ods listing;
proc gslide gout=grafcat;
   title c=navy "Graph Number Three";
run;
   title c=lime "Graph Number One";
run;
   title c=orange "Graph Number Two";
run;
 
proc gslide gout=grafcat;
   title c=purple "Common Title";
   footnote c=blue "Common Footnote";
run;
proc greplay igout=grafcat gout=excat tc=tempcat nofs;
   template=newtemp;
   treplay 1:gslide
           2:gslide1
           3:gslide2
           5:gslide3;
         quit;
ods listing close;
ods html;

Program Description

Here is a detailed example of the example program.
Set the graphics environment.The HSIZE= option, and the VSIZE= option are set for the overall output dimensions.
goptions reset=all border hsize=5.14in vsize=4.13in;
Close the ODS HTML destination and open ODS LISTING.
ods html close;
ods listing;
Generate three graphs in the WORK.GRAFCAT catalog. The GSLIDE procedure creates three text slides, and stores them in GRAFCAT as specified by the GOUT= option. These are stored as GSLIDE, GSLIDE1, and GSLIDE2.
proc gslide gout=grafcat;
   title c=navy "Graph Number Three";
run;
   title c=lime "Graph Number One";
run;
   title c=orange "Graph Number Two";
run;
 
Generate a text slide with PROC GSLIDE and output to GRAFCAT. Define a title and a footnote for the container output.
proc gslide gout=grafcat;
   title c=purple "Common Title";
   footnote c=blue "Common Footnote";
run;
Start the GREPLAY procedure. The IGOUT= option, assigns GRAFCAT as the input catalog. The GOUT= option assigns EXCAT as the output catalog. The TC=TEMPCAT option assigns the template catalog for the GREPLAY procedure. The TEMPLATE=NEWTEMP option assigns NEWTEMP as the current template.
proc greplay igout=grafcat gout=excat tc=tempcat nofs;
   template=newtemp;
Replay three graphs into template. The TREPLAY statement assigns three entries to panels in the NEWTEMP template. Each assignment is a panel number, and the name of a graphics output entry. Names are the default names assigned by the GSLIDE procedure.
   treplay 1:gslide
           2:gslide1
           3:gslide2
           5:gslide3;
         quit;
Close ODS LISTING and open ODS HTML.
ods listing close;
ods html;