<?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 FIRST OBS AS GLOBAL OPTIONS IN DATALINES and MISSOVER concept in SAS 9.4 in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/FIRST-OBS-AS-GLOBAL-OPTIONS-IN-DATALINES-and-MISSOVER-concept-in/m-p/590932#M169206</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am a beginner in SAS. Can anyone please help me out on this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) As per my understanding FIRSTOBS will give the starting point for processing But in the below example, it is giving weird output. FIRSTOBS&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #333333; cursor: text; font-family: 'HelevticaNeue-light','Helvetica Neue',Helvetica,Arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt; is working fine when I have used it with the SAS datasets.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #333333; cursor: text; font-family: 'HelevticaNeue-light','Helvetica Neue',Helvetica,Arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;Please let me know how FIRSTOBS work in DATALINES.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #333333; cursor: text; font-family: 'HelevticaNeue-light','Helvetica Neue',Helvetica,Arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;In the below example if I am decreasing the value of FIRSTOBS, output is changing in different manner.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #333333; cursor: text; font-family: 'HelevticaNeue-light','Helvetica Neue',Helvetica,Arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;If I am mentioning FIRSTOBS=4 in the below example, it is throwing error i.e. FIRSTOBS option &amp;gt; number of observations in WORK.DEMO. Here no of observations is 6 which is greater than FIRSTOBS i.e.4 then why it is throwing error?&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Code:-&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;OPTIONS FIRSTOBS=3 ;
DATA DEMO;
INPUT PID AGE GEN$ NAME$;
DATALINES;
1 23 M cdjdjdc
2 29 F kjkjvnvk
3 12 M vjbdkj
1 23 M vvl
1 23 M vnv
2 29 F vvkj
;
RUN;
PROC PRINT DATA=DEMO;
RUN;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Result:-&lt;/STRONG&gt; I have attached the output i.e. Output_1&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Output 1.PNG" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/32676iCFEEB8912B87CF2E/image-size/large?v=v2&amp;amp;px=999" role="button" title="Output 1.PNG" alt="Output 1.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2)MISSOVER in INFILE:- Will it replace only the last missing variable value with period sign ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 23 Sep 2019 14:24:42 GMT</pubDate>
    <dc:creator>swatipriya</dc:creator>
    <dc:date>2019-09-23T14:24:42Z</dc:date>
    <item>
      <title>FIRST OBS AS GLOBAL OPTIONS IN DATALINES and MISSOVER concept in SAS 9.4</title>
      <link>https://communities.sas.com/t5/SAS-Programming/FIRST-OBS-AS-GLOBAL-OPTIONS-IN-DATALINES-and-MISSOVER-concept-in/m-p/590932#M169206</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am a beginner in SAS. Can anyone please help me out on this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) As per my understanding FIRSTOBS will give the starting point for processing But in the below example, it is giving weird output. FIRSTOBS&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #333333; cursor: text; font-family: 'HelevticaNeue-light','Helvetica Neue',Helvetica,Arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt; is working fine when I have used it with the SAS datasets.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #333333; cursor: text; font-family: 'HelevticaNeue-light','Helvetica Neue',Helvetica,Arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;Please let me know how FIRSTOBS work in DATALINES.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #333333; cursor: text; font-family: 'HelevticaNeue-light','Helvetica Neue',Helvetica,Arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;In the below example if I am decreasing the value of FIRSTOBS, output is changing in different manner.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #333333; cursor: text; font-family: 'HelevticaNeue-light','Helvetica Neue',Helvetica,Arial,sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;If I am mentioning FIRSTOBS=4 in the below example, it is throwing error i.e. FIRSTOBS option &amp;gt; number of observations in WORK.DEMO. Here no of observations is 6 which is greater than FIRSTOBS i.e.4 then why it is throwing error?&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Code:-&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;OPTIONS FIRSTOBS=3 ;
DATA DEMO;
INPUT PID AGE GEN$ NAME$;
DATALINES;
1 23 M cdjdjdc
2 29 F kjkjvnvk
3 12 M vjbdkj
1 23 M vvl
1 23 M vnv
2 29 F vvkj
;
RUN;
PROC PRINT DATA=DEMO;
RUN;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Result:-&lt;/STRONG&gt; I have attached the output i.e. Output_1&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Output 1.PNG" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/32676iCFEEB8912B87CF2E/image-size/large?v=v2&amp;amp;px=999" role="button" title="Output 1.PNG" alt="Output 1.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2)MISSOVER in INFILE:- Will it replace only the last missing variable value with period sign ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Sep 2019 14:24:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/FIRST-OBS-AS-GLOBAL-OPTIONS-IN-DATALINES-and-MISSOVER-concept-in/m-p/590932#M169206</guid>
      <dc:creator>swatipriya</dc:creator>
      <dc:date>2019-09-23T14:24:42Z</dc:date>
    </item>
    <item>
      <title>Re: FIRST OBS AS GLOBAL OPTIONS IN DATALINES and MISSOVER concept in SAS 9.4</title>
      <link>https://communities.sas.com/t5/SAS-Programming/FIRST-OBS-AS-GLOBAL-OPTIONS-IN-DATALINES-and-MISSOVER-concept-in/m-p/591018#M169253</link>
      <description>&lt;P&gt;In reverse order ...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;MISSOVER sets to missing as many variables as needed.&amp;nbsp; If your INPUT statement runs out of data with 1 varaible remaining to be found, it sets that one variable to missing.&amp;nbsp; If it runs out of data with 2 variables left to be found, it sets to missing both variables.&amp;nbsp; So as many variables as needed (and that can vary from line to line) get set to missing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For your first question, you need to realize that FIRSTOBS=3 applies to both steps.&amp;nbsp; For the DATA step, it starts reading with the third line of data.&amp;nbsp; That creates a data set with 4 observations.&amp;nbsp; Then for PROC PRINT, FIRSTOBS=3 also applies.&amp;nbsp; So of the 4 observations in your data set, it starts printing with the third observation.&lt;/P&gt;</description>
      <pubDate>Mon, 23 Sep 2019 18:17:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/FIRST-OBS-AS-GLOBAL-OPTIONS-IN-DATALINES-and-MISSOVER-concept-in/m-p/591018#M169253</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2019-09-23T18:17:49Z</dc:date>
    </item>
  </channel>
</rss>

