I have a dataset
data LVG1;
set LVG;
by ln_no;
if comm_cd = 'CPBFOR' then CPBFOR=comm_dt ;
if comm_cd = 'SNTLVG' then SNTLVG=comm_dt ;
if comm_cd = 'UPBFOR' then UPBFOR=comm_dt ;
if ltr_id = 'RG901' then RG901=ltr_dt;
if ltr_id = 'RG902' then RG902=ltr_dt;
if ltr_id = 'RG903' then RG903=ltr_dt;
if ltr_id = 'CK007' then CK007=ltr_dt;
if ltr_id = 'CK009' then CK009=ltr_dt;
/*if SNTLVG >=d_LM_ACTIVATION_DT;*/
format CPBFOR SNTLVG UPBFOR RG901 RG902 RG903 CK007 CK009 mmddyy10.;
run;
I produced a proc transpose to capture the ln_no once and the individual comm_cd and ltr_id horizontally
proc transpose data= lvg1 out=lvg2
by ln_no;
var CPBFOR SNTLVG UPBFOR RG901 RG902 RG903 CK007 CK009 ;
run;
By default the proc transpose produces the ln_no and columns. Even though I have identified 8 vars, I only get 4 columns in my proc transpose. Why am only getting 4 columns when I have identified 8 variables (var)