All YOUR Questions Answered at
[sas.answers @ Holland Numerics]
WebRing
Sponsored Links for SAS Software Users
Careers, Jobs and Contracts, Services and Products

Frequently Asked Questions about SAS Software

The following Question & Answer List is based on SAS questions received by the author.

Allocating and Deleting Files

Question Answer
How can I make sure that a file does not exist before I start processing? You can now use a number of SCL functions in Base SAS data steps in SAS version 6.12, e.g.:
FILENAME datafil 'datafil1.dat';
 
DATA _NULL_;
  rc=FDELETE('datafil');
  SELECT (rc);
    WHEN (0) put 'File has been deleted!';
    WHEN (20006) put 'File does not exist!';
    OTHERWISE;
  END;
  STOP;
RUN;
 
FILENAME datafil CLEAR;
Can I delete all the datasets in the WORK data library? Yes, if you only want to delete the DATA files in the WORK data library, then try the following sample code:
PROC DATASETS LIB=work;
  DELETE _ALL_ / MEMTYPE=DATA;
RUN;

If you want to delete everything in the WORK data library, including compiled macros, program catalogs, views, etc., then try the following sample code:

PROC DATASETS LIB=work KILL;
RUN;

     Back to Main FAQ Menu
Number of visitors = Counter (since 15th May 2000)

Email: Phil Holland <phil.holland@bcs.org.uk>

Web Design by Holland Numerics

Valid HTML 4.01!