Hi:
In your question, you say that you need "the same column two times". However, in your code, you only show the use of VAR1 and VAR2 one time each in the TABLE statement. For example, given this output table from TABULATE for 1 value of COMP:
[pre]
comp=CANADA
+------------------------------------------------+
| | 1993 | 1994 |
+----------------------+------------+------------+
|EAST |FURNITURE | 26950.00| 24370.00|
| +-----------+------------+------------+
| |OFFICE | 37180.00| 38985.00|
| +-----------+------------+------------+
| |Total | 64130.00| 63355.00|
+----------+-----------+------------+------------+
|WEST |FURNITURE | 21614.00| 24930.00|
| +-----------+------------+------------+
| |OFFICE | 35276.00| 37685.00|
| +-----------+------------+------------+
| |Total | 56890.00| 62615.00|
+------------------------------------------------+
[/pre]
Let's assume that EAST/WEST are values for VAR2 and that FURNITURE/OFFICE are values for VAR1. How do you envision using "the same column two times", given the above example????? Since you did not show your data, your desired output or your formats, it is hard to imagine what you want.
If you want to post output or sample data or program code to the forum, in order to protect > and < symbols, preserve code and output indention and to otherwise learn how to post special symbols to the forum, refer to this previous forum posting. It talks about the LT and GT symbols and also discusses how to emphasize code and how to surround code snippets and output results with [pre] and [/pre]
http://support.sas.com/forums/thread.jspa?messageID=27609毙
cynthia
The code that produced the above output is here:
[pre]
data mydata;
set sashelp.prdsale;
where country in ('CANADA', 'GERMANY');
comp = country;
var1 = prodtype;
var2 = region;
analyse = actual;
run;
options nocenter;
proc tabulate data= Mydata missing order=data
formchar='|-+-+++++-+';
class year var1 var2 ;
var analyse;
table (var2='' * (var1='' all='Total') ),
(year='' * analyse=''*sum='');
by comp;
run;
[/pre]