I am trying to create a PDF file using ODS PDF however, I keep getting an error that the physical file does not exist. It needs to include three pages for ChiSquare results, a bar chart, and the ANOVA results. However, I'm not sure what in my code is causing this error:
ODS PDF FILE = '&CourseRoot/Hypertension Study/Documents/Analysis Report-Hypertension Study.pdf';
* display the results of the Chi-Square test *;
TITLE1 'Chi-Square Test of Independence Results';
FOOTNOTE "Created by HS";
PROC REPORT DATA = ChiSqResults;
COLUMN Test
("Statistical Results" DF Value Prob);
LABEL Prob = 'P-Value';
RUN;
* include the figure in the report *;
PROC DATASETS Lib = ;
MODIFY StatePercents;
FORMAT ColPercent;
RUN;
QUIT;
TITLE1 BOLD 'Hypertension-Related Death Rates by State';
FOOTNOTE1 'Created by HS';
PROC SGPLOT DATA = StatePercents;
REFLINE 1.8
/ AXIS = Y
LABEL = 'National Average = 1.8'
LABELLOC = INSIDE
LABELPOS = MAX
LINEATTRS = ( COLOR = INDIGO
PATTERN = SHORTDASH
THICKNESS = 1);
VBAR StateCd / RESPONSE = ColPercent
DATALABEL
FILLATTRS = ( COLOR = LIGHTSALMON);
XAXIS LABELATTRS = ( WEIGHT = BOLD);
YAXIS VALUES = (0 1 2 3 4)
LABEL = 'Percent'
LABELATTRS = ( WEIGHT = BOLD)
OFFSETMIN = 0
GRID;
FORMAT StateCd $StateCd.;
RUN;
TITLE;
FOOTNOTE;
* include the 4 ANOVA results *;
PROC PRINT DATA = ANOVAResults;
RUN;
ODS PDF CLOSE;
This is the error I keep receiving:
ERROR: Physical file does not exist, /pbr/biconfig/940/Lev1/SASApp/&CourseRoot/Documents/Analysis Report-Hypertension Study.pdf.