Join Now

PROC PRINT og ODS RTF

by New Contributor EjnerBørsting on ‎03-13-2015 06:48 AM (311 Views)


Hvordan får man proc print til at skrive en RTF fil med By og ID uden at tabellen deles for hver værdi af BY variablen.

Ejner

Attachment
Attachment
Comments
by SAS Employee OleSteen
on ‎03-13-2015 07:10 AM

Hej Ejner.

Med ODS RTF newfile=proc får du kun ny side for hver gang der køres en ny procedure.

f.eks.:

ods rtf file="c:\temp\test.rtf" newfile=proc;

proc sort data=sashelp.class out=class; by sex; run;

proc print data = class;

by sex;

id sex;

run;

ods rtf close;

/Ole Steen

by New Contributor EjnerBørsting
on ‎03-13-2015 08:21 AM

Men det giver stadig ny kolonneoverskrift for hver skift i by varibelen

EB

by SAS Employee OleSteen
on ‎03-13-2015 09:11 AM

Det tror jeg ikke du slipper for med PROC PRINT.

Brug istedet PROC REPORT i stil med:

PROC REPORT DATA=sashelp.class NOWD;

COLUMNS sex name age;

DEFINE sex / ORDER;

DEFINE name / ORDER;

DEFINE age / ORDER;

RUN;

Det burde give det du ønsker.

/Ole