/**********************************************************/
   /*                                                        */
   /* This program is used during the nightly update         */      
   /* procedure.                                             */      
   /*   o The transaction data set is sorted by employee     */       
   /*     number                                             */      
   /*   o An update takes the master data set and updates    */   
   /*     it with changes from the transaction data set      */   
   /*   o The old transaction data set is deleted and a new  */   
   /*     transaction data set is created.                   */
   /*                                                        */
   /**********************************************************/   

libname observe 'a';                                       
proc sort data=daily.trans;           /*  Sort transaction   */   
   by empno;                                                 
data observe.master;                  /*  Update master      */   
   update observe.master daily.trans;                        
   by empno;                                                 
proc datasets library=observe;                             
   modify master;                                            
   index create empno;                                       
run;                                                       

data daily.trans;
   set daily.trans;
   stop;
run;