<?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: Missing Data in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Missing-Data/m-p/112386#M31096</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I believe your problem is your having sas looking for&amp;nbsp; "Email:"&amp;nbsp; (i&lt;SPAN style="font-family: 'courier new', courier; background-color: #ffffff;"&gt;nput @'Email:'),&lt;/SPAN&gt; so for the second obs it jumps to the third observation which is the next occurrence of&amp;nbsp; that string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Im sure there is an elegant way in the input statement to handle this, I would probably just read the data into a single variable and parse it with data step logic to get what you want.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EJ&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 15 Aug 2013 16:37:37 GMT</pubDate>
    <dc:creator>esjackso</dc:creator>
    <dc:date>2013-08-15T16:37:37Z</dc:date>
    <item>
      <title>Missing Data</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Missing-Data/m-p/112385#M31095</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could someone please help me with the following situation:&lt;/P&gt;&lt;P&gt;I have a raw data file, which has the following content:&lt;/P&gt;&lt;P&gt;Name:Tom&lt;/P&gt;&lt;P&gt;Age:24&lt;/P&gt;&lt;P&gt;Gender:Male&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Email:&lt;/SPAN&gt;&lt;A class="jive-link-email-small" href="mailto:Tom@test.com"&gt;Tom@test.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Name:Dick&lt;/P&gt;&lt;P&gt;Age:32&lt;/P&gt;&lt;P&gt;Gender:Male&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Name: Harry&lt;/P&gt;&lt;P&gt;Age:30&lt;/P&gt;&lt;P&gt;Gender:Male&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Email:&lt;/SPAN&gt;&lt;A class="jive-link-email-small" href="mailto:Harry@test.com"&gt;Harry@test.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/*note that the second observation does not have Email */&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My code (below) reads this:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;data Basic1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; length Record $100;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; infile "D:\Analytics\Data\Address.txt"&amp;nbsp; ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; input @'Name:' name : $200. @@;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; if not missing(name);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; input @'Age:' age : 3. @@;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; if not missing(age);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; input @'Gender:' gender : $1. @@;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; if not missing(gender);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; input @'Email:' email : $20. @@;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; if not missing(email);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;drop record;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SAS reads only two observations, and the email for the second observation is taken from the third.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Obs&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; name&amp;nbsp;&amp;nbsp;&amp;nbsp; age&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gender email&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Tom&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 24&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; M&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;A class="jive-link-email-small" href="mailto:Tom@test.com"&gt;Tom@test.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dick&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 32&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; M&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;A class="jive-link-email-small" href="mailto:Harry@test.com"&gt;Harry@test.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could someone help me to fix this. Ideally, the email variable for the second observation, as it is missing, should be "". &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanking in advance,&lt;/P&gt;&lt;P&gt;Jijil Ramakrishnan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Aug 2013 16:29:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Missing-Data/m-p/112385#M31095</guid>
      <dc:creator>JAR</dc:creator>
      <dc:date>2013-08-15T16:29:12Z</dc:date>
    </item>
    <item>
      <title>Re: Missing Data</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Missing-Data/m-p/112386#M31096</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I believe your problem is your having sas looking for&amp;nbsp; "Email:"&amp;nbsp; (i&lt;SPAN style="font-family: 'courier new', courier; background-color: #ffffff;"&gt;nput @'Email:'),&lt;/SPAN&gt; so for the second obs it jumps to the third observation which is the next occurrence of&amp;nbsp; that string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Im sure there is an elegant way in the input statement to handle this, I would probably just read the data into a single variable and parse it with data step logic to get what you want.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EJ&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Aug 2013 16:37:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Missing-Data/m-p/112386#M31096</guid>
      <dc:creator>esjackso</dc:creator>
      <dc:date>2013-08-15T16:37:37Z</dc:date>
    </item>
    <item>
      <title>Re: Missing Data</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Missing-Data/m-p/112387#M31097</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear &lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;EJ&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;Thanks for the tip. Before I try to parse, I thought we we could fix it in the input statement itself. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If someone could help me to do the following, it will be great: &lt;/P&gt;&lt;P&gt;If the string "Name" appears before "@" character, email ="".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I searched on Google but failed. Hard to believe that it is a rare problem...:(&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jijil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Aug 2013 08:58:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Missing-Data/m-p/112387#M31097</guid>
      <dc:creator>JAR</dc:creator>
      <dc:date>2013-08-16T08:58:13Z</dc:date>
    </item>
    <item>
      <title>Re: Missing Data</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Missing-Data/m-p/112388#M31098</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Some remarks:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1/ The named list approach would be easier. It is pity you have the : and no = as separation. Perhaps something smart to change : = roles? &lt;A href="http://support.sas.com/documentation/cdl//en/lestmtsref/63323/HTML/default/viewer.htm#p1jjrvmzmybdeqn1gt8gj1r0ed0u.htm" title="http://support.sas.com/documentation/cdl//en/lestmtsref/63323/HTML/default/viewer.htm#p1jjrvmzmybdeqn1gt8gj1r0ed0u.htm"&gt;SAS(R) 9.3 Statements: Reference&lt;/A&gt; (list input)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2/ I do not understand your approach.&lt;/P&gt;&lt;P&gt;As you have all:&amp;nbsp; &lt;EM&gt; if not missing(...); &lt;/EM&gt; statements you are actually coding you do not one record where some variable is missing&lt;/P&gt;&lt;P&gt;You got exactly what you have coded.&amp;nbsp; 2 records where nothing is missing.&lt;/P&gt;&lt;P&gt;The &lt;EM&gt;drop record ;&lt;/EM&gt;&amp;nbsp; statement is coding to drop the variable &lt;EM&gt;record. &lt;/EM&gt;As not being used yet it creates it and immediate drop it.&amp;nbsp; &lt;/P&gt;&lt;P&gt;I assume some basic concept of the data-step is failing. SAS data-steps are different to normal record processing of other languages that it does all "next record: processing automatic. You just code what should happen with a current record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For a smart read process, reading the lines.&lt;/P&gt;&lt;P&gt;- is the blank line always there en indicating en of record?&amp;nbsp; (name age gender mail)&lt;/P&gt;&lt;P&gt;- is the order Always the same?&lt;/P&gt;&lt;P&gt;- can you intrpreted line/for line the values?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3/ To remember when alle data would be delivered as one record.&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl//en/lestmtsref/63323/HTML/default/viewer.htm#n1rill4udj0tfun1fvce3j401plo.htm" title="http://support.sas.com/documentation/cdl//en/lestmtsref/63323/HTML/default/viewer.htm#n1rill4udj0tfun1fvce3j401plo.htm"&gt;SAS(R) 9.3 Statements: Reference&lt;/A&gt; (missover&amp;nbsp; == flowover scanover stopover truncover)&lt;/P&gt;&lt;P&gt;Would suggest missover when records are at the end missing&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Aug 2013 10:07:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Missing-Data/m-p/112388#M31098</guid>
      <dc:creator>jakarman</dc:creator>
      <dc:date>2013-08-16T10:07:59Z</dc:date>
    </item>
    <item>
      <title>Re: Missing Data</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Missing-Data/m-p/112389#M31099</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Mr. Karman,&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is how I can answer your questions&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; not missing(..);&lt;/SPAN&gt;is not necessary. The actual code is&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; Basic1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;infile&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: purple; background: white;"&gt;"D:\Analytics\Data\Address.txt"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;input&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; @&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: purple; background: white;"&gt;'Name:'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; name : &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: teal; background: white;"&gt;$200.&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; @@;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;input&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; @&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: purple; background: white;"&gt;'Age:'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; age : &lt;/SPAN&gt;&lt;SPAN style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;3.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; @@;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;input&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; @&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: purple; background: white;"&gt;'Gender:'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; gender : &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: teal; background: white;"&gt;$1.&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; @@;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;input&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; @&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: purple; background: white;"&gt;'Email:'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; email : &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: teal; background: white;"&gt;$20.&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; @@;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;(everything else was sort of my attempts to circumvent this problem. apologies)&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;- in the raw data, blank line is the end of a record&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;- order is always the same&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;- except email, other fields are all mandatory&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;(I am sorry, I do not know how to respond to other points)&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;Regards,&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;Jijil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Aug 2013 10:47:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Missing-Data/m-p/112389#M31099</guid>
      <dc:creator>JAR</dc:creator>
      <dc:date>2013-08-16T10:47:30Z</dc:date>
    </item>
    <item>
      <title>Re: Missing Data</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Missing-Data/m-p/112390#M31100</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: navy; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; Basic1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="background: white; color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;infile&lt;/SPAN&gt; &lt;SPAN style="background: white; color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;"D:\Analytics\Data\Address.txt"&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="background: white; color: blue; font-family: 'Courier New'; font-size: 10pt;"&gt;input&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; @&lt;/SPAN&gt;&lt;SPAN style="background: white; color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;'Name:'&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; name : &lt;/SPAN&gt;&lt;SPAN style="background: white; color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;$200.&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; /&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;@&lt;/SPAN&gt;&lt;SPAN style="background: white; color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;'Age:'&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; age : &lt;/SPAN&gt;&lt;SPAN style="background: white; color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;STRONG&gt;3.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; /&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;@&lt;/SPAN&gt;&lt;SPAN style="background: white; color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;'Gender:'&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; gender : &lt;/SPAN&gt;&lt;SPAN style="background: white; color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;$1.&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; / tmpvar $1. @ ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF length(tmpvar) &amp;gt; 1 Then input&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;@&lt;/SPAN&gt;&lt;SPAN style="background: white; color: purple; font-family: 'Courier New'; font-size: 10pt;"&gt;'Email:'&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; email : &lt;/SPAN&gt;&lt;SPAN style="background: white; color: teal; font-family: 'Courier New'; font-size: 10pt;"&gt;$20. /&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt; ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: navy; font-family: 'Courier New'; font-size: 10pt;"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;(code not checked)&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;Thinking the approach: &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;The "/" first 3 records can be processed in one input statement multiple lines at once.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;One @ is enough to hold the iteration within this record&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;It will read the blank/non-blank line. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;When blank next iteration....&amp;nbsp; otherwhise process mail and proceed one line.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;This is playing with the line-orders and input.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background: white; color: black; font-family: 'Courier New'; font-size: 10pt;"&gt;Exercise to learn inputprocessing.&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Aug 2013 12:09:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Missing-Data/m-p/112390#M31100</guid>
      <dc:creator>jakarman</dc:creator>
      <dc:date>2013-08-16T12:09:42Z</dc:date>
    </item>
    <item>
      <title>Re: Missing Data</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Missing-Data/m-p/112391#M31101</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Curiosity killed the cat with me and I came up with the method I would use:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data Basic1;&lt;/P&gt;&lt;P&gt;&amp;nbsp; length Rec $ 1000 Name $ 200 Age 8 Gender $ 1 Email $ 20;&lt;/P&gt;&lt;P&gt;&amp;nbsp; drop rec;&lt;/P&gt;&lt;P&gt;&amp;nbsp; infile "...your path...\Address.txt" end=last;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; rec = _infile_;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; If index(rec,'Name:')&amp;gt;0 then do;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Name = strip(scan(rec,2,":"));&lt;/P&gt;&lt;P&gt;&amp;nbsp; Age = .;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Gender = "";&lt;/P&gt;&lt;P&gt;&amp;nbsp; Email = "";&lt;/P&gt;&lt;P&gt;&amp;nbsp; end;&lt;/P&gt;&lt;P&gt;&amp;nbsp; else if index(rec, 'Age:')&amp;gt;0 then Age = put(scan(rec,2,":"),8.);&lt;/P&gt;&lt;P&gt;&amp;nbsp; else if index(rec, 'Gender:')&amp;gt;0 then Gender = strip(scan(rec,2,":"));&lt;/P&gt;&lt;P&gt;&amp;nbsp; else if index(rec, 'Email:')&amp;gt;0 then Email = strip(scan(rec,2,":"));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; retain Name Age Gender Email;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if rec = "" or last = 1 then output;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think this accomplishes what you need.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EJ&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Aug 2013 19:54:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Missing-Data/m-p/112391#M31101</guid>
      <dc:creator>esjackso</dc:creator>
      <dc:date>2013-08-16T19:54:19Z</dc:date>
    </item>
    <item>
      <title>Re: Missing Data</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Missing-Data/m-p/112392#M31102</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you EJ!&lt;/P&gt;&lt;P&gt;Jijil Ramakrishnan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 17 Aug 2013 06:32:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Missing-Data/m-p/112392#M31102</guid>
      <dc:creator>JAR</dc:creator>
      <dc:date>2013-08-17T06:32:03Z</dc:date>
    </item>
    <item>
      <title>Re: Missing Data</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Missing-Data/m-p/112393#M31103</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;EJ,&lt;/P&gt;&lt;P&gt;Running yr code for 'Missing Data', We are getting only last observation. Is that our ojective to get. Else, how to get all (3) observations using yr code.? could you please help us.&lt;/P&gt;&lt;P&gt;-Thanks&lt;/P&gt;&lt;P&gt;_Kamal&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Oct 2013 20:21:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Missing-Data/m-p/112393#M31103</guid>
      <dc:creator>koomalkc</dc:creator>
      <dc:date>2013-10-02T20:21:24Z</dc:date>
    </item>
    <item>
      <title>Re: Missing Data</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Missing-Data/m-p/112394#M31104</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Im afraid I dont understand the problem. The code works with the supplied sample data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If your data is different then yes you would have to edit the code to allow for the differences. My guess is that you dont have empty rows in your txt file between observations like the sample data does so the output line only occurs on the last line of the input file where end of file flag is set (end = last .... last = 1 then output).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EJ&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Oct 2013 11:37:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Missing-Data/m-p/112394#M31104</guid>
      <dc:creator>esjackso</dc:creator>
      <dc:date>2013-10-03T11:37:26Z</dc:date>
    </item>
    <item>
      <title>Re: Missing Data</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Missing-Data/m-p/112395#M31105</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You may want to start a new thread to solve any new issues.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EJ&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Oct 2013 11:38:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Missing-Data/m-p/112395#M31105</guid>
      <dc:creator>esjackso</dc:creator>
      <dc:date>2013-10-03T11:38:14Z</dc:date>
    </item>
    <item>
      <title>Re: Missing Data</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Missing-Data/m-p/112396#M31106</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;EJ,&lt;/P&gt;&lt;P&gt;I'm exactly taking about the supplied sample data posted by JAR. I just want to know how to get all 3 observations (one observation with missing email) with your code.&lt;/P&gt;&lt;P&gt;Following is the desired output..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Obs&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; name&amp;nbsp;&amp;nbsp;&amp;nbsp; age&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; gender email&lt;/P&gt;&lt;P&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Tom&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 24&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; M&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;A class="jive-link-email-small" href="mailto:Tom@test.com"&gt;Tom@test.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dick&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 32&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; M&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Harry&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 30&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; M&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;A class="jive-link-email-small" href="mailto:Harry@test.com"&gt;Harry@test.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;=Kamal&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Oct 2013 00:22:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Missing-Data/m-p/112396#M31106</guid>
      <dc:creator>koomalkc</dc:creator>
      <dc:date>2013-10-04T00:22:59Z</dc:date>
    </item>
    <item>
      <title>Re: Missing Data</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Missing-Data/m-p/112397#M31107</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Im not sure how to respond ... the posted code when used with the sample provides exactly what you show your desired output to be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="10-4-2013 8-06-19 AM.jpg" class="jive-image-thumbnail jive-image" src="https://communities.sas.com/legacyfs/online/4319_10-4-2013 8-06-19 AM.jpg" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So Im not sure how to help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EJ&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Oct 2013 12:09:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Missing-Data/m-p/112397#M31107</guid>
      <dc:creator>esjackso</dc:creator>
      <dc:date>2013-10-04T12:09:03Z</dc:date>
    </item>
    <item>
      <title>Re: Missing Data</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Missing-Data/m-p/112398#M31108</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;EJ,&lt;/P&gt;&lt;P&gt;You are absolutely right, I don't know what went wrong last time when I ran the code . Today , I ran again and is&amp;nbsp; perfect.Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 06 Oct 2013 22:51:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Missing-Data/m-p/112398#M31108</guid>
      <dc:creator>koomalkc</dc:creator>
      <dc:date>2013-10-06T22:51:00Z</dc:date>
    </item>
    <item>
      <title>Re: Missing Data</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Missing-Data/m-p/112399#M31109</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;probably Jaap's solution would be the quickest and easiest and quite straightforward &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data Basic1;&lt;/P&gt;&lt;P&gt;infile 'C:\Users\Trajce\Contacts\Desktop\test.txt' missover;&lt;/P&gt;&lt;P&gt;input @'Name:' name : $200. /&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @'Age:' age : 3. /&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @'Gender:' gender : $1. /&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @'Email:' email : $20.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #4;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; proc print;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Oct 2013 16:30:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Missing-Data/m-p/112399#M31109</guid>
      <dc:creator>Tal</dc:creator>
      <dc:date>2013-10-07T16:30:41Z</dc:date>
    </item>
  </channel>
</rss>

