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:
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毙
The code that produced the above output is here:
where country in ('CANADA', 'GERMANY');
comp = country;
var1 = prodtype;
var2 = region;
analyse = actual;
Depending on what you mean per Cynthia's questions, I have had occasion to want both a code and text at the same time. My approach has been, in the steps that create the input data set, to create a new text variable that is the concatenation of the code and the text. Pick the order to concatenate depending on how you want the sort order in the tables.