/*Kaz's SAS juku www.estat.us How to do a text-based report. I hate ODS's output because they are ugly. I think text-based outputs look a lot nicer and easier to handle. */ /*this produce an aschi file*/ PROC PRINTTO PRINT="C:\temp\result.txt" new; RUN; %macro this (var1=); proc sort data=sashelp.class out=abc; by &var1; run; options formdlim='';/*this suppresses the pagination after this proc*/ proc print data=abc; title "Page break after this"; title2 "Usually every procedure will accompany a page break, which makes a report so long"; title3 "Open this text file with MS-WORD and choose font SAS Monopause and size=8"; var name sex ;run; options formdlim=' ';/*This regains the pagination after this proc. Notice " " has one blank*/ proc print data=abc; title "No page break before this PROC"; var name height ;run; %mend this; %this (var1=sex); %this (var1=height); PROC PRINTTO PRINT=PRINT; quit;