BookmarkSubscribeRSS Feed
NathanOch
Obsidian | Level 7

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

2 REPLIES 2
ballardw
Super User

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.

 

Cynthia_sas
SAS Super FREQ

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;

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 1370 views
  • 0 likes
  • 3 in conversation