Example 8.7 Adding New Observations to the End of a Data Set

Goal

Add new observations to the end of a data set, while retaining the original name of the data set.

Example Features

Featured StepDATA step
Featured Step Options and StatementsSET statement END= option, OUTPUT statement

Input Data Set

Data set FINALSALES contains nine years of final sales results for five categories of books.

                         FINALSALES

   Obs year internet networks       os     apps training 1 2001 $62,529 $49,070 $34,506 $45,055 $79,316 2 2002 $66,068 $50,325 $33,711 $45,640 $75,248 3 2003 $69,785 $46,015 $33,092 $45,841 $77,029 4 2004 $64,115 $46,068 $35,185 $44,273 $76,394 5 2005 $60,832 $51,456 $34,757 $45,015 $79,474 6 2006 $66,635 $46,017 $34,121 $46,006 $78,829 7 2007 $69,696 $50,846 ...

Get Combining and Modifying SAS® Data Sets: Examples Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.