hello
data HAVE ; x=1; run ; %let mv_id_table = %sysfunc(open(work.HAVE)); proc datasets library=WORK memtype=data nolist; delete HAVE ; quit ;
by executing this code, the note is "File WORK.HAVE (memtype=DATA) cannot be deleted because it is in use."
how could I close the HAVE table ?
thanks in advance for your help
regards
Nasser
Close the file before attempting to delete it:
%let rc= %sysfunc(close(&mv_id_table ));
View solution in original post
When you open a DATASET (as opposed some generic FILE) with the OPEN() function it returns a reference to that dataset. So to close it you pass that reference back to the CLOSE() function.
%let rc=%sysfunc(close(&mv_id_table)) ;
April 27 - 30 | GAYLORD TEXAN
Register now to lock in early bird pricing through February 25!
SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.
Find more tutorials on the SAS Users YouTube channel.