Posts

Showing posts with the label Nolist

Clean-Up: Delete datasets in the work library:

It is better always to clean-up/empty the work directory before we run the next set of SAS code. This is VERY helpful in situations where the “working” files created tend to use up a large amount of memory, once the logic of the program has been checked, KILLing the working files will result in a more efficient program. Another important reason to issue the above statement at the end of a program is when programs are run in batch, this will clean up the working library to be sure any “old” files are not left around to be erroneously used1. PROC DATASETS procedure offers an elegant solution to do just. Remember that there is no need of knowing any dataset names when we are emptying the work directory. Here is the simple syntax: proc datasets lib=work kill nolist memtype=data; quit; We have specified lib=work, because we are cleaning up the work directory. KILL option removes all the datasets that are happened to be in the work directory. NOLIST option tells SAS, printing the details...