Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- data Avg_salary;
- set fltat;
- by jobcode;
- if jobcode = 'FLTAT1' then do;
- tots + salary; *tots = total salary;
- end;
- else if jobcode = 'FLTAT2' then do;
- tots + salary;
- end;
- else if jobcode = 'FLTAT2' then do;
- tots + salary;
- end;
- if first.jobcode = 1 then do;
- bros = 0;
- tots = salary;
- mcgotes = 0; *mcgotes = number of people;
- end;
- bros + 1; *bros = flight attendents;
- mcgotes + 1;
- average = round(tots/mcgotes, .0001); *NOTE: "tots mcgotes" just made the code;
- label jobcode = 'Job Code'
- average = 'Running Average'
- bros = 'Number of Employees';
- if last.jobcode = 1 or mcgotes <=3;
- keep jobcode bros average;
- format average dollar10.2;
- run;
Add Comment
Please, Sign In to add comment