<?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: how to input missing value in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/how-to-input-missing-value/m-p/831062#M328408</link>
    <description>&lt;P&gt;Perhaps try using infile statement and comma delimited values:&lt;/P&gt;&lt;P&gt;data customer_h;&lt;BR /&gt;infile datalines dsd delimiter=',';&lt;BR /&gt;input Obs org_code cust_no ind_vip cust_id id_type industrial_code occu_code dob_relation_level&amp;nbsp;&lt;BR /&gt;batch_date last_update_type last_update_datetime eff_from_date eff_to_date POSTAL_CODE RACE STATE_CODE NATIONALITY NID_ISSUE_COUNTRY;&amp;nbsp;&lt;BR /&gt;datalines;&lt;/P&gt;&lt;P&gt;37086208,251,HK6C000000000000005,0,Q1234,1,191,21,1-Nov-78,2-Aug-22,U,03aug2022:22:41;57,2-Aug-22,.,.,.,2,7202816289,HK&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;</description>
    <pubDate>Tue, 30 Aug 2022 10:32:41 GMT</pubDate>
    <dc:creator>bigdataguy</dc:creator>
    <dc:date>2022-08-30T10:32:41Z</dc:date>
    <item>
      <title>how to input missing value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-input-missing-value/m-p/831053#M328401</link>
      <description>&lt;PRE&gt;Data customer_h;     
input Obs org_code cust_no ind_vip cust_id id_type industrial_code occu_code dob_relation_level 
batch_date last_update_type last_update_datetime eff_from_date eff_to_date POSTAL_CODE RACE STATE_CODE NATIONALITY NID_ISSUE_COUNTRY;     

datalines;  
37086208 251 HK6C000000000000005 0 Q1234 1 191 21 1-Nov-78 2-Aug-22 U 03aug2022:22:41;57 2-Aug-22 . . . 2 7202816289 HK&lt;/PRE&gt;
&lt;P&gt;I have three fields without input, how do I indicate when creating the data set?&lt;/P&gt;
&lt;P&gt;the three fields without inputs are eff_to_date POSTAL_CODE RACE as indicated by '.' above...&lt;/P&gt;</description>
      <pubDate>Tue, 30 Aug 2022 09:55:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-input-missing-value/m-p/831053#M328401</guid>
      <dc:creator>HeatherNewton</dc:creator>
      <dc:date>2022-08-30T09:55:25Z</dc:date>
    </item>
    <item>
      <title>Re: how to input missing value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-input-missing-value/m-p/831062#M328408</link>
      <description>&lt;P&gt;Perhaps try using infile statement and comma delimited values:&lt;/P&gt;&lt;P&gt;data customer_h;&lt;BR /&gt;infile datalines dsd delimiter=',';&lt;BR /&gt;input Obs org_code cust_no ind_vip cust_id id_type industrial_code occu_code dob_relation_level&amp;nbsp;&lt;BR /&gt;batch_date last_update_type last_update_datetime eff_from_date eff_to_date POSTAL_CODE RACE STATE_CODE NATIONALITY NID_ISSUE_COUNTRY;&amp;nbsp;&lt;BR /&gt;datalines;&lt;/P&gt;&lt;P&gt;37086208,251,HK6C000000000000005,0,Q1234,1,191,21,1-Nov-78,2-Aug-22,U,03aug2022:22:41;57,2-Aug-22,.,.,.,2,7202816289,HK&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Aug 2022 10:32:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-input-missing-value/m-p/831062#M328408</guid>
      <dc:creator>bigdataguy</dc:creator>
      <dc:date>2022-08-30T10:32:41Z</dc:date>
    </item>
    <item>
      <title>Re: how to input missing value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-input-missing-value/m-p/831065#M328410</link>
      <description>&lt;P&gt;The dot means missing numeric value.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Aug 2022 10:58:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-input-missing-value/m-p/831065#M328410</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2022-08-30T10:58:03Z</dc:date>
    </item>
    <item>
      <title>Re: how to input missing value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-input-missing-value/m-p/831067#M328412</link>
      <description>&lt;P&gt;you need to use infile statement and dlm. You can use comma.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have a look here, particularly the first example.&lt;/P&gt;&lt;P&gt;&lt;A href="https://documentation.sas.com/doc/en/vdmmlcdc/8.1/lestmtsref/n1rill4udj0tfun1fvce3j401plo.htm" target="_blank"&gt;https://documentation.sas.com/doc/en/vdmmlcdc/8.1/lestmtsref/n1rill4udj0tfun1fvce3j401plo.htm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Aug 2022 11:29:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-input-missing-value/m-p/831067#M328412</guid>
      <dc:creator>bigdataguy</dc:creator>
      <dc:date>2022-08-30T11:29:35Z</dc:date>
    </item>
    <item>
      <title>Re: how to input missing value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-input-missing-value/m-p/831080#M328415</link>
      <description>&lt;P&gt;A single dot can be used to indicate a missing value, both for numeric and character variables:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
input c1 $ c2 $ n1 n2;
datalines;
. xxx . 2
;

proc print data=test noobs;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Result:&lt;/P&gt;
&lt;PRE&gt;c1	c2	n1	n2
 	xxx	.	2
&lt;/PRE&gt;</description>
      <pubDate>Tue, 30 Aug 2022 12:34:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-input-missing-value/m-p/831080#M328415</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-08-30T12:34:24Z</dc:date>
    </item>
    <item>
      <title>Re: how to input missing value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-input-missing-value/m-p/831085#M328417</link>
      <description>&lt;P&gt;Looks like you have handled the missing values fine.&amp;nbsp; INPUT will treat a single period as missing for both numeric and character variables.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It is the date, datetime and character variables that you have not told the INPUT statement how to handle correctly.&lt;/P&gt;
&lt;P&gt;Plus for the datetime value you might need to read in as character initially so you can capture the strange ;57 at the end of the value and decide what to do with that.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;input 
 Obs &lt;BR /&gt; org_code &lt;BR /&gt; cust_no i:$30.
 nd_vip cust_id :$10.
 id_type &lt;BR /&gt; industrial_code &lt;BR /&gt; occu_code 
 dob_relation_level :date.
 batch_date :date.
 last_update_type :$8.
 last_update_datetime :datetime.  
 eff_from_date :date. 
 eff_to_date :date. 
 POSTAL_CODE :$10.
 RACE :$20. 
 STATE_CODE :$8. 
 NATIONALITY :$10. 
 NID_ISSUE_COUNTRY :$8.
;     
format dob_relation_level batch_date eff_from_date eff_to_date date9.
       last_update_datetime datetime19.
;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 30 Aug 2022 12:48:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-input-missing-value/m-p/831085#M328417</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-08-30T12:48:59Z</dc:date>
    </item>
  </channel>
</rss>

