First fix errors in your code/date. You are attempting to use a variable A_cnt as a VAR variable in Proc Tabulate. All Var variables, which are those that use statistics like SUM, STDDEV and such must be numeric.
Why do you make A_cnt and B_cnt character values?
Also you show values in variable L_1 of "A1" and "a1". Those will be different values in SAS and create different "totals" if you are using other more complex data later. Your desired output shows all the values of L_1 and L_2 in upper case. So with the example data shown there is not going to be an "easy" way to do such. You should make sure the values are as expected before sending them to Proc Tabulate.
Also, what is the variable Dum supposed to represent???
Your bottom "summary" rows are introducing the variable a sum in a column and row both. Tabulate doesn't do such the way it appears you are thinking.
You some things that are not easily done in tabulate such as what appear to be section headers like "Sum of A_cnt" and offset row/column headers. So you may have to discuss which is critical to appearance as you may have to move to a different procedure and quite possibly summarize the data before creating a report.
Suggestion: any time you have things that resemble dates try to provide a date value. SAS knows how to order those.
Random collections of letters like "jan" "feb" "mar" mean nothing and you will have to provide all the additional work to get them to display in order.
... View more