Chapter Contents

Previous

Next
The DATASETS Procedure

Example 2: Saving SAS Files from Deletion


Procedure features:
SAVE statement option:
MEMTYPE=

This example uses the SAVE statement to save some SAS files from deletion and to delete other SAS files.


Program
 Note about code
options pagesize=40 linesize=80 nodate pageno=1 source;

libname elder 'SAS-data-library';
 Note about code
   proc datasets lib=elder;
 Note about code
      save chronic aging clinics / memtype=data;
   run;



SAS Log
 Note about figure
      
8   options pagesize=40 linesize=80 nodate pageno=1 source;
9   
10      proc datasets lib=elder;
                              -----Directory-----

Libref:            ELDER                                                        
Engine:            V8                                                           
Physical Name:     UNIX-pathname                                     
File Name:         UNIX-pathname                                     
Inode Number:      Inode-name                                        
Access Permission: rwxr-xr-x                                                    
Owner Name:        UNIX-userid                                       
File Size (bytes): 2048                                                         


                                       File
               #  Name      Memtype    size  Last modified
               -------------------------------------------------
               1  AGING     DATA      12288   29JAN1999:13:29:33
               2  ALCOHOL   DATA      12288   29JAN1999:13:29:33
               3  BACKPAIN  DATA      12288   29JAN1999:13:29:33
               4  CHRONIC   DATA      12288   29JAN1999:13:29:33
               5  CLINICS   CATALOG   24576   29JAN1999:13:29:33
               6  CLINICS   DATA      12288   29JAN1999:13:29:33
               7  DISEASE   DATA      12288   29JAN1999:13:29:33
               8  GROWTH    DATA      12288   29JAN1999:13:29:33
               9  HOSPITAL  CATALOG   24576   29JAN1999:13:29:33
11   
12         save chronic aging clinics / memtype=data;
13      run;
NOTE: Saving ELDER.CHRONIC (memtype=DATA).
NOTE: Saving ELDER.AGING (memtype=DATA).
NOTE: Saving ELDER.CLINICS (memtype=DATA).
NOTE: Deleting ELDER.ALCOHOL (memtype=DATA).
NOTE: Deleting ELDER.BACKPAIN (memtype=DATA).
NOTE: Deleting ELDER.CLINICS (memtype=CATALOG).
NOTE: Deleting ELDER.DISEASE (memtype=DATA).
NOTE: Deleting ELDER.GROWTH (memtype=DATA).
NOTE: Deleting ELDER.HOSPITAL (memtype=CATALOG).


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.