01-11-2016 07:39 AM
Or using my favorite proc:
proc means data=have nway noprint; class ID; id age; var salary; output out=want (drop=_:) sum=; run;
The id statement copies the age variable to the output dataset (assuming that it is constant within the variable ID).
The nway option hides the total row (all IDs).
The drop= dataset option drops the automatic variables _FREQ_ and _TYPE_.
Hope this helps,