October 2009
Beginner
636 pages
13h 35m
English
The example "Controlling the Layout of the Output" earlier in this chapter placed blank lines between BY groups of a report. Let's refine that example so that when the DATA step processes the last observation in a BY group, it lists informative text and the total number of events for that BY group, rather than just writing a blank line.
The program uses standard DATA step logic to retain the total variable ITOT, which will contain the number of events in a BY group. When processing the first observation in a BY group, the DATA step initializes its value to 1. Its value is incremented by 1 in the ELSE DO group each time the DATA step processes a subsequent observation in the BY group. The last PUT statement ...
Read now
Unlock full access