Example 5.2 Adding Values from the Last Observation in a Data Set to All Observations in a Data Set
Combine values from the last observation in one data set to all observations in another data set.
|Featured Step||DATA step|
|Featured Step Options and Statements||IF _N_=1 statement SET statement, POINT= and NOBS= options|
|Related Technique||PROC SQL, Cartesian product, subquery, MAX function|
Input Data Sets
Data set MANAGERS contains a list of managers for a group over time.
MANAGERS Obs mgrdate manager 1 07/12/2005 Butler, RE 2 01/15/2006 Wright, MV 3 11/15/2006 Freeman, OG 4 06/10/2007 Jenkins, UI 5 12/03/2007 Phillips, OB 6 01/15/2008 Myers, SC 7 05/15/2008 Brown, HU
Data set EMPLIST contains a list of employees in the group. ...