BookmarkSubscribeRSS Feed
rebelde52
Fluorite | Level 6

Hello,

 

so I seem to get my macro program to work but I get this error of 

 

Error: User does not have appropriate authorization level for library "name" ?

 

Followed by the error 

 

Error: Error in the libname statement. 

 

However when I look at my filepath it uses the the libname statement; it incudes the sas dataset and when I look at the security properties on the dateset (B:\Folder1\Folder2\dataset, it shows that I'm allowed to do everything to it except "Special Permission".

 

However, when I look at where the the folder that the dataset is in for example B:\Folder1\Folder2  it shows I dont have all the "allow" checks except on "special permission". 

 

Could that cause an issue or be the source of my problem?

 

 

6 REPLIES 6
SASKiwi
PROC Star

Please post the complete SAS log containing both the SAS statements and errors so we can see exactly what is happening.

rebelde52
Fluorite | Level 6
MLOGIC(CKINPUT):  Beginning execution.
MLOGIC(CKINPUT):  %DO %UNTIL("&msg"="") loop beginning.
MLOGIC(CKINPUT):  %DISPLAY statement beginning.
MLOGIC(ISBLANK):  Beginning execution.
SYMBOLGEN:  Macro variable DOC_PATH resolves to Y:\Folder1\Folder2\Folder3\Folder4\death,
MLOGIC(ISBLANK):  Parameter PARAM has value Y:\Folder1\Folder2\Folder3\Folder4\death
MLOGIC(ISBLANK):  Ending execution.
MLOGIC(ISBLANK):  Beginning execution.
SYMBOLGEN:  Macro variable OUT_PATH resolves to R:\File1\File2\File3\File4\output
MLOGIC(ISBLANK):  Parameter PARAM has value R:\File1\File2\File3\File4\output
MLOGIC(ISBLANK):  Ending execution.
MLOGIC(CKINPUT):  %IF condition NOT ( %isBlank(%bquote(&doc_path)) | %isBlank(%bquote(&out_path))) is TRUE
MLOGIC(DIREXIST):  Beginning execution.
SYMBOLGEN:  Macro variable DOC_PATH resolves to Y:\Folder1\Folder2\Folder3\Folder4\death,
MLOGIC(DIREXIST):  Parameter DIR has value Y:\Folder1\Folder2\Folder3\Folder4\death
ERROR: More positional parameters found than defined.
MLOGIC(DIREXIST):  Ending execution.
MLOGIC(CKINPUT):  %IF condition %DirExist(&doc_path)=0 is FALSE
SYMBOLGEN:  Macro variable DOC_PATH resolves to Y:\Folder1\Folder2\Folder3\Folder4\death,
MPRINT(CKINPUT):   libname d "Y:\Folder1\Folder2\Folder3\Folder4\death,";
ERROR: User does not have appropriate authorization level for library D.
ERROR: Error in the LIBNAME statement.
ballardw
Super User

@rebelde52 wrote:
MLOGIC(CKINPUT):  Beginning execution.
MLOGIC(CKINPUT):  %DO %UNTIL("&msg"="") loop beginning.
MLOGIC(CKINPUT):  %DISPLAY statement beginning.
MLOGIC(ISBLANK):  Beginning execution.
SYMBOLGEN:  Macro variable DOC_PATH resolves to Y:\Folder1\Folder2\Folder3\Folder4\death,
MLOGIC(ISBLANK):  Parameter PARAM has value Y:\Folder1\Folder2\Folder3\Folder4\death
MLOGIC(ISBLANK):  Ending execution.
MLOGIC(ISBLANK):  Beginning execution.
SYMBOLGEN:  Macro variable OUT_PATH resolves to R:\File1\File2\File3\File4\output
MLOGIC(ISBLANK):  Parameter PARAM has value R:\File1\File2\File3\File4\output
MLOGIC(ISBLANK):  Ending execution.
MLOGIC(CKINPUT):  %IF condition NOT ( %isBlank(%bquote(&doc_path)) | %isBlank(%bquote(&out_path))) is TRUE
MLOGIC(DIREXIST):  Beginning execution.
SYMBOLGEN:  Macro variable DOC_PATH resolves to Y:\Folder1\Folder2\Folder3\Folder4\death,
MLOGIC(DIREXIST):  Parameter DIR has value Y:\Folder1\Folder2\Folder3\Folder4\death
ERROR: More positional parameters found than defined.
MLOGIC(DIREXIST):  Ending execution.
MLOGIC(CKINPUT):  %IF condition %DirExist(&doc_path)=0 is FALSE
SYMBOLGEN:  Macro variable DOC_PATH resolves to Y:\Folder1\Folder2\Folder3\Folder4\death,
MPRINT(CKINPUT):   libname d "Y:\Folder1\Folder2\Folder3\Folder4\death,";
ERROR: User does not have appropriate authorization level for library D.
ERROR: Error in the LIBNAME statement.

Do you see the highlighted text in the Libname statement? There should not be any comma in the actual path. That comma is also the likely cause of the "more positional parameters" error. As mentioned in previous threads, commas likely do not belong in macro variables used as parameters for other macros.

 

Since there is very likely no actual folder "death ," that is also why you don't have permissions.

rebelde52
Fluorite | Level 6

Thank you for the reply! 

 

I had a feeling it was the comma. But have to enter that file path in a SAS Window User Interface and it looks like that it only works when I enter a comma in the file path. If I don't have a comma then it does not work. Do you know a work around for that? 

Tom
Super User Tom
Super User

@rebelde52 wrote:

Thank you for the reply! 

 

I had a feeling it was the comma. But have to enter that file path in a SAS Window User Interface and it looks like that it only works when I enter a comma in the file path. If I don't have a comma then it does not work. Do you know a work around for that? 


Then fix whatever is the mistake that that is not letting you enter the actual path.  

SAS Innovate 2025: Register Now

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!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 6 replies
  • 1102 views
  • 3 likes
  • 5 in conversation