<?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: What is the advantage of the ID statement in SAS? in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/What-is-the-advantage-of-the-ID-statement-in-SAS/m-p/543599#M7737</link>
    <description>&lt;P&gt;Thanks again ballardw!&lt;/P&gt;</description>
    <pubDate>Fri, 15 Mar 2019 17:33:33 GMT</pubDate>
    <dc:creator>cosmid</dc:creator>
    <dc:date>2019-03-15T17:33:33Z</dc:date>
    <item>
      <title>What is the advantage of the ID statement in SAS?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/What-is-the-advantage-of-the-ID-statement-in-SAS/m-p/543584#M7735</link>
      <description>&lt;P&gt;It seems, in a way, that the ID statement just replaces the NOOBS option.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc print data=sample noobs;&lt;/P&gt;&lt;P&gt;&amp;nbsp; var IDNUM LastName;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc print data=sample;&lt;/P&gt;&lt;P&gt;&amp;nbsp; ID IDNUM;&lt;/P&gt;&lt;P&gt;&amp;nbsp; var LastName;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Or it can uses more than 1 variable to be the OBS column. I guess my question is when should I use ID instead of NOOBS?&lt;/P&gt;</description>
      <pubDate>Fri, 15 Mar 2019 16:19:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/What-is-the-advantage-of-the-ID-statement-in-SAS/m-p/543584#M7735</guid>
      <dc:creator>cosmid</dc:creator>
      <dc:date>2019-03-15T16:19:35Z</dc:date>
    </item>
    <item>
      <title>Re: What is the advantage of the ID statement in SAS?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/What-is-the-advantage-of-the-ID-statement-in-SAS/m-p/543589#M7736</link>
      <description>&lt;P&gt;You might also try:&lt;/P&gt;
&lt;PRE&gt;Proc sort data=sample;
   by idnum;
run;

proc print data=sample;
  by idnum;
  ID IDNUM;
  var LastName;

run;
&lt;/PRE&gt;
&lt;P&gt;which will create a somewhat different appearance for the by group output than a simple by statement. The BY variable then appears as a row spanning value in the first column of the output for each BY value instead of having the "BYVAR=Value" appear before a table. Which can significantly reduce the number of vertical lines in the output, especially with 2 or more by variables.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ID behaves differently in many of the procedures that have the option so it is worth investigating when offered as an option. For instance it is possible to get the value of a variable associated with the 3 largest values of another in Proc Means/ Summary using ID plus some additional code.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Mar 2019 16:46:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/What-is-the-advantage-of-the-ID-statement-in-SAS/m-p/543589#M7736</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2019-03-15T16:46:27Z</dc:date>
    </item>
    <item>
      <title>Re: What is the advantage of the ID statement in SAS?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/What-is-the-advantage-of-the-ID-statement-in-SAS/m-p/543599#M7737</link>
      <description>&lt;P&gt;Thanks again ballardw!&lt;/P&gt;</description>
      <pubDate>Fri, 15 Mar 2019 17:33:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/What-is-the-advantage-of-the-ID-statement-in-SAS/m-p/543599#M7737</guid>
      <dc:creator>cosmid</dc:creator>
      <dc:date>2019-03-15T17:33:33Z</dc:date>
    </item>
  </channel>
</rss>

