I'm having trouble outputting a proc print table to my desktop. We have a SAS EG v6.1 license installed on a server.
I'm receiving the following error:
ERROR: Insufficient authorization to access C:\HH_Providers.pdf
when I run my code:
ods pdf file="C:\HH_Providers.pdf";
PROC PRINT DATA=WORK.SORTTempTableSorted style(header)={just=c}
NOOBS
LABEL
;
VAR SVC_QTR MEMBNO MEMB_NAME HH_NAME SVC_PROVIDER SVC_DATE DIAG_IND / style(data)={just=c};
BY SVC HH_NAME;
FORMAT
SVC_DATE MMDDYYS8.;
LABEL SVC_QTR="# of Qualifying Visits/Episodes"
MEMBNO="Member Number"
MEMB_NAME="Member Name"
HH_NAME="Home Health Provider"
SVC_PROVIDER="Healthcare Provider"
SVC_DATE="Visit/Episode Date"
DIAG_IND="Diagnosis Indicator";
RUN;
ods _all_ close;
Hi
As already mentioned the SAS Server can not see your local drives. However Enterprise Guide has the functionality to download results to your local computer. Follow the steps below.
Bruno
Try writing the pdf to a different location than c:, as in a folder where you have permissions.
Generally Windows protects to write directly on c:
I tried writing to my H: drive, still no luck:
ERROR: Physical file does not exist, H:\HH_Providers.pdf.
The weird thing is that I *can* export datasets to my desktop from EG using the Export wizard. But not when using ods statements to output files from a procedure.
The server can't see your C or H drive.
You our need to figure where it can see and where you can create files - most likely a path on the server.
Your situation will look like this:
Desktop --------- H: ---------> File Server
| X
| X
via EG H: mount on the SAS server does not exist, but would be needed
| X
| X
V X
SAS server ---------------------------------
Remember, the paths specified in code are from the context of the server. So, when you specify "C:\HH_Providers.pdf" in your code, SAS is trying to write that file on the SAS server's host machine. The user that you are logged into EG as is evidently not authorized to access "c:\" on the server.
Register today and join us virtually on June 16!
sasglobalforum.com | #SASGF
View now: on-demand content for SAS users
Hi
As already mentioned the SAS Server can not see your local drives. However Enterprise Guide has the functionality to download results to your local computer. Follow the steps below.
Bruno
Thank you Bruno - this is the best workaround solution for now.
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.