<?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 Data Dictionary which also displays all attributes of a variable? in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/Data-Dictionary-which-also-displays-all-attributes-of-a-variable/m-p/370416#M11195</link>
    <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anybody know of&amp;nbsp;or has found a&amp;nbsp; link for&amp;nbsp; creating a comprehensive &amp;nbsp;Data Dictionary. which also includes a list of all attributes a variable may have.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know how to do a simple Data Dictionary, but I need something that goes a step further.&lt;/P&gt;&lt;P&gt;Say we have for example a variable called: Gender, then I do not only what the specifics that this is a character variable, but I also want to know what characters are in there:&amp;nbsp;female, male. &amp;nbsp;It the variable is height, then maybe only the min and max, which I get from proc means.&lt;/P&gt;&lt;P&gt;Has anybody come accross a good guide tat shows how it is done?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas and recommendations are welcome&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 26 Jun 2017 03:12:46 GMT</pubDate>
    <dc:creator>AnnaNZ</dc:creator>
    <dc:date>2017-06-26T03:12:46Z</dc:date>
    <item>
      <title>Data Dictionary which also displays all attributes of a variable?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Data-Dictionary-which-also-displays-all-attributes-of-a-variable/m-p/370416#M11195</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anybody know of&amp;nbsp;or has found a&amp;nbsp; link for&amp;nbsp; creating a comprehensive &amp;nbsp;Data Dictionary. which also includes a list of all attributes a variable may have.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know how to do a simple Data Dictionary, but I need something that goes a step further.&lt;/P&gt;&lt;P&gt;Say we have for example a variable called: Gender, then I do not only what the specifics that this is a character variable, but I also want to know what characters are in there:&amp;nbsp;female, male. &amp;nbsp;It the variable is height, then maybe only the min and max, which I get from proc means.&lt;/P&gt;&lt;P&gt;Has anybody come accross a good guide tat shows how it is done?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas and recommendations are welcome&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jun 2017 03:12:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Data-Dictionary-which-also-displays-all-attributes-of-a-variable/m-p/370416#M11195</guid>
      <dc:creator>AnnaNZ</dc:creator>
      <dc:date>2017-06-26T03:12:46Z</dc:date>
    </item>
    <item>
      <title>Re: Data Dictionary which also displays all attributes of a variable?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Data-Dictionary-which-also-displays-all-attributes-of-a-variable/m-p/370421#M11196</link>
      <description>&lt;P&gt;This can be done by using labels and this is quick idea I can think.&lt;/P&gt;
&lt;P&gt;for example if you have label for dataset, you can see the same in data dictionary&lt;/P&gt;
&lt;P&gt;and when you use select * from dictionary.tables you see the below.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE class="dgrid-row-table"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class="dgrid-cell dgrid-cell-padding dgrid-column-1 field-col1"&gt;SASHELP&lt;/TD&gt;
&lt;TD class="dgrid-cell dgrid-cell-padding dgrid-column-2 field-col2"&gt;HEART&lt;/TD&gt;
&lt;TD class="dgrid-cell dgrid-cell-padding dgrid-column-3 field-col3"&gt;DATA&lt;/TD&gt;
&lt;TD class="dgrid-cell dgrid-cell-padding dgrid-column-4 field-col4"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="dgrid-cell dgrid-cell-padding dgrid-column-5 field-col5 dgrid-focus"&gt;Framingham Heart Study&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;for example, when I create a new dataset and mention label. It stores those values in data dictionary&lt;/P&gt;
&lt;P&gt;proc sql;&lt;BR /&gt;create table abcd as &lt;BR /&gt;select name, sex label='this variable contains Male and female values'&lt;BR /&gt;, age, height, weight from sashelp.class;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and after that if I write a query&lt;BR /&gt;proc sql;&lt;BR /&gt;select name, label from dictionary.columns&lt;BR /&gt;where memname ='ABCD'&lt;BR /&gt;and libname ='WORK'&lt;BR /&gt;and name ='Sex';&lt;/P&gt;
&lt;P&gt;Result is&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE class="table"&gt;&lt;CAPTION&gt;&amp;nbsp;&lt;/CAPTION&gt;&lt;COLGROUP&gt;&lt;COL /&gt;&lt;COL /&gt;&lt;/COLGROUP&gt;
&lt;THEAD&gt;
&lt;TR&gt;
&lt;TH class="b header" scope="col"&gt;Column Name&lt;/TH&gt;
&lt;TH class="b header" scope="col"&gt;Column Label&lt;/TH&gt;
&lt;/TR&gt;
&lt;/THEAD&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class="data"&gt;Sex&lt;/TD&gt;
&lt;TD class="data"&gt;this variable contains Male and female values&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This process can be automated by using macro. This is one way I can think of. I am pretty sure, someone might have written some paper on this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;quick search in lexjansen.com gave a paper which I feel might be interesting to you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.lexjansen.com/nesug/nesug09/bb/BB04.pdf" target="_blank"&gt;http://www.lexjansen.com/nesug/nesug09/bb/BB04.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jun 2017 03:49:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Data-Dictionary-which-also-displays-all-attributes-of-a-variable/m-p/370421#M11196</guid>
      <dc:creator>kiranv_</dc:creator>
      <dc:date>2017-06-26T03:49:50Z</dc:date>
    </item>
    <item>
      <title>Re: Data Dictionary which also displays all attributes of a variable?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Data-Dictionary-which-also-displays-all-attributes-of-a-variable/m-p/370440#M11197</link>
      <description>&lt;P&gt;I believe there is no one procedure to get what you are expecting. You may have to use different procedures to get the expected output.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;example if you are trying to determine teh different groups present in a character variable like gender then you have to use the proc freq table statement to get the counts and also the different groups present in that gender variable.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if you want to know the min and max of the variable then you could use the proc means or to go further if you wnat to get the 5 min and 5 max values use proc univariate. Both these procedure work on numeric variables in the var statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc freq data=sashelp.class;
table gender;
run;

proc means data=sashelp.class;
var height;
run;

or 

proc univariate data=sashelp.class;
var height;
run;

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jun 2017 07:22:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Data-Dictionary-which-also-displays-all-attributes-of-a-variable/m-p/370440#M11197</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2017-06-26T07:22:24Z</dc:date>
    </item>
    <item>
      <title>Re: Data Dictionary which also displays all attributes of a variable?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Data-Dictionary-which-also-displays-all-attributes-of-a-variable/m-p/370864#M11219</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/144103"&gt;@AnnaNZ&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;A data dictionary is "data about data". That's what the SAS dictionary tables give you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you write a data dictionary/define a data model then you can also define the allowed values for a column (the &lt;EM&gt;domain &lt;/EM&gt;to use a data modeling term). SAS doesn't provide the capability to actually implement such constraints on columns.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What you're asking for is what's actually stored in columns as values. That's no more metadata and is not a column attribute. This is not "data about data" but real data; i.e. the domain ("data about data") could allow for values A, B or C but you've got only stored A and C as values ("the real data").&lt;/P&gt;
&lt;P&gt;Because&amp;nbsp;it's real data you'll principally only get such information by implementing and executing some sort of report using your&amp;nbsp;data. This is true for any data storage format and any database.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jun 2017 12:28:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Data-Dictionary-which-also-displays-all-attributes-of-a-variable/m-p/370864#M11219</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2017-06-27T12:28:44Z</dc:date>
    </item>
    <item>
      <title>Re: Data Dictionary which also displays all attributes of a variable?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Data-Dictionary-which-also-displays-all-attributes-of-a-variable/m-p/370881#M11220</link>
      <description>&lt;P&gt;No easy answers.&amp;nbsp; I would agree with earlier suggestion that you spend some time searching user group papers at lexjansen.com.&amp;nbsp; I haven't looked in several years.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One that I liked was &lt;A href="http://www.lexjansen.com/nesug/nesug11/ph/ph12.pdf" target="_blank"&gt;http://www.lexjansen.com/nesug/nesug11/ph/ph12.pdf&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jun 2017 12:19:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Data-Dictionary-which-also-displays-all-attributes-of-a-variable/m-p/370881#M11220</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2017-06-27T12:19:44Z</dc:date>
    </item>
    <item>
      <title>Re: Data Dictionary which also displays all attributes of a variable?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Data-Dictionary-which-also-displays-all-attributes-of-a-variable/m-p/370887#M11221</link>
      <description>&lt;P&gt;I believe that Patrick is on the right path to helping you.&amp;nbsp; If you were able to run a profile on your data, the report results would give you the information you are asking.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Running a profile on data is a common first step in understanding your data and monintoring the data's quality.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jun 2017 12:35:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Data-Dictionary-which-also-displays-all-attributes-of-a-variable/m-p/370887#M11221</guid>
      <dc:creator>LouGalway_sas</dc:creator>
      <dc:date>2017-06-27T12:35:29Z</dc:date>
    </item>
  </channel>
</rss>

