The FILENAME statement assigns a fileref to an external file. PROC PRINTTO routes subsequent procedure output to the file referenced by the fileref ROUTED. See PROC FREQ Output Routed to the External File Referenced as ROUTED .
   filename routed 'output-filename';