<?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 Re: How to display complete data dictionary in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/How-to-display-complete-data-dictionary/m-p/570789#M12023</link>
    <description>Go into the macro program (.sas). Comment out the proc datasets at the end and then you'll get datasets in your work library. Look through those and one should have what you need and you can filter the results as desired. &lt;BR /&gt;&lt;BR /&gt;Otherwise if you need more help you'll have to provide more details. Specifically an more detailed example of what you have and what you want. I'm working on guesses, which is usually right, but also very easy to be wrong, especially since your terminology is non-standard.</description>
    <pubDate>Wed, 03 Jul 2019 01:25:42 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2019-07-03T01:25:42Z</dc:date>
    <item>
      <title>How to display complete data dictionary</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-display-complete-data-dictionary/m-p/554844#M9578</link>
      <description>&lt;P&gt;I am fairly new to using SAS and have a project to upload 100 SAS data sets to SQL server with their meta data or their complete data dictionaries. I am using SAS 9.4. I transferred SAS data sets to SQL as only raw data files with no data labels. So, I need to extract a comprehensive data dictionary for all data sets in the library. The dictionary includes at least variable/column names, variable/column labels, value labels, variable/column type. Example of displaying variable Gender is:&lt;/P&gt;&lt;P&gt;Variable/Column name = GenderTyp&lt;/P&gt;&lt;P&gt;Variable/Column Label=GenderTyp&lt;/P&gt;&lt;P&gt;Value Labels = 2='Female' 1= 'Male'&lt;/P&gt;&lt;P&gt;Variable/Column Type=Char&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Proc content will give me all info I need but Value Labels. Same with Proc SQL; select dictionary.column;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do I get Value labels? Attached file shows here is how Gender is stored in the demographic data set.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Apr 2019 20:10:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-display-complete-data-dictionary/m-p/554844#M9578</guid>
      <dc:creator>Helal</dc:creator>
      <dc:date>2019-04-29T20:10:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to display complete data dictionary</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-display-complete-data-dictionary/m-p/554852#M9580</link>
      <description>Assuming you mean formats, you can use the SASHELP.VTABLE for table meta data, VCOLUMN for column level metadata and VFormats for the format information. For the specific format definitions you can extract them using PROC FORMAT with a CNTLOUT data set.</description>
      <pubDate>Mon, 29 Apr 2019 20:56:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-display-complete-data-dictionary/m-p/554852#M9580</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-04-29T20:56:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to display complete data dictionary</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-display-complete-data-dictionary/m-p/555151#M9603</link>
      <description>&lt;P&gt;Thank you Reeza.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Apr 2019 17:47:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-display-complete-data-dictionary/m-p/555151#M9603</guid>
      <dc:creator>Helal</dc:creator>
      <dc:date>2019-04-30T17:47:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to display complete data dictionary</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-display-complete-data-dictionary/m-p/570420#M11942</link>
      <description>&lt;P&gt;Hi Reeza,&lt;/P&gt;&lt;P&gt;I am still struggling to get values or value labels off my SAS data sets. Using your suggestion for a single variable in the data set will give me the followings. First here is the code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Proc SQL;&lt;BR /&gt;select *&lt;BR /&gt;from sashelp.vcolumn&lt;BR /&gt;where libname="CENCD" and name='Anger_37_C';&lt;BR /&gt;Quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The output is attached (Figure 1). The only info I need for this variable is Column Name and Label+ value(or valuer labels). If I run a simple Frequency for this variable, I get the output (Figure 2 in the attached Excel file). So, my question is how can I get something like this:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Name&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Labels&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Value&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Anger_37_C&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; TBIQOL Anger: became verbally abusive?&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Always, Missing, Never, Often, Rarely, Sometimes&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For all variable sin the data set. In the case of this variable, it looks like there is no actual Value Labels like 1= Always, 2=Sometimes, etc....rather it's the actual Character. I hope my question is clear.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank You&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jul 2019 02:44:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-display-complete-data-dictionary/m-p/570420#M11942</guid>
      <dc:creator>Helal</dc:creator>
      <dc:date>2019-07-02T02:44:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to display complete data dictionary</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-display-complete-data-dictionary/m-p/570606#M11987</link>
      <description>What you're calling variable 'labels' here is usually referred to as a SAS format. Did you try using CNTLOUT to get the formats or VFORMAT table to get the format? It will require a second query to know which format you want. But you'll have to consider which formats you want. I *think* there's a category in vformats that differentiates user defined format from a system format, ie CHAR is a system format, whereas CL_YESNO. is a custom format. &lt;BR /&gt;&lt;BR /&gt;But maybe this macro will help you instead of you writing your own custom code?&lt;BR /&gt;&lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/Library-Datasets-Summary-Macro-DATA-SPECS/ta-p/544757" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/Library-Datasets-Summary-Macro-DATA-SPECS/ta-p/544757&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;I have not tried it or used it so cannot comment beyond that. HTH.</description>
      <pubDate>Tue, 02 Jul 2019 15:36:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-display-complete-data-dictionary/m-p/570606#M11987</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-07-02T15:36:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to display complete data dictionary</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-display-complete-data-dictionary/m-p/570777#M12022</link>
      <description>&lt;P&gt;If I understood correctly, I have to have Format files in order to use&amp;nbsp; vformat and&amp;nbsp;cntlout but there no format files. The macro has helped though except it produces observations as well that I don't need and I am not savvy to change the macro and get remove the observation piece. Anyway, thank you for sharing the macro with me.&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jul 2019 23:25:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-display-complete-data-dictionary/m-p/570777#M12022</guid>
      <dc:creator>Helal</dc:creator>
      <dc:date>2019-07-02T23:25:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to display complete data dictionary</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-display-complete-data-dictionary/m-p/570789#M12023</link>
      <description>Go into the macro program (.sas). Comment out the proc datasets at the end and then you'll get datasets in your work library. Look through those and one should have what you need and you can filter the results as desired. &lt;BR /&gt;&lt;BR /&gt;Otherwise if you need more help you'll have to provide more details. Specifically an more detailed example of what you have and what you want. I'm working on guesses, which is usually right, but also very easy to be wrong, especially since your terminology is non-standard.</description>
      <pubDate>Wed, 03 Jul 2019 01:25:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-display-complete-data-dictionary/m-p/570789#M12023</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-07-03T01:25:42Z</dc:date>
    </item>
  </channel>
</rss>

