Hello,
I am attempting to export PDF reports (combinations of graphs, tables, and text) using ODS to a shared drive. I am working in Enterprise Guide via Citrix Receiver and looking for a code solution that can be deployed with SAS Scheduler.
I have successfully used PROC Export:
proc export
data = work.user_measures
outfile = "\\corp.[company_name].com\share$\CLE06\PROCESS ENGINEERING\DNA\Mortgage\Extracts\User_Measures.xls"
As well as outputting to a server folder using ODS:
ods pdf file = "/opt/sasusershome/[username]/Reporting/test.pdf";
However when trying to use ODS to output to the Shared Drive directory I receive the message "ERROR: Physical file does not exist" if using forward slashes:
ods pdf file = "//corp.[company_name].com/share$/CLE06/PROCESS ENGINEERING/DNA/Mortgage/Reporting/test.pdf";
Or if using backward slashes the error message "ERROR: Insufficient authorization to access /sas/foundation/sasconfig_grid/Lev1/SASGrid/\\corp.[company_name].com\share$\CLE06\PROCESS
ENGINEERING\DNA\Mortgage\Reporting\test.pdf.
ods pdf file = "\\corp.keybank.com\share$\CLE06\PROCESS ENGINEERING\DNA\Mortgage\Reporting\test.pdf";
My best guess is that the problem lies with going from the UNIX SAS environment to the Windows Shared Drive, however, I do not understand why one operation is working while the other is not. Any help or insights would be incredibly appreciated.
Are you by any chance using the SAS PC FILE Server with PROC EXPORT? For example using DBMS = EXCELCS? That would explain why your PROC EXPORT works but your ODS PATH doesn't. You could ask your SAS server admin about the possibility of setting up a file share from your SAS server to Windows file server.
Why are you using forward slashes in the ODS drive path? We use ODS a lot under Windows and always use back slashes.
Do you see a difference between these lines
outfile = "\\corp.[company_name].com\share$\CLE06\PROCESS ENGINEERING\DNA\Mortgage\Extracts\User_Measures.xls"
ods pdf file = "//corp.[company_name].com/share$/CLE06/PROCESS ENGINEERING/DNA/Mortgage/Reporting/test.pdf";
If the first one worked and the second failed look for the difference and correct.
Thank you for your reply, I've edited the original post to clarify that the ODS output does not work using either forward or backslashes in the filepath. I tested both as my understanding is that UNIX uses "/" and Windows supports either although uses "\" by convention.
Hi:
It looks to me, based on this path in the log's ERROR:
ERROR: Insufficient authorization to access
/sas/foundation/sasconfig_grid/Lev1/SASGrid/\\corp.[company_name].com\share$\CLE06\PROCESS ENGINEERING\DNA\Mortgage\Reporting\test.pdf
that you are running on a BI Platform or Grid platform, because of the way that the Grid server name is pre-pended to the name you specified in your code. Typically, this means that the way your configuration is set up, the fully qualified name you specified cannot be written to from the server machine identified by
/sas/foundation/sasconfig_grid/Lev1/SASGrid.
My suggestion is that you contact your SAS Administrator and get access to a folder on the server, that is relative to the part of the path that I've highlighted in red and then you can FTP your PDF file from the server to your other location.
Cynthia
Thank you Cynthia, we are in fact using a SAS Grid, and I was able to output to a server folder so we will continue to work on a solution for moving the reports once generated.
Are you by any chance using the SAS PC FILE Server with PROC EXPORT? For example using DBMS = EXCELCS? That would explain why your PROC EXPORT works but your ODS PATH doesn't. You could ask your SAS server admin about the possibility of setting up a file share from your SAS server to Windows file server.
Thank you SASKiwi, PC Files was the answer as to why the PROC Export worked but not ODS. We will look into other options for moving the reports off of the SAS Server.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.