<?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: Logic difference between INOBS= and OBS=? in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Logic-difference-between-INOBS-and-OBS/m-p/903677#M40330</link>
    <description>&lt;P&gt;1) INOBS= is Proc SQL spacific,&lt;/P&gt;
&lt;P&gt;2) OBS= is global option and data set option&lt;/P&gt;
&lt;P&gt;3) INOBS= produces a warning&lt;/P&gt;
&lt;P&gt;4) OBS= can overwrite INOBS=&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;1    proc sql INOBS=10;
2      select * from sashelp.class;
WARNING: Only 10 records were read from SASHELP.CLASS due to INOBS= option.
3    quit;
NOTE: PROCEDURE SQL used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds


4
5
6    proc sql INOBS=10;
7      select * from sashelp.class(obs=5);
8    quit;
NOTE: PROCEDURE SQL used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds


9
10   proc sql;
11     select * from sashelp.class(obs=5);
12   quit;
NOTE: PROCEDURE SQL used (Total process time):
      real time           0.00 seconds
      cpu time            0.01 seconds


13
14   data test1;
15     set sashelp.class(obs=5);
16   run;

NOTE: There were 5 observations read from the data set SASHELP.CLASS.
NOTE: The data set WORK.TEST1 has 5 observations and 5 variables.
NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds


17
18   data test2;
19     set sashelp.class(inobs=5);
                         -----
                         22
ERROR 22-7: Invalid option name INOBS.

20   run;

NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.TEST2 may be incomplete.  When this step was stopped there were 0
         observations and 0 variables.
WARNING: Data set WORK.TEST2 was not replaced because this step was stopped.
NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Bart&lt;/P&gt;</description>
    <pubDate>Fri, 17 Nov 2023 16:12:16 GMT</pubDate>
    <dc:creator>yabwon</dc:creator>
    <dc:date>2023-11-17T16:12:16Z</dc:date>
    <item>
      <title>Logic difference between INOBS= and OBS=?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Logic-difference-between-INOBS-and-OBS/m-p/903670#M40328</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;From the definition of the two:&lt;/P&gt;&lt;P&gt;INOBS= is restricting the number of input rows&lt;/P&gt;&lt;P&gt;OBS= is specifying the last observation&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Based on that, I couldn't think of a scenario where the two are different. Are they logically the same thing?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 17 Nov 2023 15:27:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Logic-difference-between-INOBS-and-OBS/m-p/903670#M40328</guid>
      <dc:creator>cosmid</dc:creator>
      <dc:date>2023-11-17T15:27:41Z</dc:date>
    </item>
    <item>
      <title>Re: Logic difference between INOBS= and OBS=?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Logic-difference-between-INOBS-and-OBS/m-p/903677#M40330</link>
      <description>&lt;P&gt;1) INOBS= is Proc SQL spacific,&lt;/P&gt;
&lt;P&gt;2) OBS= is global option and data set option&lt;/P&gt;
&lt;P&gt;3) INOBS= produces a warning&lt;/P&gt;
&lt;P&gt;4) OBS= can overwrite INOBS=&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;1    proc sql INOBS=10;
2      select * from sashelp.class;
WARNING: Only 10 records were read from SASHELP.CLASS due to INOBS= option.
3    quit;
NOTE: PROCEDURE SQL used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds


4
5
6    proc sql INOBS=10;
7      select * from sashelp.class(obs=5);
8    quit;
NOTE: PROCEDURE SQL used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds


9
10   proc sql;
11     select * from sashelp.class(obs=5);
12   quit;
NOTE: PROCEDURE SQL used (Total process time):
      real time           0.00 seconds
      cpu time            0.01 seconds


13
14   data test1;
15     set sashelp.class(obs=5);
16   run;

NOTE: There were 5 observations read from the data set SASHELP.CLASS.
NOTE: The data set WORK.TEST1 has 5 observations and 5 variables.
NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds


17
18   data test2;
19     set sashelp.class(inobs=5);
                         -----
                         22
ERROR 22-7: Invalid option name INOBS.

20   run;

NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.TEST2 may be incomplete.  When this step was stopped there were 0
         observations and 0 variables.
WARNING: Data set WORK.TEST2 was not replaced because this step was stopped.
NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Bart&lt;/P&gt;</description>
      <pubDate>Fri, 17 Nov 2023 16:12:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Logic-difference-between-INOBS-and-OBS/m-p/903677#M40330</guid>
      <dc:creator>yabwon</dc:creator>
      <dc:date>2023-11-17T16:12:16Z</dc:date>
    </item>
    <item>
      <title>Re: Logic difference between INOBS= and OBS=?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Logic-difference-between-INOBS-and-OBS/m-p/903678#M40331</link>
      <description>&lt;P&gt;&lt;STRONG&gt;inObs=&lt;/STRONG&gt;&amp;nbsp;specifies the total number of rows to read in.&amp;nbsp;&lt;STRONG&gt;obs=&lt;/STRONG&gt; specifies the row number where you should stop reading. The &lt;STRONG&gt;firstObs=&lt;/STRONG&gt;&amp;nbsp;option specifies the first row of data tobe read, and it's easier to see the difference between &lt;STRONG&gt;obs=&lt;/STRONG&gt; and&amp;nbsp;&lt;STRONG&gt;inObs=&lt;/STRONG&gt; if you&amp;nbsp;apply&amp;nbsp;&lt;STRONG&gt;firstOBS=&lt;/STRONG&gt; in conjunction with those options and compare the results:&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/* inObs= vs obs= with firstObs=*/
proc sql inobs=50 number;
title 'InObs=50, firstObs=20';
select *
	from sashelp.cars(firstObs=20)
;
quit;

title 'obs=50, firstObs=20';
proc sql number;
title 'obs=50, firstObs=20';
select *
	from sashelp.cars(firstObs=20 obs=50)
;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Note that the first query returns 50 rows, but the second query only returns 31 rows.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Nov 2023 16:13:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Logic-difference-between-INOBS-and-OBS/m-p/903678#M40331</guid>
      <dc:creator>SASJedi</dc:creator>
      <dc:date>2023-11-17T16:13:17Z</dc:date>
    </item>
  </channel>
</rss>

