<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic ODS Customise the appearance of the Proc CONTENTS Attributes report in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-Customise-the-appearance-of-the-Proc-CONTENTS-Attributes/m-p/523981#M22129</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;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.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I started off tinkering with the ODS table template that controls how the report from Proc MEANS appears to the user (shown left, below).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have successfully created a private copy of an out-of-the-box table template for &lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;Base.Summary&lt;/FONT&gt;&lt;/STRONG&gt; 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).&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2019-01-01_13h07_01.png" style="width: 286px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/25923i93657304B692D884/image-dimensions/286x301?v=v2" width="286" height="301" role="button" title="2019-01-01_13h07_01.png" alt="2019-01-01_13h07_01.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2019-01-01_13h07_18.png" style="width: 341px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/25924i0C1B643493C81838/image-dimensions/341x305?v=v2" width="341" height="305" role="button" title="2019-01-01_13h07_18.png" alt="2019-01-01_13h07_18.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So far, so good.I've applied a modified table header (text and background colour), also changed the column header for [&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;N Obs&lt;/STRONG&gt;&lt;/FONT&gt;] to read [&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;Count of Rows&lt;/FONT&gt;&lt;/STRONG&gt;] 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 [&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;Sum&lt;/FONT&gt;&lt;/STRONG&gt;] column.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The changes to the format of the values shown in the [&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;N Obs&lt;/FONT&gt;&lt;/STRONG&gt;] and [&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;Sum&lt;/STRONG&gt;&lt;/FONT&gt;] 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.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In order to apply the comma separators to the values in the [&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;Sum&lt;/FONT&gt;&lt;/STRONG&gt;] column, I made the following customisation to the table template:&lt;/P&gt;
&lt;P&gt;The out-of-the-box table template had this definition for the [&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;Sum&lt;/STRONG&gt;&lt;/FONT&gt;] column:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; define sum;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; header = "Sum"; &amp;nbsp;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; generic;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;My private table template then had the &lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;format&lt;/FONT&gt; &lt;/STRONG&gt;line added and all was well when it was invoked:&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; define sum;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; header = "Sum"; &amp;nbsp;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color="#FF00FF"&gt;format=comma14.2; &lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; generic;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;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.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2019-01-01_13h17_02.png" style="width: 434px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/25925i53FF8B9A9E090224/image-dimensions/434x225?v=v2" width="434" height="225" role="button" title="2019-01-01_13h17_02.png" alt="2019-01-01_13h17_02.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would like to find out how I can amend the out-of-the-box table template &lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;Base.Contents.Attributes&lt;/FONT&gt;&lt;/STRONG&gt; so that the value adjacent to the [&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;Observations&lt;/STRONG&gt;&lt;/FONT&gt;] label appears with comma separators and the values adjacent to the [&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;Created&lt;/FONT&gt;&lt;/STRONG&gt;] and [&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;Last Modified&lt;/STRONG&gt;&lt;/FONT&gt;] 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.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am a bit stuck because the out-of-the-box table template &lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;Base.Contents.Attributes&lt;/FONT&gt;&lt;/STRONG&gt; 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.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;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.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Many thanks,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Downunder Dave&lt;/P&gt;
&lt;P&gt;Wellington&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 01 Jan 2019 01:11:20 GMT</pubDate>
    <dc:creator>DaveShea</dc:creator>
    <dc:date>2019-01-01T01:11:20Z</dc:date>
    <item>
      <title>ODS Customise the appearance of the Proc CONTENTS Attributes report</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-Customise-the-appearance-of-the-Proc-CONTENTS-Attributes/m-p/523981#M22129</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;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.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I started off tinkering with the ODS table template that controls how the report from Proc MEANS appears to the user (shown left, below).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have successfully created a private copy of an out-of-the-box table template for &lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;Base.Summary&lt;/FONT&gt;&lt;/STRONG&gt; 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).&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2019-01-01_13h07_01.png" style="width: 286px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/25923i93657304B692D884/image-dimensions/286x301?v=v2" width="286" height="301" role="button" title="2019-01-01_13h07_01.png" alt="2019-01-01_13h07_01.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2019-01-01_13h07_18.png" style="width: 341px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/25924i0C1B643493C81838/image-dimensions/341x305?v=v2" width="341" height="305" role="button" title="2019-01-01_13h07_18.png" alt="2019-01-01_13h07_18.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So far, so good.I've applied a modified table header (text and background colour), also changed the column header for [&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;N Obs&lt;/STRONG&gt;&lt;/FONT&gt;] to read [&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;Count of Rows&lt;/FONT&gt;&lt;/STRONG&gt;] 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 [&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;Sum&lt;/FONT&gt;&lt;/STRONG&gt;] column.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The changes to the format of the values shown in the [&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;N Obs&lt;/FONT&gt;&lt;/STRONG&gt;] and [&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;Sum&lt;/STRONG&gt;&lt;/FONT&gt;] 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.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In order to apply the comma separators to the values in the [&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;Sum&lt;/FONT&gt;&lt;/STRONG&gt;] column, I made the following customisation to the table template:&lt;/P&gt;
&lt;P&gt;The out-of-the-box table template had this definition for the [&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;Sum&lt;/STRONG&gt;&lt;/FONT&gt;] column:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; define sum;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; header = "Sum"; &amp;nbsp;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; generic;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;My private table template then had the &lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;format&lt;/FONT&gt; &lt;/STRONG&gt;line added and all was well when it was invoked:&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; define sum;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; header = "Sum"; &amp;nbsp;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;FONT color="#FF00FF"&gt;format=comma14.2; &lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; generic;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; end;&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;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.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2019-01-01_13h17_02.png" style="width: 434px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/25925i53FF8B9A9E090224/image-dimensions/434x225?v=v2" width="434" height="225" role="button" title="2019-01-01_13h17_02.png" alt="2019-01-01_13h17_02.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would like to find out how I can amend the out-of-the-box table template &lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;Base.Contents.Attributes&lt;/FONT&gt;&lt;/STRONG&gt; so that the value adjacent to the [&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;Observations&lt;/STRONG&gt;&lt;/FONT&gt;] label appears with comma separators and the values adjacent to the [&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;Created&lt;/FONT&gt;&lt;/STRONG&gt;] and [&lt;FONT face="courier new,courier"&gt;&lt;STRONG&gt;Last Modified&lt;/STRONG&gt;&lt;/FONT&gt;] 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.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am a bit stuck because the out-of-the-box table template &lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;Base.Contents.Attributes&lt;/FONT&gt;&lt;/STRONG&gt; 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.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;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.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Many thanks,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Downunder Dave&lt;/P&gt;
&lt;P&gt;Wellington&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Jan 2019 01:11:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-Customise-the-appearance-of-the-Proc-CONTENTS-Attributes/m-p/523981#M22129</guid>
      <dc:creator>DaveShea</dc:creator>
      <dc:date>2019-01-01T01:11:20Z</dc:date>
    </item>
    <item>
      <title>Re: ODS Customise the appearance of the Proc CONTENTS Attributes report</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-Customise-the-appearance-of-the-Proc-CONTENTS-Attributes/m-p/524000#M22130</link>
      <description>&lt;P&gt;Hi:&lt;BR /&gt;&amp;nbsp; I'm not sure I'd bother with a Table Template solution to this. And, honestly, I'm not sure it's possible to do what you want. You can change cell styles conditionally in a Table template, but you can't change cell values conditionally in a Table Template. &lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; A Table template does not have conditional logic which is what you'd need to apply a different format to the nVALUE1 column based on the value of the Label1 column or changing nvalue2 based on the Label2 column. A tagset template has that type of conditional logic, but not every destination uses a tagset template and cell style has a syntax for changing that is limited to style overrides.&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; I would be more likely to write the output to a dataset using ODS OUTPUT and then use PROC REPORT to customize the various nValue columns based on the Label1 and Label2 columns.&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; You did a good job figuring out the Table templates for your PROC MEANS. So you should be proud of that accomplishment.&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; When I got deeply into TABLE templates was more for use in the DATA step, as shown here:&lt;BR /&gt;&amp;nbsp;&lt;A href="http://www2.sas.com/proceedings/sugi30/088-30.pdf" target="_blank"&gt;http://www2.sas.com/proceedings/sugi30/088-30.pdf&lt;/A&gt; -- otherwise, most of my template work has been in STYLE templates, with a little side journey into TAGSET templates and GRAPH templates: &lt;A href="https://support.sas.com/resources/papers/proceedings09/227-2009.pdf" target="_blank"&gt;https://support.sas.com/resources/papers/proceedings09/227-2009.pdf&lt;/A&gt; . However, these are older papers and although the template syntax hasn't changed that much -- I wouldn't bother to fiddle with Tagset templates anymore since the developers started using Lua for them. And, since the Report Writing Interface became production, I hardly find a need to fiddle with Table Templates anymore. &lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; I'll see if I have an example of using PROC REPORT after the fact to change values and post it.&lt;BR /&gt;&lt;BR /&gt;Cynthia&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1) starting attributes object for SASHELP.HEART and whole object from ODS OUTPUT (yellow highlights were added to screen shot to highlight where changes will be made):&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="reformat_contents_sashelp_heart1.png" style="width: 503px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/25927i82FBB28DF9A5721F/image-size/large?v=v2&amp;amp;px=999" role="button" title="reformat_contents_sashelp_heart1.png" alt="reformat_contents_sashelp_heart1.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2) using formats and changing cell values conditionally using PROC REPORT (yellow highlight shows what was changed):&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="reformat_contents_sashelp_heart2.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/25928iA9827A6739F120A9/image-size/large?v=v2&amp;amp;px=999" role="button" title="reformat_contents_sashelp_heart2.png" alt="reformat_contents_sashelp_heart2.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;3) code&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods output attributes=work.attr;
ods select attributes;
proc contents data=sashelp.heart;
  title 'Original Attributes Object for SASHELP.HEART';
run;
 
proc print data=work.attr;
  title 'what is in the attributes object';
run;
 
ods select variables;
proc contents data=work.attr;
  title 'notice length of cvalue2 -- sashelp.heart has 5209 obs, so length is $4';
  title2 'which means that cvalue2 is too small to hold a comma formatted number';
run;
 
title 'PROC REPORT changing values in COMPUTE block';
title2 'using nvalue1 and nvalue2 to set new values for cvalue1 and showvalue2';
title3 'cannot use cvalue2 because length is too small to add comma';
proc report data=work.attr noheader;
  column Label1 nValue1 nValue2 cValue1  Label2 cValue2 showvalue2;
  define label1 / style(column)=Header;
  define nvalue1 / display noprint;
  define nvalue2 / display noprint;
  define cvalue1 / display;
  define label2 / style(column)=Header;
  define cvalue2 / display noprint;
  define showvalue2 / computed;
  compute showvalue2/character length=20;
     ** change all values in the COMPUTE block for the 
        last item on the report row;
     showvalue2 = cvalue2; 
     if label2='Observations' then do;
        showvalue2 = put(nvalue2,comma10.);
	 end;
	 if label1='Created' or label1 = 'Last Modified' then do;
	    cvalue1 = put(datepart(nvalue1),date9.);
	 end;
  endcomp; 
run;
title;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 01 Jan 2019 16:43:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-Customise-the-appearance-of-the-Proc-CONTENTS-Attributes/m-p/524000#M22130</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2019-01-01T16:43:38Z</dc:date>
    </item>
    <item>
      <title>Re: ODS Customise the appearance of the Proc CONTENTS Attributes report</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-Customise-the-appearance-of-the-Proc-CONTENTS-Attributes/m-p/524394#M22135</link>
      <description>&lt;P&gt;Cynthia,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you very much for posting this example code. After playing around with it&amp;nbsp; for a couple of days I have now got a much better understanding of how ODS and Proc CONTENTS work together. It is one of the pieces of the ODS puzzle that I had not been able to find up until now. I now have a rock-hard example to play with to explore ODS further.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I agree, that the trying to tweek the table template for the Attributes report of Proc CONTENTS is going to be a dead-end, but your example code that pipes the underlying procedure data out to a dataset and then using Proc REPORT is genius.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you very much for all of your help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Downunder Dave&lt;/P&gt;
&lt;P&gt;Wellington&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jan 2019 22:07:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/ODS-Customise-the-appearance-of-the-Proc-CONTENTS-Attributes/m-p/524394#M22135</guid>
      <dc:creator>DaveShea</dc:creator>
      <dc:date>2019-01-03T22:07:04Z</dc:date>
    </item>
  </channel>
</rss>

