Generating a Correct SAS Program
When the scope of this task was originally defined, there were two main scenarios that it was designed to support: calculate a running total value for a single column, and calculate a running total value for a column where you can reset the running total value for each new grouping.
In either scenario, the resulting program is going to be short—just a few lines of SAS DATA step code. Therefore, it shouldn't be too much trouble to generate the code statements inline in the task logic. (Compare this approach with the approach that you took in the Top N Report in Chapter 9, where you embedded a .SAS file as a program template in the task.)
The GetSasProgram() method in the RunningTotalsSettings.cs file contains all ...