BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
VictorSirianni
Fluorite | Level 6

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.

1 ACCEPTED SOLUTION

Accepted Solutions
SASKiwi
PROC Star

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.

View solution in original post

7 REPLIES 7
SASKiwi
PROC Star

Why are you using forward slashes in the ODS drive path? We use ODS a lot under Windows and always use back slashes.

ballardw
Super User

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.

VictorSirianni
Fluorite | Level 6

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.

Cynthia_sas
SAS Super FREQ

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

VictorSirianni
Fluorite | Level 6

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.

SASKiwi
PROC Star

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.

VictorSirianni
Fluorite | Level 6

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-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
  • 7 replies
  • 1464 views
  • 1 like
  • 4 in conversation