I am trying to push some proc report results to a sharepoint folder as a PDF. I get this error:
ERROR: Physical file does not exist
I was wondering if I need to work with our sys admin to grant SAS the necessary permissions to SharePoint in order to write files to folders, or if I am using the wrong command code. I am currently trying to use the ODS PDF command.
%let date=%sysfunc(putn(%sysfunc(today()),mmddyyd10.));
options nobyline orientation=landscape;
ods listing close;
ods pdf file="sharepoint path &date .pdf";
%let month = %sysfunc(today(),monname12.);
%let year = %sysfunc(today(),year4.);
TITLE1 j=l h=5 "Agent Productivity Dashboard: &month &year";
TITLE2 j=left h=3 "Agent: #byval2 (#byval1)";
TITLE3 j=left h=3 "Supervisor: #byval3";
FOOTNOTE;
proc report...
...run;
ods pdf close;
Thank you,
Nathan
Show the code and the error from the log. Paste into a code box opened with the {I} icon to maintain formatting of any messages.
Many of the error messages indicate where the error occurs but the main windows on this forum reformat text losing some of the information.
Hi:
Here are two examples that I use as Sharepoint examples. Note that I used a UNC location for my Sharepoint site and I did have to go to my Sharepoint admin to get the correct UNC name and get the "cztest" folder added to that location with write access permissions.
cynthia
ods _all_ close;
title; footnote;
options topmargin=.25in bottommargin=.25in leftmargin=.25in rightmargin=.25in;
** make pdf file;
filename pdf_out '\\xxx.yyy.sas.com\zzz\Shared Documents\Examples\cztest\report1.pdf';
ods pdf(id=p) file=pdf_out ;
proc report data=sashelp.class;
title 'This PDF file is on SharePoint';
column age height,(min mean max);
define age / group;
define height / analysis;
run;
ods pdf(id=p) close;
filename pdf_out clear;
** make html file;
filename htm_out '\\xxx.yyy.sas.com\zzz\Shared Documents\Examples\cztest\report2.html';
ods html(id=h) body=htm_out encoding=UTF8 dev=gif ;
proc report data=sashelp.class;
title 'This HTML file is on SharePoint';
column age height,(min mean max);
define age / group;
define height / analysis;
run;
ods html(id=h) close;
filename htm_out clear;
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.