<?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 write var list in freq report? in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/how-to-write-var-list-in-freq-report/m-p/100689#M28309</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use variable lists with &lt;STRONG&gt;proc means&lt;/STRONG&gt;:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;proc means data = abc123 nway noprint;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;class statecd--flag6 / missing;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;var statecd;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;output out=want(keep=statecd--flag6 n) n(statecd)=n;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 09 Jun 2013 21:23:52 GMT</pubDate>
    <dc:creator>PGStats</dc:creator>
    <dc:date>2013-06-09T21:23:52Z</dc:date>
    <item>
      <title>how to write var list in freq report?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/how-to-write-var-list-in-freq-report/m-p/100687#M28307</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm wondering if there is a way to use to '-' or ':' to assign range of variable list in table statement in cross frequency?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have range of variables list from Flag1-Flag6 and I want to use proc freq as below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Proc Freq data = abc123;&lt;/P&gt;&lt;P&gt;tables statecd*age*Flag1*Flag2*Flag3*Flag4*Flag5*Flag6/list missing;&lt;/P&gt;&lt;P&gt;Run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a easy way to write the list of Flag variable in table statement and avoid typing individually?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 09 Jun 2013 20:32:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/how-to-write-var-list-in-freq-report/m-p/100687#M28307</guid>
      <dc:creator>vicky07</dc:creator>
      <dc:date>2013-06-09T20:32:33Z</dc:date>
    </item>
    <item>
      <title>Re: how to write var list in freq report?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/how-to-write-var-list-in-freq-report/m-p/100688#M28308</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Since you mentioned using '-' to refer variable list, I bet you haven't tried it, as if you did, you would have found that it worked the way you guessed:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Proc Freq data = abc123;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;tables statecd age Flag1-Flag6/list missing;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Run;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;It gets better if all of these variables are adjacent to each other:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Proc Freq data = abc123;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;tables statecd --Flag6/list missing;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Run;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;Haikuo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 09 Jun 2013 21:23:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/how-to-write-var-list-in-freq-report/m-p/100688#M28308</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2013-06-09T21:23:31Z</dc:date>
    </item>
    <item>
      <title>Re: how to write var list in freq report?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/how-to-write-var-list-in-freq-report/m-p/100689#M28309</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use variable lists with &lt;STRONG&gt;proc means&lt;/STRONG&gt;:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;proc means data = abc123 nway noprint;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;class statecd--flag6 / missing;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;var statecd;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;output out=want(keep=statecd--flag6 n) n(statecd)=n;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 09 Jun 2013 21:23:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/how-to-write-var-list-in-freq-report/m-p/100689#M28309</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2013-06-09T21:23:52Z</dc:date>
    </item>
    <item>
      <title>Re: how to write var list in freq report?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/how-to-write-var-list-in-freq-report/m-p/100690#M28310</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Haikuo, I think OP wants a cross tabulation, not individual frequency tables for each variable.&lt;BR /&gt; &lt;/P&gt;&lt;P&gt;PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 09 Jun 2013 21:28:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/how-to-write-var-list-in-freq-report/m-p/100690#M28310</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2013-06-09T21:28:38Z</dc:date>
    </item>
    <item>
      <title>Re: how to write var list in freq report?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/how-to-write-var-list-in-freq-report/m-p/100691#M28311</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ah, miss that part. Consider it excusable for being Sunday afternoon where people feel worse than Monday morning &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 09 Jun 2013 21:44:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/how-to-write-var-list-in-freq-report/m-p/100691#M28311</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2013-06-09T21:44:16Z</dc:date>
    </item>
    <item>
      <title>Re: how to write var list in freq report?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/how-to-write-var-list-in-freq-report/m-p/100692#M28312</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;PGStats - Thanks for your reply. I tried running your code but getting the following error "&lt;STRONG&gt;Variable Statecd in list does not match type prescribed for this list&lt;/STRONG&gt;". It is printing right below the var statement. Statcd is character variable. Also I want cross tabulation of Statecd , AGE and Flag variables( i don't see mention of AGE in your code, not sure if &lt;STRONG style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;statecd--flag6&lt;/STRONG&gt; include AGE variable as well?)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 09 Jun 2013 22:28:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/how-to-write-var-list-in-freq-report/m-p/100692#M28312</guid>
      <dc:creator>vicky07</dc:creator>
      <dc:date>2013-06-09T22:28:02Z</dc:date>
    </item>
    <item>
      <title>Re: how to write var list in freq report?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/how-to-write-var-list-in-freq-report/m-p/100693#M28313</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just change MEANS to SUMMRY and omit the VAR statement.&amp;nbsp; _FREQ_ will be a variable in the output data that represents the counts.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 09 Jun 2013 22:37:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/how-to-write-var-list-in-freq-report/m-p/100693#M28313</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2013-06-09T22:37:02Z</dc:date>
    </item>
    <item>
      <title>Re: how to write var list in freq report?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/how-to-write-var-list-in-freq-report/m-p/100694#M28314</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you do not want to cross the flags with each other then the you can use:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;tables statecd*age*(Flag1-Flag6) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;As short cut for statecd*age*flag1 statecd*age*flag2 ....&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;If you do want to cross all of them and do not need the percents then use proc means with NWAY option, CLASS statement and no VAR statement. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;proc means nway ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; class statecd age flag1-flag6&amp;nbsp; / missing;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 09 Jun 2013 22:40:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/how-to-write-var-list-in-freq-report/m-p/100694#M28314</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2013-06-09T22:40:53Z</dc:date>
    </item>
    <item>
      <title>Re: how to write var list in freq report?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/how-to-write-var-list-in-freq-report/m-p/100695#M28315</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Tom,Data _null_ , Hai.Kuo and PGStats.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Jun 2013 00:42:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/how-to-write-var-list-in-freq-report/m-p/100695#M28315</guid>
      <dc:creator>vicky07</dc:creator>
      <dc:date>2013-06-10T00:42:53Z</dc:date>
    </item>
  </channel>
</rss>

