SGDESIGN Procedure

Example 2: Creating a Graph That Uses a Different Data Set

Features:

subset data

You can produce a graph from a different data set as long as the new data set has variables of the same name and type. (If the SGD file was created using shared variables, then you can create a graph from a different data set regardless of the name of the variables. For more information, see Dynamic Variable Concepts.)
The following example creates a new data set from an existing data set. This example assumes the existence of a graph named CarsLattice.sgd that was created based on the SASHELP.CARS data set.
data sedans;
   set sashelp.cars;
   where type="Sedan";
run;

proc sgdesign sgd="CarsLattice.sgd"1 data=sedans; 
run;
1 Specify the path and name that you used when you saved the SGD file. For example, the path might be "C:\SGDFiles\CarsLattice.sgd."