Hi:
It is very hard without knowing how the macro variable &S_TOT is created and whether the dataset WORK.DUSTY has a variable called DEPT. Your program seems to be a small piece of a bigger process. The macro facility is involved -- you have 2 forms of macro variable referencing -- the &S_TOT value will be resolved at code compile time. It must be something like the grand total of all the salaries across all the departments.
Let's say that WORK.DUSTY has values for DEPT like ACCT or MIS, then that would mean the macro variables &SACCT or &SMIS would resolve at data step execution time, because of the SYMGET, based on the current value of DEPT being read. Whatever value that was stored in the macro variable &SACCT or &SMIS would get used in the division. I would guess that these macro variables store some number that is appropriate at the department level. Without knowing more about the data that is stored in the SALARY variable on every obs, it is hard to comment on whether the result of the division will be the correct percent you want. Again, we come back to what is in WORK.DUSTY, how was it created and how were the macro variables created and what is the purpose and desired output of this program.
One thing you can do to figure out what's happening is to turn on all the possible debugging techniques for revealing macro processing:
[pre]
options mprint symbolgen mlogic;
[/pre]
and run the program, look in the log and see if you can trace back from this program to the place or program where the macro variables are created. The documentation on SYMGET is here:
http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000202938.htm
http://support.sas.com/documentation/cdl/en/mcrolref/61885/HTML/default/viewer.htm#a000210322.htm
These papers provide a good introduction to the Macro facility:
http://www2.sas.com/proceedings/sugi28/056-28.pdf
http://www2.sas.com/proceedings/sugi30/130-30.pdf
cynthia