Techniques for Executing Templates

Compiled graph templates can be executed using either the PROC SGRENDER statement or a DATA step. Both techniques offer the same functionality but differ in their syntax. The SGRENDER syntax is simpler, but any required data manipulations must be completed before the PROC SGRENDER statement is used. The DATA step syntax is more complex, but it can integrate data manipulations with the graph execution.
Both PROC SGRENDER and a DATA step can be used to
  • specify the input template
  • specify the input data set
  • associate a label with input variable(s) using a LABEL statement
  • associate a format with input variable(s) using a FORMAT statement
  • filter input data using a WHERE statement or WHERE= input data set option
  • assign values to dynamic variables for substitution in the template
  • name the output data object
  • label the output data object.
The following sections show how to use both SGRENDER and a DATA step to generate graphs from compiled GTL templates.