Create the RTF file, select the output object and run PROC DATASETS. The ODS RTF statement specifies the file that will contain the RTF output. The STYLE= option specifies the style to apply to the output. The ODS SELECT statement selects the output object Members to be sent to the open destinations.
ods rtf file="headerfooters.rtf" style=HeadersFootersBorders; ods select members; proc datasets lib=nlits; run; quit;