<?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: Asking the expert - How to get all the possible value a variable could take in a huge dataset. in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Asking-the-expert-How-to-get-all-the-possible-value-a-variable/m-p/416051#M26762</link>
    <description>&lt;P&gt;It depends on your specific needs, but based on what you describe I'd use something like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods select NLevels;

proc freq data = sashelp.class nlevels;
    table _character_;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 24 Nov 2017 15:53:52 GMT</pubDate>
    <dc:creator>collinelliot</dc:creator>
    <dc:date>2017-11-24T15:53:52Z</dc:date>
    <item>
      <title>Asking the expert - How to get all the possible value a variable could take in a huge dataset.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Asking-the-expert-How-to-get-all-the-possible-value-a-variable/m-p/416044#M26760</link>
      <description>&lt;P&gt;Here's the problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am dealing with a table which contains 271&amp;nbsp;variables and 3.5 Millions of observations.&lt;/P&gt;&lt;P&gt;Moreover, I have no information on this table such as the meaning of each variable and the values each variable could take, especially the characters variables.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have made a proc contents to obtain the number of observations and the list of variables.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am interested by the value character variable could take.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Usually I made a proc sort nodupkey by variable x and I obtains the list of possible values for&amp;nbsp;a&amp;nbsp;variable&amp;nbsp;could take.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My question is: is there a better way to do that with many variables and only the character variables&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Alain LePage&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Nov 2017 15:35:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Asking-the-expert-How-to-get-all-the-possible-value-a-variable/m-p/416044#M26760</guid>
      <dc:creator>alepage</dc:creator>
      <dc:date>2017-11-24T15:35:58Z</dc:date>
    </item>
    <item>
      <title>Re: Asking the expert - How to get all the possible value a variable could take in a huge dataset.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Asking-the-expert-How-to-get-all-the-possible-value-a-variable/m-p/416048#M26761</link>
      <description>&lt;P&gt;Well, first tip, you don't need to run a contents, you can just query sashelp.vtable and vcolumn to find that info.&amp;nbsp; With regards to the data, if you don't know anything about the data, what do you intend to do with it, without any documentation, data is just a waste of disk space.&amp;nbsp; If your list comes back with var1 contains XYZ,DEF,OPT, is that going to help?&amp;nbsp; Anyways, proc freq is probably your best bet here.&lt;/P&gt;
&lt;P&gt;A basic example:&lt;/P&gt;
&lt;PRE&gt;proc freq data=sashelp.class;
  tables _character_ / out=temp;
run;&lt;/PRE&gt;</description>
      <pubDate>Fri, 24 Nov 2017 15:46:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Asking-the-expert-How-to-get-all-the-possible-value-a-variable/m-p/416048#M26761</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-11-24T15:46:26Z</dc:date>
    </item>
    <item>
      <title>Re: Asking the expert - How to get all the possible value a variable could take in a huge dataset.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Asking-the-expert-How-to-get-all-the-possible-value-a-variable/m-p/416051#M26762</link>
      <description>&lt;P&gt;It depends on your specific needs, but based on what you describe I'd use something like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods select NLevels;

proc freq data = sashelp.class nlevels;
    table _character_;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Nov 2017 15:53:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Asking-the-expert-How-to-get-all-the-possible-value-a-variable/m-p/416051#M26762</guid>
      <dc:creator>collinelliot</dc:creator>
      <dc:date>2017-11-24T15:53:52Z</dc:date>
    </item>
    <item>
      <title>Re: Asking the expert - How to get all the possible value a variable could take in a huge dataset.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Asking-the-expert-How-to-get-all-the-possible-value-a-variable/m-p/416380#M26788</link>
      <description>&lt;P&gt;If you have a table that is not documented, and none want to/can describe it for you, throw it away. Especially if it has that many variables.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Nov 2017 13:32:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Asking-the-expert-How-to-get-all-the-possible-value-a-variable/m-p/416380#M26788</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2017-11-27T13:32:44Z</dc:date>
    </item>
    <item>
      <title>Re: Asking the expert - How to get all the possible value a variable could take in a huge dataset.</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Asking-the-expert-How-to-get-all-the-possible-value-a-variable/m-p/417523#M26887</link>
      <description>Thanks for your help</description>
      <pubDate>Thu, 30 Nov 2017 19:06:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Asking-the-expert-How-to-get-all-the-possible-value-a-variable/m-p/417523#M26887</guid>
      <dc:creator>alepage</dc:creator>
      <dc:date>2017-11-30T19:06:46Z</dc:date>
    </item>
  </channel>
</rss>

