You said "... for those that are trying to get the SAS to work without prior 
knowledge of the language, the nigglers'll point out that RETAIN DATA 
DATARDW; and RETAIN BDW; are missing (actual location is irrelevant) 
from the respective DATA steps.  It's only a minor thing and doesn't 
affect the excellent concept(s) espoused."

The variables DATARDW and BDW absolutely must be "retained" from observation
to observation; otherwise they would be reset with each new input observation,
and they would NOT contain the sum at the end of the file.

However, it is not necessary to use an explicit RETAIN statement, when you,
instead, use the "SUM Statement" syntax, which has an implied retain:

    The SUM statement has syntax   A + B ;
       i.e.,  DATARDW+(LEN+4);
    which is the same as           A=A+B; RETAIN A;

I had intended to add this mini-tutorial on why the code worked and that
the implied or explicit RETAIN is a critical part of the logic, but forgot.



Barry

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to