I am writing a macro to create customized reports by combining output from Proc GLM ODS tables (ParameterEstimates and ModelANOVA). The report needs to accommodate not only varying numbers of main effects, but also interactions of varying orders. Processing is conditional based on effect labels for each model term, which are extracted from the ODS datasets. I realize that the Proc GLM option NAMELEN= can be used to specify the length of effect names in tables and output datasets (default=20); however, in no SAS manuals, online FAQs, or other documentation have I found a description of the algorithm used by SAS to abbreviate variable names into effect labels of the specified length. For main effect terms, the effect labels appear to be a simple truncation of the variable name if it exceeds the specified length. For interactions, though, effect labels do not appear to be simple, equal truncations of the constituent variable names; but it is not obvious what algorithm is being using to abbreviate the constituent variable names, joined by '*'s, into effect labels. This seems like such a simple problem that I must be overlooking something obvious. Any thoughts or insights would be greatly appreciated! ~ Richard
... View more