Advertisement
Guest User

Untitled

a guest
Oct 14th, 2019
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SAS 0.50 KB | None | 0 0
  1. data WORK.Retail1993;
  2.     LENGTH id $1;
  3.     set WORK.Retail1993;
  4.     id=_n_;
  5. run;
  6.  
  7. data WORK.Retail1994;
  8.     LENGTH id $1;
  9.     set WORK.Retail1994;
  10.     id=_n_;
  11. run;
  12.  
  13. data WORK.Retail1993;
  14.     set WORK.Retail1993;
  15.     if(id = 1) then
  16.     Sales1993 = Sales;
  17.     IF (Sales1993 = " ") then
  18.     delete;
  19. run;
  20.  
  21. data WORK.Retail1994;
  22.     set WORK.Retail1994;
  23.     if(id = 1) then
  24.     Sales1994 = Sales;
  25.     IF (Sales1994 = " ") then
  26.     delete;
  27. run;
  28.  
  29. Data TopSales(Keep=Sales1993 Sales1994);
  30.     Set WORK.Retail1993; Set WORK.Retail1994;
  31. Run;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement