Hi,
I'm truying to create a dataset on a UNIX-folder which is available through a symbolic link.
SAS-code snippet :
libname TEST "/sas/prd/data/DIR_III_4/SHARE_INVORDERING/OUTPUT"; /*generates error*/
*libname TEST "/sas/prd/data/DIR_III_4/DIR_III_4"; -> works fine
data TEST.JLSSET3;
input name $ sales;
datalines;
Steven 40
Jurgen 100
David 150
;
Error generated :
26 libname TEST "/sas/prd/data/DIR_III_4/SHARE_INVORDERING/OUTPUT";
NOTE: Libref TEST was successfully assigned as follows:
Engine: V9
Physical Name: /sas/prd/data/DIR_III_4/SHARE_INVORDERING/OUTPUT
27 *libname TEST "/sas/prd/data/DIR_III_4/DIR_III_4";
28 data TEST.JLSSET3;
29 input name $ sales;
30 datalines;
ERROR: User does not have appropriate authorization level for library TEST.
The UNIX-user 'sasdir34' who actually writes to this UNIX-folder (linked to WorkSpaceServer) can create files via command line on the folder without any problem.
See UNIX-commands :
-bash-4.4$ pwd
/sas/prd/data/DIR_III_4
-bash-4.4$ ls -l
total 14
drwxr-xr-x 12 sasdir34 sastusers 15 Dec 5 10:07 DCU
drwxr-xr-x 49 sasdir34 sastusers 82 Dec 13 11:58 DIR_III_4
lrwxrwxrwx 1 sasdir34 sastusers 25 Nov 26 2012 SHARE_INVORDERING -> /sas/prd/data/invordering
lrwxrwxrwx 1 sasdir34 sastusers 27 Oct 28 2010 Shared_Data_Preparation -> ../Shared_Data_Preparation/
-bash-4.4$ touch SHARE_INVORDERING/OUTPUT/testfile.txt
-> file "test_file.txt" is created in SHARE_INVORDERING/OUTPUT
Any idea why a dataset can't be directly written to UNIX-folder -> via symbol link available?
PS. creating the dataset in WORK and then export to this folder does work :
data work.JLSSET3;
input name $ sales;
datalines;
Steven 40
Jurgen 100
David 150
;
proc export data=JLSSET3
outfile="/sas/prd/data/DIR_III_4/SHARE_INVORDERING/OUTPUT/JLSSET3.xlsx"
dbms=xlsx
replace;
run;
Ask your IT group to look at security permissions, its likely the SAS system account has not been granted the correct permissions.
Be careful with your tests.
touch SHARE_INVORDERING/OUTPUT/testfile.txt
will work, even though you do not have write permission on the directory, when
- the file already exists
- you have write permission on the file
Maybe different SAS options such as DLCREATEDIR?
https://blogs.sas.com/content/sasdummy/2013/07/02/use-dlcreatedir-to-create-folders/
Thanks for your suggestions!
IT admins (of Solaris UNIX) states that if OK for UNIX-user 'sasdir34' to write/read files to OUTPUT-directory from console then OK for him... 😞
drwxrwxr-x 12 sasdir34 saspusers 1374 Dec 13 14:35 OUTPUT
User rights OK
It remains a mistery why it's not possible to create dataset via DATA-step on this folder.
Thanks,
Jurgen
Step through the path and test each folder. Perhaps the access and/or spelling error is not at the last foldername, but somewhere higher in the path.
Are you sure you are testing using the same machine that the SAS process is using? If you have a GRID installation of SAS the machine you use for command prompt is probably a different machine than the one(s) that are used to run the SAS process.
Is the SYMLINK pointing to a different disk or the same disk? I have seen issues with some processes where link to other disks are not followed. Never seen it for SAS though.
Is the SYMLINK pointing to an absolute path? Or a relative path?
Are any of the folders in question mount points? If so are the disks actually mounted?
Thanks for your reply.
We aren't working in a GRID-setup. 1 Solaris server executes all SAS-tasks.
* In folder "/sas/prd/data/DIR_III_4" -> startfolder of this Workspace Server
lrwxrwxrwx 1 sasdir34 sastusers 25 Nov 26 2012 SHARE_INVORDERING -> /sas/prd/data/invordering
* In folder "/sas/prd/data" :
lrwxrwxrwx 1 root root 23 Nov 20 2012 invordering -> /nfs_mounts/invordering
* In file "/etc/vfstab" :
prod2.drsns02.finbel.intra:/landing_invordering - /nfs_mounts/invordering nfs - yes nodevices,vers=3,xattr,zone=zdmsrvp01,sharez
one=7
-> symlink (absolute path) is on a different disk (available via nfs)
-> these disks are mounted since creating files/writing to the disks via SAS is possible via
proc export data=JLSSET3
outfile="/sas/prd/data/DIR_III_4/SHARE_INVORDERING/OUTPUT/JLSSET3.xlsx"
dbms=xlsx
replace;
run;
-> writing through a DATA-step on this folder doesn't work
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.