Hi,
As a way of trying to get my head around Proc TEMPLATE and what it can do for me I have been experimenting a bit, but have now got stuck. In short, I need a hand to amend the ODS table template that controls how the Attributes report in a Proc CONTENTS appears.
I started off tinkering with the ODS table template that controls how the report from Proc MEANS appears to the user (shown left, below).
I have successfully created a private copy of an out-of-the-box table template for Base.Summary and tweeked the definition so that when I invoke that private template with a Proc MEANS, the output shows my minor customisations (shown below, right).
So far, so good.I've applied a modified table header (text and background colour), also changed the column header for [N Obs] to read [Count of Rows] and assigned magenta to the colour for the values in that column. Finally, I applied a nice COMMA14.2 format to the values in the [Sum] column.
The changes to the format of the values shown in the [N Obs] and [Sum] columns and the table headings were done very much by looking at the source code of the original table template and then feeling around in the dark, but I was pretty chuffed by what I achieved.
In order to apply the comma separators to the values in the [Sum] column, I made the following customisation to the table template:
The out-of-the-box table template had this definition for the [Sum] column:
define sum; header = "Sum"; generic; end;
My private table template then had the format line added and all was well when it was invoked:
define sum; header = "Sum"; format=comma14.2; generic; end;
Now, what I really want to do next is to create a private table template that will allow me to customise the values that I see in the output from a simple Proc CONTENTS. The screenshot below is from the Attributes report of Proc CONTENTS.
I would like to find out how I can amend the out-of-the-box table template Base.Contents.Attributes so that the value adjacent to the [Observations] label appears with comma separators and the values adjacent to the [Created] and [Last Modified] labels appear in a different datetime format to what is shown above. For this exercise, I am not worried about the actual format, I just what to know how I can amend the out-of-the-box table template to satisfy my needs.
I am a bit stuck because the out-of-the-box table template Base.Contents.Attributes defines two pairs of columns as LABEL1, CVALUE1 and LABEL2, CVALUE2 and as each of the CVALUEn columns contain a mixture of numeric values (such as Observations, Variables, Observation Length) and character values (such as Compressed and Sorted), I have been unsuccessful in pulling off my simple trick from Proc MEANS whereby I simply apply a numeric format to the definition.
If anyone out there in the SAS world has either done this already or might be able to explain how to do it I would greatly appreciate it.
Many thanks,
Downunder Dave
Wellington
... View more