<?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: Create dataset that contain missing value in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Create-dataset-that-contain-missing-value/m-p/922816#M363358</link>
    <description>&lt;P&gt;Use the DSD option and a proper delimiter:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data df;
infile datalines dsd truncover;
input id sex $ stop;
datalines;
1,Female,0
1,M,1
1,Male,0
1,F,0
1,,1
;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 03 Apr 2024 19:09:58 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2024-04-03T19:09:58Z</dc:date>
    <item>
      <title>Create dataset that contain missing value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-dataset-that-contain-missing-value/m-p/922810#M363356</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would like to create a dummy dataset as below:&lt;/P&gt;
&lt;TABLE style="border-collapse: collapse; width: 144pt;" border="0" width="192" cellspacing="0" cellpadding="0"&gt;
&lt;TBODY&gt;
&lt;TR style="height: 14.5pt;"&gt;
&lt;TD width="64" height="19" class="xl63" style="height: 14.5pt; width: 48pt;"&gt;id&lt;/TD&gt;
&lt;TD width="64" class="xl63" style="border-left: none; width: 48pt;"&gt;sex&lt;/TD&gt;
&lt;TD width="64" class="xl63" style="border-left: none; width: 48pt;"&gt;stop&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 14.5pt;"&gt;
&lt;TD height="19" class="xl63" style="height: 14.5pt; border-top: none;"&gt;1&lt;/TD&gt;
&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;Female&lt;/TD&gt;
&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 14.5pt;"&gt;
&lt;TD height="19" class="xl63" style="height: 14.5pt; border-top: none;"&gt;1&lt;/TD&gt;
&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;F&lt;/TD&gt;
&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 14.5pt;"&gt;
&lt;TD height="19" class="xl63" style="height: 14.5pt; border-top: none;"&gt;1&lt;/TD&gt;
&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;Male&lt;/TD&gt;
&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 14.5pt;"&gt;
&lt;TD height="19" class="xl63" style="height: 14.5pt; border-top: none;"&gt;1&lt;/TD&gt;
&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;M&lt;/TD&gt;
&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 14.5pt;"&gt;
&lt;TD height="19" class="xl63" style="height: 14.5pt; border-top: none;"&gt;1&lt;/TD&gt;
&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My codes are like below:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data df ;
infile datalines missover;
input id sex $  stop;
datalines ;
1 Femal  0
1 M 1
1 Male  0
1 F  0
1 	      1
;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;However it came out like below which is wrong. What did I do wrong. How can I create the dataset contain missing value?&lt;/P&gt;
&lt;TABLE style="border-collapse: collapse; width: 144pt;" border="0" width="192" cellspacing="0" cellpadding="0"&gt;
&lt;TBODY&gt;
&lt;TR style="height: 14.5pt;"&gt;
&lt;TD width="64" height="19" class="xl63" style="height: 14.5pt; width: 48pt;"&gt;id&lt;/TD&gt;
&lt;TD width="64" class="xl63" style="border-left: none; width: 48pt;"&gt;sex&lt;/TD&gt;
&lt;TD width="64" class="xl63" style="border-left: none; width: 48pt;"&gt;stop&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 14.5pt;"&gt;
&lt;TD height="19" class="xl63" style="height: 14.5pt; border-top: none;"&gt;1&lt;/TD&gt;
&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;Female&lt;/TD&gt;
&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 14.5pt;"&gt;
&lt;TD height="19" class="xl63" style="height: 14.5pt; border-top: none;"&gt;1&lt;/TD&gt;
&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;F&lt;/TD&gt;
&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 14.5pt;"&gt;
&lt;TD height="19" class="xl63" style="height: 14.5pt; border-top: none;"&gt;1&lt;/TD&gt;
&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;Male&lt;/TD&gt;
&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 14.5pt;"&gt;
&lt;TD height="19" class="xl63" style="height: 14.5pt; border-top: none;"&gt;1&lt;/TD&gt;
&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;M&lt;/TD&gt;
&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;0&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR style="height: 14.5pt;"&gt;
&lt;TD height="19" class="xl63" style="height: 14.5pt; border-top: none;"&gt;1&lt;/TD&gt;
&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;1&lt;/TD&gt;
&lt;TD class="xl63" style="border-top: none; border-left: none;"&gt;&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Apr 2024 18:59:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-dataset-that-contain-missing-value/m-p/922810#M363356</guid>
      <dc:creator>stataq</dc:creator>
      <dc:date>2024-04-03T18:59:26Z</dc:date>
    </item>
    <item>
      <title>Re: Create dataset that contain missing value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-dataset-that-contain-missing-value/m-p/922815#M363357</link>
      <description>&lt;P&gt;Put a period for the missing value (both numeric and character variables).&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data df ;
  infile datalines truncover;
  input id sex $ stop;
datalines ;
1 Femal 0
1 M     1
1 Male  0
1 F     0
1 .     1
;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note you almost never want the functionality of the ancient MISSOVER option, which will set values missing when the line is too short for the informat being used.&amp;nbsp; So use the modern (less than 40 years old) TRUNCOVER option instead.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Apr 2024 19:07:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-dataset-that-contain-missing-value/m-p/922815#M363357</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2024-04-03T19:07:07Z</dc:date>
    </item>
    <item>
      <title>Re: Create dataset that contain missing value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-dataset-that-contain-missing-value/m-p/922816#M363358</link>
      <description>&lt;P&gt;Use the DSD option and a proper delimiter:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data df;
infile datalines dsd truncover;
input id sex $ stop;
datalines;
1,Female,0
1,M,1
1,Male,0
1,F,0
1,,1
;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 03 Apr 2024 19:09:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-dataset-that-contain-missing-value/m-p/922816#M363358</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2024-04-03T19:09:58Z</dc:date>
    </item>
  </channel>
</rss>

