Hi all,
I get this error when the program is going to create a dataset on a Linux server and has not yet deleted it. This program is made in SAS Data Integration, so I have many programs that drop a table and then create it to replace it.
I have observed that this error appears in certain programs that create a table with small size. Sometimes this error appears, and sometimes it does not. I think SAS drops the table and tries to create it when it hasn't dropped it yet.
Is there any parameter to fix this?
MPRINT(EXECUTION): ; MPRINT(EXECUTION): option DBIDIRECTEXEC; MPRINT(EXECUTION): proc datasets lib = TEST nolist nowarn memtype = (data view); MPRINT(EXECUTION): delete TEMP_DAT_CONCEP; MPRINT(EXECUTION): quit; NOTE: Deleting TEST.TEMP_DAT_CONCEP (memtype=DATA). 23 The SAS System 02:07 Tuesday, May 18, 2021 NOTE: PROCEDURE DATASETS ha utilizzato (tempo totale di elaborazione): real time 0.10 seconds cpu time 0.00 seconds MPRINT(EXECUTION): proc sql; MPRINT(EXECUTION): create table TEST.TEMP_DAT_CONCEP as select .................... from work.example ; ERROR: User does not have appropriate authorization level for file TEST.TEMP_DAT_CONCEP.DATA.
Fist thing i would want you to check is, what are your permissions on the linux directory that you are trying to write to.
How is library TEST defined?
Is it a Base SAS library, or something else? Is it assigned through a simple LIBNAME statement (by you or in the autoexec file), or is it defined in metadata and pre-assigned?
If Base SAS, where does it reside? Local to the SAS server, or on a network share?
If, by "directory server", you mean a network share, then you may have a timing issue; add a short delay between the remove and the write, e,g,
%let rc=%sysfunc(sleep(5,1));
Also, in case of a failure, do immediately check if the delete in the DATASETS procedure worked (use Windows Explorer or similar to see if the .sas7bdat file still exists).
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
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.
Ready to level-up your skills? Choose your own adventure.