BookmarkSubscribeRSS Feed
jurlis
Fluorite | Level 6

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;

6 REPLIES 6
RW9
Diamond | Level 26 RW9
Diamond | Level 26

Ask your IT group to look at security permissions, its likely the SAS system account has not been granted the correct permissions.

Kurt_Bremser
Super User

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

jurlis
Fluorite | Level 6

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

 

 

 

 

Tom
Super User Tom
Super User

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?

 

 

jurlis
Fluorite | Level 6

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

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is Bayesian Analysis?

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.

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
  • 6 replies
  • 1137 views
  • 0 likes
  • 5 in conversation