Define the table definition PHONELIST. This PROC TEMPLATE step defines a table definition named PHONELIST.


The template defines two columns: NAME and PHONE.


The GENERIC=ON attribute defines the column for NAME as one that the DATA step can use for multiple variables.


The column definition uses dynamic headers; that is, a variable that uses this column definition takes the value of the header at run time from the DATA step that uses this template. Thus, each variable can have a different column heading.


The STYLE= attribute specifies that the style element DATA be used as the basis for generating the data in this column. The font face and font size that DATA normally uses are replaced by the ones that are specified in the STYLE= attribute.


The header for PHONE is hard-coded as Telephone. The STYLE= attribute specifies a style element to use for the data in this column. For information on PROC TEMPLATE, see TEMPLATE Procedure: Overview .


proc template;
define table phonelist;
      column name phone;
      dynamic colheader;
   define name;
      generic=on;
      header=colheader;

      style=data{fontstyle=italic fontsize=5};
   end;

   define phone;
      header='Telephone';
      style=datafixed;
   end;
end;
run;