This should be the most easier to chase issue but it is not. A regular puzzle.
Context
ODD
/*This failed*/
libname jndl "\\faris\studies\2022\imaging_ai\JNDL_LD"; data jndl.fnl; set xyz; /* a simple step formatting dates */ run;
ERROR: User does not have appropriate authorization level for file JNDL.FNL.DATA
/* down few steps of the same code, note the set statement */
data final; set jndl.fnl ; /*did this not error out above ...huh */ ... more format type steps run;
NOTE: There were 100 observations read from the data set JNDL.FNL
This does not make sense to me, I have checked the user's file system permission and user has "special permissions" on JNDL_LD physical folder and viewing 'advance setting' the full permission = full control.
I am looking for any tips ideas to what else to check ...
Meanwhile, preparing to read, write in different simple step scheduled code mimicking R & W to JNDL_LD.
TIA
S
Most probably, the dataset is already there and was created by another user. And only this user has write permission on the dataset file.
BTW, same code via EG executes and overwrites the pre-existing dataset in the UNC path, only in batch it errors on the same step.
TIA
quick update, the user is the same who tries with EG (successful) and batch (fails with authorization error) and this user has 'full permission' on the said folder's parent
As I understand it, the batch job too is running from the desktop and you have a local installation.
If that is indeed correct, mount the remote location and assign a drive letter. For example "X".
Thus if \\faris is mounted at the drive X on your local desktop, then the libname would be
libname jndl "X:\studies\2022\imaging_ai\JNDL_LD";
For all practical purposes the remote location behaves as a local drive. It should work with both EG and in batch mode.
Having permission to read but not to write is not unusual.
Is SAS running on Windows operating system? Windows file systems can have very complex permissions. Someone once created a write only directory for me: that was very hard to use.
Is everyone using Enterprise Guide to submit the SAS code? Are they connecting to the same SAS server? Or are some using SAS directly? Or running on their local machine?
Is there a dataset with that name in the folder already? What are the permissions on that file? Who is the owner?
Are you using managed librefs that are created automatically by SAS when your session starts? Or did all of the test runs have to execute their own libname statement to define the libref?
*** Update ***
In troubleshooting, found the following:
For AD and file system security the owner ID has "full permission" also confirmed with effective permission list.
Is there a SAS option that affects the said behavior of not overwriting an existing dataset? (better to ask than to wonder).
TIA
S
Hello @shoin
Your two codes are not identical. In the following you are reading data. Indicates you have read permissions.
data final;
set jndl.fnl ; /*did this not error out above ...huh */
... more format type steps
run;
NOTE: There were 100 observations read from the data set JNDL.FNL
In the following you are creating a file, The error nessage is clear. It says you do not have permission to write permissions to that folder.
libname jndl "Assuming that \\faris\Astudies\2022\imaging_ai\JNDL_LD";
data jndl.fnl;
set xyz; /* a simple step formatting dates */
run;
ERROR: User does not have appropriate authorization level for file JNDL.FNL.DATA
Assuming that \\faris\ represents a remote server \ storage location,
contact your System Administrators for assistance. Typically SAS Adminsitrators can check for permissions but the OS/AD level changes may be required depending upon how these are done at your organization.
It sounds like further diagnosing of your SAS environment is required to get a resolution of this problem. Raising a Tech Support track in this case should help if you haven't done so already. I assume you are using the same user account to both connect to SAS via EG and to schedule the same job in batch mode.
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.