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

Hello,

 

I have a user who is attempting to write out a pdf file to a shared network drive however he encountered this error:

 

ods pdf file="\\usflfsc0\osr$\Office Records\Users Shared\Will VanHove\Reports & SOPs\Resort Cluster RF Analysis\R...";

 

SAS CODE HERE

 

ODS PDF CLOSE;

 

But I get the following error:

ERROR: Insufficient authorization to access /mnt/SAS9.4/9.4/config/node1/Lev1/SASApp/\\usflfsc0\osr$\Office Records\Users

       Shared\Will VanHove\Reports & SOPs\Resort Cluster RF Analysis\Resort PDF Reports\test.pdf.

 

 

I am unable to grant him permission to /mnt/SAS9.4/9.4/config/node1/Lev1/SASApp/ because this area houses all the config files and accessed only by the SAS/Linux admins.

 

Thanks,

Sharda

1 ACCEPTED SOLUTION

Accepted Solutions
ChrisHemedinger
Community Manager

If there is not a shared network location that the user can write to on UNIX and then access from Windows, you might be able to adapt this approach: create the PDF on UNIX in a temp space, then use the Copy Files task to download to the PC. Here's a blog post that shows an example with a CSV file.

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.

View solution in original post

13 REPLIES 13
Mark_sas
SAS Employee

It looks like your SAS Application Server is running on a UNIX machine.  The path you're specifying is a PC filesystem path, and SAS is prepending the path with the SAS Application Server directory location in the configuration directory because it's interpreting the PC filesystem path as a relative, rather than an absolute path.

 

I'd suggest specifying the output location as an absolute UNIX filesystem path to which the user has write access in the ods pdf file statement.


Register today and join us virtually on June 16!
sasglobalforum.com | #SASGF

View now: on-demand content for SAS users

sharda
Obsidian | Level 7

Thank you however what is an example of how that path can be coded?

 

Sharda

sharda
Obsidian | Level 7

Btw, the PC file server has permission to write out to the shared network drive mentioned above however, the user needs the file to be a pdf and PC file server does not support this extension which is why he was using the ods pdf file.

 

To clarify, how can the user write out to the shared network drive?

 

Thanks,

Sharda

ChrisHemedinger
Community Manager

If there is not a shared network location that the user can write to on UNIX and then access from Windows, you might be able to adapt this approach: create the PDF on UNIX in a temp space, then use the Copy Files task to download to the PC. Here's a blog post that shows an example with a CSV file.

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.
Mark_sas
SAS Employee

Something simple would be:

 

ods pdf file="~/test.pdf";

 

This will place the test.pdf in the user's home directory on UNIX, to which they should have write access.  They'll need to transfer the file to the PC location.

 

Ideally, you'll have the PC file server location mounted up on UNIX so it can be accessed in both environments.  In that case, they'd need to point the ODS PDF FILE statement to the UNIX mountpoint corresponding to the PC file server.

 

 


Register today and join us virtually on June 16!
sasglobalforum.com | #SASGF

View now: on-demand content for SAS users

sharda
Obsidian | Level 7
Ok, so the user did place the pdf file in a path similar to what you recommended and that worked. It seems as though there is no automated way (via code) to place the file from his directory in UNIX to the shared drive, is that correct?

Also, can you suggest how I can test the following:

* Check to see if the PC file server location is mounted up on UNIX so it can be accessed in both environments.

* point the ODS PDF FILE statement to the UNIX mountpoint corresponding to the PC file server. Maybe you have an example or link that references how to do this?

Thanks,
Sharda

Mark_sas
SAS Employee

You'll need to talk with your system administrator for the UNIX machine running the workspace server to which the user is submitting their jobs.  They would be able to answer whether there are any shared filesystems between your PC and UNIX machines, inclusive of the one your user originally tried.  If so, they could provide the UNIX directory paths.

 

If you don't have access to a shared network location, you can try the alternate approach Chris provided in his post a few minutes ago.


Register today and join us virtually on June 16!
sasglobalforum.com | #SASGF

View now: on-demand content for SAS users

sharda
Obsidian | Level 7
Thank you both....
Reeza
Super User

If the server is set up to see the shared drive why can't the user point directly to the shared drive?

They would need to be using the appropriate file path for the server and a unix space.

 

ie 

 

//drive2/path to my shared direve/file.pdf

 

PC Files Server shouldn't come into play here at all, only where the server and user has access to from within the server.

sharda
Obsidian | Level 7
Hi Reeza,
Maybe I am missing something here but the user was referencing the appropriate file path:
\\usflfsc0\osr$\Office Records\Users Shared\Will VanHove\Reports & SOPs\Resort Cluster RF Analysis\Resort PDF Reports\test.pdf

What do you see is missing based on your example://drive2/path to my shared direve/file.pdf?
Thanks,
Sharda



Reeza
Super User

Isn't that a Windows path? Though I don't think it matters to SAS what directions the slashes are, but the path needs to be relative to the Unix server.

 

I would confirm that from within EG the user had access to the path, if they can't navigate there to set up a library for instance they don't have access. 

 

sharda
Obsidian | Level 7
\\usflfsc0 is a unix server.
Reeza
Super User

Tools>Assign Project Library

Try and assign a library to that path. If you can you should be able to write a PDF to the path.

 

Otherwise look into how to set up access to the path.

suga badge.PNGThe SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment. 

Join SUGA 

CLI in SAS Viya

Learn how to install the SAS Viya CLI and a few commands you may find useful in this video by SAS’ Darrell Barton.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 13 replies
  • 2867 views
  • 1 like
  • 4 in conversation