Hi:
Somehow, I think the indenting that you want to use is getting lost in the forum posting mechanism. For more information on how to post code and maintain indenting in future posts, this is useful information:
http://support.sas.com/forums/thread.jspa?messageID=27609毙
What I think you're saying is that you are getting this:
[pre]
ID name Col1 Col2 Col3
1 abc ATT Tmobile Verizon
2 def ATT Tmobile
3 ghi Verizon
[/pre]
with "mixed" information in the COL1 variable and that's not what you want.
I think you mean that you
want this:
[pre]
ID name Col1 Col2 Col3
1 abc ATT Tmobile Verizon
2 def ATT Tmobile
3 ghi Verizon
[/pre]
So that COL1 is ALWAYS ATT and COL2 is ALWAYS Tmobile and COL3 is ALWAYS Verizon. Is that what you mean???
Is the above the report you want or is it the structure of the dataset that you want? Generally, if you wanted to see a report grouped in such a way (so that the Affiliation_name values were going across the top of the report), you might use PROC TABULATE or PROC REPORT and then in the cells underneath the Affiliation_name, you might see some number, such as a count, a percent or some other statistic, such as number of customers, amount of sales, number of minutes, etc. Simple counts (the N statistic) are shown in the program below without using PROC TRANSPOSE.
cynthia
[pre]
data mydata;
infile datalines;
input ID name $ Affiliation_name $;
return;
datalines;
1 abc ATT
1 abc Tmobile
1 abc Verizon
2 def ATT
2 def Tmobile
3 ghi Verizon
;
run;
ods listing;
proc tabulate data=mydata f=comma8.;
class name affiliation_name;
table name all,
affiliation_name all;
run;
proc report data=mydata nowd;
column name (affiliation_name,n) n;
define name / group;
define affiliation_name / across;
define n / f=comma8.;
rbreak after / summarize;
run;
[/pre]