In reply to Derek Hu.

Hi Derek,
I also was not able to find this described explicitly, but I believe you are correct. The data step b will not be compiled (will be waiting in the input stack) until all the macro invocations '%sales' generated by the data step a will be executed. Only then data step b will be compiled and executed.
Hope this helps.