www.sas.com > Service and Support > Technical Support
 
Technical Support SAS - The power to know(tm)
  TS Home | Intro to Services | News and Info | Contact TS | Site Map | FAQ | Feedback


PROC DATASETS SAMPLES
_____________________



  data one;                 /* Sample dataset   */
   do i = 10 to 1;
      j = i*10;
      k = j;
      output;
   end;

  proc datasets library=work;                                       
    modify one;                                                     
                                                                    
      index create j;          /* Create an INDEX    */             
                                                                    
      index delete j;          /* Delete the INDEX   */             
                                                                    
      format i  12.;           /* Format a Variable  */             
                                                                    
      label i = 'i variable';  /* Create a LABEL    */              
                                                                    
      rename k = kvar;         /* RENAME a Variable  */             
                                                                    
    repair one;                /* REPAIR the Data set */            
                                                                    
    change one = newone;       /* RENAME a Data set  */             
                                                                    
    contents data=newone;      /* Print CONTENTS of a data set */   
                                                                    
    age newone day1-day7;      /* AGE the data set.            */   
                               /* NEWONE becomes DAY1, DAY1    */   
                               /* becomes DAY2, etc.           */   
                                                                    
    delete day1;               /* DELETE the data set          */   
                                                                    
  run;                                                              


Copyright (c) 2002 SAS Institute Inc. All Rights Reserved.
Terms of Use & Legal Information | Privacy Statement