Template Types on PROC TEMPLATE

PROC TEMPLATE supports different template types such as COLUMN, TABLE, HEADER, FOOTER, and STATGRAPH. All of these template types support run-time variable substitution via dynamics or macro variables. For STATGRAPH templates such variables should be declared within the scope of the template definition before the BEGINGRAPH block.
PROC TEMPLATE;
  DEFINE STATGRAPH template-name ;

   DYNAMIC variable-1<"text-1"> <... variable-n<"text-n">>;
   MVAR variable-1<"text-1"> <... variable-n<"text-n">>;
   NMVAR variable-1<"text-1"> <... variable-n<"text-n">>;
   NOTES "text";

   BEGINGRAPH; 
     GTL statements;
   ENDGRAPH; 
  END; 
RUN;