<?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 list two variables in SAS in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-list-two-variables-in-SAS/m-p/790281#M252993</link>
    <description />
    <pubDate>Fri, 14 Jan 2022 22:23:42 GMT</pubDate>
    <dc:creator>zhawasli1</dc:creator>
    <dc:date>2022-01-14T22:23:42Z</dc:date>
    <item>
      <title>How to list two variables in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-list-two-variables-in-SAS/m-p/790159#M252947</link>
      <description>&lt;P&gt;I want to create a SAS dataset which contains two variables AGE and SEX. &amp;nbsp;There are 26 entries. &amp;nbsp;How do I program this into SAS. &amp;nbsp;Sorry I'm a newbie here . lol&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jan 2022 15:51:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-list-two-variables-in-SAS/m-p/790159#M252947</guid>
      <dc:creator>zhawasli1</dc:creator>
      <dc:date>2022-01-14T15:51:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to list two variables in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-list-two-variables-in-SAS/m-p/790164#M252950</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/412764"&gt;@zhawasli1&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I want to create a SAS dataset which contains two variables AGE and SEX. &amp;nbsp;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Where is the data coming from? Are you typing it out? From a text file?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Assuming you're typing it out, you would create something as follows:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
infile cards dlm=',' truncover;
input age sex $;
cards;
24, F
25, M
;;;;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;However, the assumption is you're more likely to read from a file or DB and this step isn't very usual in actual work.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/412764"&gt;@zhawasli1&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I want to create a SAS dataset which contains two variables AGE and SEX. &amp;nbsp;There are 26 entries. &amp;nbsp;How do I program this into SAS. &amp;nbsp;Sorry I'm a newbie here . lol&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jan 2022 22:01:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-list-two-variables-in-SAS/m-p/790164#M252950</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2022-01-14T22:01:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to list two variables in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-list-two-variables-in-SAS/m-p/790260#M252981</link>
      <description>no its from my input right now. thank you so much!</description>
      <pubDate>Fri, 14 Jan 2022 21:44:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-list-two-variables-in-SAS/m-p/790260#M252981</guid>
      <dc:creator>zhawasli1</dc:creator>
      <dc:date>2022-01-14T21:44:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to list two variables in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-list-two-variables-in-SAS/m-p/790267#M252985</link>
      <description>&lt;P&gt;It says error on the log window when I press run,&amp;nbsp;&lt;SPAN&gt;No logical assign for filename CARD. &amp;nbsp;Not completely sure what that means. &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jan 2022 21:59:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-list-two-variables-in-SAS/m-p/790267#M252985</guid>
      <dc:creator>zhawasli1</dc:creator>
      <dc:date>2022-01-14T21:59:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to list two variables in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-list-two-variables-in-SAS/m-p/790269#M252987</link>
      <description>&lt;P&gt;Show the code and log &lt;BR /&gt;I think there's a typo in my post (card versus cards) which I'll fix here in a second.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;EDIT: Code is fixed and tested, runs fine.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jan 2022 22:02:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-list-two-variables-in-SAS/m-p/790269#M252987</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2022-01-14T22:02:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to list two variables in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-list-two-variables-in-SAS/m-p/790271#M252989</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/412764"&gt;@zhawasli1&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;no its from &lt;STRONG&gt;my input&lt;/STRONG&gt; right now. thank you so much!&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Literally no idea what that means.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Jan 2022 22:02:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-list-two-variables-in-SAS/m-p/790271#M252989</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2022-01-14T22:02:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to list two variables in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-list-two-variables-in-SAS/m-p/790281#M252993</link>
      <description />
      <pubDate>Fri, 14 Jan 2022 22:23:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-list-two-variables-in-SAS/m-p/790281#M252993</guid>
      <dc:creator>zhawasli1</dc:creator>
      <dc:date>2022-01-14T22:23:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to list two variables in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-list-two-variables-in-SAS/m-p/790283#M252995</link>
      <description>I updated the post above earlier, you need to update the code. &lt;BR /&gt;&lt;BR /&gt;SAS is expecting CARDS not CARD.</description>
      <pubDate>Fri, 14 Jan 2022 22:29:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-list-two-variables-in-SAS/m-p/790283#M252995</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2022-01-14T22:29:50Z</dc:date>
    </item>
  </channel>
</rss>

