Hello, SAS coders.
I am creating an ODS RTF File and it shows up like this
But my code is this:
ODS RTF FILE = "/home/u63558208/Project One/CDPHE Data/5_Results/FinalProject.rtf"
STYLE=BARRETTSBLUE;
TITLE1'Means and Standard Deviations of Demographics, Risk Factors, and Outcomes';
PROC PRINT DATA=COLANLYS.TABLEONE LABEL NOOBS;
RUN;
TITLE;
TITLE1'ANOVA of Demographics, Risk Factors, and Outcomes';
PROC PRINT DATA = COLANLYS.TABLETWO LABEL NOOBS;
RUN;
TITLE;
FOOTNOTE "p-values > .05";
FOOTNOTE;
TITLE1"Pearson's Correlation Between Demographics, Risk Factors, and the Outcome";
PROC PRINT DATA=COLANLYS.TABLETHREE LABEL NOOBS;
RUN;
TITLE;
ODS GRAPHICS ON;
ODS NOPROCTITLE;
PROC SGPLOT DATA=WORK.FIGURE;
VBOX outcomes_adults_mental_distr / CATEGORY=Quartiles FILLATTRS=(COLOR=LIGHTBLUE) BOXWIDTH=0.5;
TITLE BOLD "Boxplot of Quartiles of Marijuana Use and Frequent Mental Distress";
XAXIS LABEL="Quartiles of Marijuana Use" VALUEATTRS=(WEIGHT=BOLD);
YAXIS LABEL="Frequent Mental Distress" VALUES=(0 TO 100 BY 10) OFFSETMIN=0;
REFLINE 70 / AXIS=Y LINEATTRS=(COLOR=BLUE);
REFLINE 90 / AXIS=Y LINEATTRS=(COLOR=BLUE) LABEL="HYPERTENSION THRESHOLD" LABELPOS=max;
YAXIS GRID;
INSET "Data Source: Colorado Study Data"/ POSITION=NW BORDER;
RUN;
TITLE;
ODS NOPROCTITLE;
OPTIONS VALIDVARNAME=ANY;
PROC REG DATA=WORK.FIGURE (RENAME = outcomes_adults_mental_distr = Frequent_Mental_Distress)
PLOTS(ONLY) = FITPLOT;
LABEL Marijuana_Use = 'Percent of People Who Used Marijuana 1+ Days out of 30 Days';
'Linear Regression'n:
MODEL Frequent_Mental_Distress = Marijuana_Use /
CLM
CLI
ALPHA=0.05;
TITLE "Linear Regression of Frequent Mental Distress and Marijuana Use";
ODS SELECT FitPlot;
RUN;
TITLE;
ODS GRAPHICS OFF;
ODS RTF CLOSE;
Is there something I did wrong? I am confused it was working before but now it looks like that.
Your code looks OK. The image suggests you have opened a pdf file - it starts with %pdf1.5!
Can you run the following the code below and see if that produces a correctly formed rtf-file.
ODS RTF FILE = "/home/u63558208/Project One/CDPHE Data/5_Results/test.rtf"
STYLE=BARRETTSBLUE;
Title "Test creating rtf file";
proc print data=sashelp.class(obs=1); run;
ods rtf close;
Your code looks OK. The image suggests you have opened a pdf file - it starts with %pdf1.5!
Can you run the following the code below and see if that produces a correctly formed rtf-file.
ODS RTF FILE = "/home/u63558208/Project One/CDPHE Data/5_Results/test.rtf"
STYLE=BARRETTSBLUE;
Title "Test creating rtf file";
proc print data=sashelp.class(obs=1); run;
ods rtf close;
Thank you everyone, it appears that it is working again.
Thank you for all the solutions!
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.
Find more tutorials on the SAS Users YouTube channel.