<?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: Specifying Rows in SAS in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Specifying-Rows-in-SAS/m-p/678537#M23858</link>
    <description>&lt;P&gt;&lt;SPAN&gt;Both responses to this issue are correct, Thanks a TON and it's pretty likely you'll see more posts from me in the future haha but I look forward to getting SAS down&amp;nbsp;. Thanks again for your patience with me&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cyclopsedia_0-1598033667062.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/48540i1F0FE85E68A5D60C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Cyclopsedia_0-1598033667062.png" alt="Cyclopsedia_0-1598033667062.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 21 Aug 2020 18:14:52 GMT</pubDate>
    <dc:creator>Cyclopsedia</dc:creator>
    <dc:date>2020-08-21T18:14:52Z</dc:date>
    <item>
      <title>Specifying Rows in SAS</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Specifying-Rows-in-SAS/m-p/678503#M23852</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I'm a newbie with SAS of just 1 week experience and learning through Coursera and this website. The activity is requesting that in my freq output that I put Species_ID to have results starting with YOSE and Category equal to Mammals.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Errors I'm receiving:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;ERROR: Variable Mammal is not on file PG1.NP_SPECIES.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I'm not asking for answers on solving this activity but rather some pointers on what code should be where , Proc FREQ and Proc Print.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Below is my code; (Please be gentle in criticism lol)&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;proc freq data=pg1.np_species;&lt;BR /&gt;tables Abundance Conservation_Status;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;proc print data=pg1.np_species;&lt;BR /&gt;var Species_ID Category;&lt;BR /&gt;where species_id = "YOSE%" and Category = Mammal;&lt;BR /&gt;run; &amp;nbsp;&lt;/PRE&gt;&lt;P&gt;Thanks for everyone's time &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Aug 2020 16:38:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Specifying-Rows-in-SAS/m-p/678503#M23852</guid>
      <dc:creator>Cyclopsedia</dc:creator>
      <dc:date>2020-08-21T16:38:15Z</dc:date>
    </item>
    <item>
      <title>Re: Specifying Rows in SAS</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Specifying-Rows-in-SAS/m-p/678505#M23853</link>
      <description>&lt;P&gt;are you missing to include Mammals within quotes&amp;nbsp; &amp;nbsp;"&amp;nbsp; &amp;nbsp;"&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc freq data=pg1.np_species;
tables Abundance Conservation_Status;
run;

proc print data=pg1.np_species;
var Species_ID Category;
where species_id = "YOSE%" and Category = "Mammal";
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Aug 2020 16:40:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Specifying-Rows-in-SAS/m-p/678505#M23853</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2020-08-21T16:40:23Z</dc:date>
    </item>
    <item>
      <title>Re: Specifying Rows in SAS</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Specifying-Rows-in-SAS/m-p/678524#M23854</link>
      <description>&lt;P&gt;Good question. Checking now..&lt;/P&gt;&lt;P&gt;It looks like when I typed out this issue I WAS missing quotation marks but it doesn't seem to have a difference in my results output.&lt;/P&gt;&lt;P&gt;My goal; is to have species_Id show anything starting with YOSE and Category to point to Mammal only..here are my results with and without quotations. It isn't printing what I've got in PROC PRINT.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does it matter if the Print statement is before or after Proc Freq?&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>Fri, 21 Aug 2020 17:44:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Specifying-Rows-in-SAS/m-p/678524#M23854</guid>
      <dc:creator>Cyclopsedia</dc:creator>
      <dc:date>2020-08-21T17:44:46Z</dc:date>
    </item>
    <item>
      <title>Re: Specifying Rows in SAS</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Specifying-Rows-in-SAS/m-p/678526#M23855</link>
      <description>&lt;P&gt;I am going guess here as I do not know what's in&amp;nbsp; your species data. Perhaps, you are after this?&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;CODE class=" language-sas"&gt;where upcase(species_id)  like "YOSE%" and upcase(Category) = "MAMMAL";&lt;/CODE&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/*Task1*/
proc print data=pg1.np_species;
var Species_ID Category;
where upcase(species_id)  like "YOSE%" and upcase(Category) = "MAMMAL";
run;

/*Task 2*/
proc freq data=pg1.np_species;
tables Abundance Conservation_Status;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 21 Aug 2020 17:52:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Specifying-Rows-in-SAS/m-p/678526#M23855</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2020-08-21T17:52:37Z</dc:date>
    </item>
    <item>
      <title>Re: Specifying Rows in SAS</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Specifying-Rows-in-SAS/m-p/678528#M23856</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/339362"&gt;@Cyclopsedia&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Good question. Checking now..&lt;/P&gt;
&lt;P&gt;It looks like when I typed out this issue I WAS missing quotation marks but it doesn't seem to have a difference in my results output.&lt;/P&gt;
&lt;P&gt;My goal; is to have species_Id show anything starting with YOSE and Category to point to&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;If you used "YOSE%" as a LIKE value then you have to use Like "YOSE%" not =.&lt;/P&gt;
&lt;P&gt;Or you can use the =: comparison for a "starts with"&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;where species_id =: "YOSE%" &lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The order for Proc Freq and Proc Print would really matter if you are creating a data set in Proc Freq that you want to print with Proc Print. But with both (or multiple procedures) using the same input data set then the order in the code is the order the results are created. So if you have a preference of appearance then have the procedures in the desired order.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Aug 2020 17:56:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Specifying-Rows-in-SAS/m-p/678528#M23856</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-08-21T17:56:47Z</dc:date>
    </item>
    <item>
      <title>Re: Specifying Rows in SAS</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Specifying-Rows-in-SAS/m-p/678535#M23857</link>
      <description>&lt;P&gt;Both responses to this issue are correct, Thanks a TON guys. it's pretty likely you'll see more posts from me in the future haha but I look forward to getting SAS down &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Aug 2020 18:14:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Specifying-Rows-in-SAS/m-p/678535#M23857</guid>
      <dc:creator>Cyclopsedia</dc:creator>
      <dc:date>2020-08-21T18:14:05Z</dc:date>
    </item>
    <item>
      <title>Re: Specifying Rows in SAS</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Specifying-Rows-in-SAS/m-p/678537#M23858</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Both responses to this issue are correct, Thanks a TON and it's pretty likely you'll see more posts from me in the future haha but I look forward to getting SAS down&amp;nbsp;. Thanks again for your patience with me&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Cyclopsedia_0-1598033667062.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/48540i1F0FE85E68A5D60C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Cyclopsedia_0-1598033667062.png" alt="Cyclopsedia_0-1598033667062.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Aug 2020 18:14:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Specifying-Rows-in-SAS/m-p/678537#M23858</guid>
      <dc:creator>Cyclopsedia</dc:creator>
      <dc:date>2020-08-21T18:14:52Z</dc:date>
    </item>
    <item>
      <title>Re: Specifying Rows in SAS</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Specifying-Rows-in-SAS/m-p/678538#M23859</link>
      <description>I meant to click this as a solution. My apologies.</description>
      <pubDate>Fri, 21 Aug 2020 18:16:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Specifying-Rows-in-SAS/m-p/678538#M23859</guid>
      <dc:creator>Cyclopsedia</dc:creator>
      <dc:date>2020-08-21T18:16:32Z</dc:date>
    </item>
    <item>
      <title>Re: Specifying Rows in SAS</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Specifying-Rows-in-SAS/m-p/678540#M23860</link>
      <description>&lt;P&gt;Welcome to SAS communities&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/339362"&gt;@Cyclopsedia&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sir&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt;&amp;nbsp;, I have noticed you sharing a set of instructions that depicts how to ask a good question. Could you please post that here so that OP can use and follow those well laid instructions in the future&lt;/P&gt;</description>
      <pubDate>Fri, 21 Aug 2020 18:20:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Specifying-Rows-in-SAS/m-p/678540#M23860</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2020-08-21T18:20:25Z</dc:date>
    </item>
    <item>
      <title>Re: Specifying Rows in SAS</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Specifying-Rows-in-SAS/m-p/678602#M23863</link>
      <description>HI:&lt;BR /&gt;  The = sign will not work with %. That means you are looking for actual variable values that are exactly YOSE% -- and if you remember from the instructions, there are NOT any values that have a %. You will want to review the video on special WHERE operators. You are supposed to use LIKE for this practice (not =).&lt;BR /&gt;Hope this helps,&lt;BR /&gt;Cynthia</description>
      <pubDate>Fri, 21 Aug 2020 22:30:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Specifying-Rows-in-SAS/m-p/678602#M23863</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2020-08-21T22:30:47Z</dc:date>
    </item>
    <item>
      <title>Re: Specifying Rows in SAS</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Specifying-Rows-in-SAS/m-p/678603#M23864</link>
      <description>This practice was meant to have the students use LIKE.&lt;BR /&gt;Cynthia</description>
      <pubDate>Fri, 21 Aug 2020 22:31:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Specifying-Rows-in-SAS/m-p/678603#M23864</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2020-08-21T22:31:18Z</dc:date>
    </item>
  </channel>
</rss>

