goptions target=ps hby=0
         ftext=swiss nodisplay;

data one;
   input @1 player $10. @12 rank @14 position $;
   cards;
TAYLOR     1 LB
LAMBERT    2 LB
SINGLETARY 3 LB
SMITH      1 RB
BETTIS     2 RB
SANDERS    3 RB
RICE       1 WR
SHARPE     2 WR
RISON      3 WR
;

proc gchart data=one gout=work.gseg;
   vbar player / sumvar=rank;
   by position;
   title1 'This is a graph for #byval(position)';
   pattern1 v=solid c=black;
run;
quit;

goptions display;
proc greplay nofs igout=work.gseg tc=sashelp.templt
             template=v3;
   treplay 1:GCHART
           2:GCHART1
           3:GCHART2;
run;
quit;

________________________________________________________________________

goptions device=ps nodisplay;
proc gtestit;
run;
quit;

________________________________________________________________________

proc greplay nofs igout=work.gseg;
   delete _all_;
run;
quit;

________________________________________________________________________

goptions reset=all target=ps ftext=swiss nodisplay hby=0
         vsize=3.3;

proc gchart data=one gout=work.gseg ;
   vbar player/ sumvar=rank;
   by position;
   pattern1 v=solid c=black;
   title1 'This is a graph for #byval(position)';
run;
quit;

________________________________________________________________________

goptions vsize=0 vpos=0 display;

proc greplay nofs igout=work.gseg tc=sashelp.templt
   template=v3;
             treplay 1:GCHART
                     2:GCHART1
                     3:GCHART2;
run;
quit;