Route the DATA step results to ODS and use the Table1 table template. The combination of the fileref PRINT and the ODS option in the FILE statement routes the results of the DATA step to ODS. (For more information about using the DATA step with ODS, see Output Delivery System and the DATA Step. The TEMPLATE= suboption tells ODS to use the table template named Table1, which was previously created with PROC TEMPLATE.
file print ods=( template="table1"