"ERROR: Permanent copy of file Libref.Entity.UTILITY was deleted" might be generated when you run a SAS® procedure or DATA step on Microsoft Windows


The following error message might occur when you run a SAS procedure or a DATA step in a Microsoft Windows operating environment:

ERROR: Permanent copy of file LIBREF.entity.UTILITY was deleted.

The file information might be similar the following:

WORK._tf000NN.UTILITY  /* Where NN is a number. */
WORK.'SASTMP-000NN'n.UTILITY /* Where NN is a number. */
WORK.ZFMMEM.UTILITY
WORK.SASMACR.CATALOG

The error indicates that a utility file that is created by SAS is being locked, moved, or removed by a process external to SAS. This condition is most likely caused by the scanning or quarantine activity of an antivirus application.

To circumvent the problem, it should be possible to configure such applications to avoid scanning certain drives, directories, or file types. Set the application to exclude files with the following extensions from scanning:

.SAS*

.UTL*   <-- the error has this one

.LCK

.sd2

.sc2

.sd7

.sc7

.SPDS

.UTILITY

Note the "star*" in .SAS* and .UTL*. This is to include extensions that start with these letters such as .sas7bdat.

Here is a more complete list of extensions that start with 'sas*':

.sas7bdat /* DATA */

.sas7butl /* UTILITY */

.sas7bput /* PUTILITY */

.sas7bcat /* CATALOG */

.sas7bpgm /* PROGRAM */

.sas7bndx /* INDEX */

.sas7bvew /* VIEW */

.sas7bacs /* ACCESS */

.sas7bmdb /* MDDB */

.sas7bfdb /* FDB */

.sas7bitm /* ITEMSTOR */

.sas7baud /* AUDIT */

.sas7bbak /* BACKUP */

.sas7bdmd /* DMDB */

.sas7bods /* SASODS */

.sas /* SAS program file */

Note: Depending on how the exclusion list works, it might be better to list each file type.