GREPLAY Procedure

Example 1: Creating a Template

Features:
REPLAY statement options::
NOFS
TC=

TDEF statement

TEMPLATE statement

Sample library member: GRECRTM1
This example creates a template with five panels. Four panels are small and equal in size. The fifth panel is a larger, full-size panel that can be used to display a common title or footnote for the entire template. In this example, the LIST statement displays the template contents in the SAS log. Defining a Template shows the template definition written to the SAS log file. The template defined here is also used in Replaying GSLIDE Procedure Output in a Template.
Defining a Template
.
.
.

64        /* list template contents */
65      list template;

 NEWTEMP       Five panel template

 Pan Clp Color      Ll-x  Ll-y  Ul-x  Ul-y  Ur-x  Ur-y  Lr-x  Lr-y

  1    NAVY        0.0  10.0   0.0  50.0  50.0  50.0  10.0
  2    LIME       0.0  50.0   0.0  90.0  50.0  90.0  50.0  50.0
  3    YELLOW      50.0  50.0  50.0  90.0 100.0  90.0 100.0  50.0
  4    CYAN       50.0  10.0  50.0  50.0 100.0  50.0 100.0  10.0
  5    LIPK        0.0   0.0   0.0 100.0 100.0 100.0 100.0   0.0

66   quit;
.
.
.

Program

goptions reset=all border;
proc greplay tc=work.tempcat nofs;
tdef newtemp des="Five panel template"
     1/llx=0   lly=10
       ulx=0   uly=50
       urx=50  ury=50
       lrx=50  lry=10
       color=navy

     2/llx=0   lly=50
       ulx=0   uly=90
       urx=50  ury=90
       lrx=50  lry=50
       color=lime

     3/llx=50 lly=50
       ulx=50 uly=90
       urx=100 ury=90
       lrx=100 lry=50
       color=yellow

     4/llx=50 lly=10
       ulx=50 uly=50
       urx=100 ury=50
       lrx=100 lry=10
       color=cyan

     5/llx=0 lly=0
        ulx=0 uly=100
        urx=100 ury=100
        lrx=100 lry=0
        color=lipk;
template newtemp;
 list template;
 quit;

Program Description

Here is a detailed example of the example program.
Set the graphics environment.
goptions reset=all border;
Start the GREPLAY procedure. NOFS starts the procedure in line-mode. The TC= option assigns TEMPCAT as the template catalog.
proc greplay tc=work.tempcat nofs;
Define a template with five panels. The TDEF statement defines a template named NEWTEMP, and places it in the previously defined template catalog. Each definition identifies the panel number, and specifies the four corner's coordinates. The COLOR= option draws a border for each panel in the specified color.
tdef newtemp des="Five panel template"
     1/llx=0   lly=10
       ulx=0   uly=50
       urx=50  ury=50
       lrx=50  lry=10
       color=navy

     2/llx=0   lly=50
       ulx=0   uly=90
       urx=50  ury=90
       lrx=50  lry=50
       color=lime

     3/llx=50 lly=50
       ulx=50 uly=90
       urx=100 ury=90
       lrx=100 lry=50
       color=yellow

     4/llx=50 lly=10
       ulx=50 uly=50
       urx=100 ury=50
       lrx=100 lry=10
       color=cyan

     5/llx=0 lly=0
        ulx=0 uly=100
        urx=100 ury=100
        lrx=100 lry=0
        color=lipk;
Assign the template. The TEMPLATE statement assigns the created template NEWTEMP as the template.
template newtemp;
Write the template contents to the SAS log.
 list template;
 quit;