This will explain how to use the metadata to generate a variety of tables using the gen_table macro
Tables can be generated with either a single category column or a category and subcategory column the column widths can be changed in the output macro call using the catwidth and subcatwidth macro parameters as can the labels see %output_gentab