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
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 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
Thank you however what is an example of how that path can be coded?
Sharda
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
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.
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
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
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.
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.
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.
The SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment.
SAS technical trainer Erin Winters shows you how to explore assets, create new data discovery agents, schedule data discovery agents, and much more.
Find more tutorials on the SAS Users YouTube channel.