Guest User

Untitled

a guest
Jan 21st, 2018
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. data Avg_salary;
  2. set fltat;
  3. by jobcode;
  4. if jobcode = 'FLTAT1' then do;
  5. tots + salary; *tots = total salary;
  6. end;
  7. else if jobcode = 'FLTAT2' then do;
  8. tots + salary;
  9. end;
  10. else if jobcode = 'FLTAT2' then do;
  11. tots + salary;
  12. end;
  13. if first.jobcode = 1 then do;
  14. bros = 0;
  15. tots = salary;
  16. mcgotes = 0; *mcgotes = number of people;
  17. end;
  18. bros + 1; *bros = flight attendents;
  19. mcgotes + 1;
  20. average = round(tots/mcgotes, .0001); *NOTE: "tots mcgotes" just made the code;
  21. label jobcode = 'Job Code'
  22. average = 'Running Average'
  23. bros = 'Number of Employees';
  24. if last.jobcode = 1 or mcgotes <=3;
  25. keep jobcode bros average;
  26. format average dollar10.2;
  27. run;
Add Comment
Please, Sign In to add comment