<?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: comparision between 2 variables are not matching in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/comparision-between-2-variables-are-not-matching/m-p/437551#M108971</link>
    <description>&lt;P&gt;Running&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc print data=ing(obs=2);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;on the exact code that I posted gives&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="Capture.PNG" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/18611iC36FDC1FD6EDD419/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;as desired?&lt;/P&gt;</description>
    <pubDate>Thu, 15 Feb 2018 12:49:53 GMT</pubDate>
    <dc:creator>PeterClemmensen</dc:creator>
    <dc:date>2018-02-15T12:49:53Z</dc:date>
    <item>
      <title>comparision between 2 variables are not matching</title>
      <link>https://communities.sas.com/t5/SAS-Programming/comparision-between-2-variables-are-not-matching/m-p/437543#M108965</link>
      <description>&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying a simple step to see if both variables do not match then falg it but i can see both variables the same and have a flag.&lt;/P&gt;&lt;P&gt;Attached test data and code used&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;data nd;
   set test;
   format _all_;
   informat _all_;
run;

data ing;
   set nd;
   if start_time ne time2 then flag=1;
run;&lt;/PRE&gt;</description>
      <pubDate>Thu, 15 Feb 2018 12:38:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/comparision-between-2-variables-are-not-matching/m-p/437543#M108965</guid>
      <dc:creator>hanskronie</dc:creator>
      <dc:date>2018-02-15T12:38:01Z</dc:date>
    </item>
    <item>
      <title>Re: comparision between 2 variables are not matching</title>
      <link>https://communities.sas.com/t5/SAS-Programming/comparision-between-2-variables-are-not-matching/m-p/437545#M108967</link>
      <description>&lt;P&gt;Seems to work fine?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In what row do you see the problem?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data WORK.TENT;
  infile datalines dsd truncover;
  input SUBJECT:$5. START_TIME:32. TIME2:32.;
datalines4;
N1001,47460,47460
N1001,47460,47460
N1001,45480,45240
N1001,45480,45240
N1002,44880,44880
N1002,44880,44880
N1002,35700,35700
N1002,35700,35700
N1003,54300,54300
N1003,54300,54300
N1008,0,41880
N1008,0,41880
N1008,47400,47400
N1008,47400,47400
N1010,33300,33300
N1010,33300,33300
N1010,33780,33780
N1010,33780,33780
N1011,33660,33660
N1011,33660,33660
N1011,33180,33180
N1011,33180,44760
N1013,31920,31920
N1013,31920,31920
N1013,29760,29760
N1013,29760,29760
N1017,41700,41700
N1017,41700,41700
N1017,42600,42600
N1017,42600,42600
N1018,59100,59100
N1018,59100,59100
N1018,54900,54900
N1018,54900,54900
N1020,49500,49500
N1020,49500,49500
N1020,53400,53400
N1020,53400,53400
N1022,37920,37920
N1022,37920,37920
N1022,46380,46380
N1022,46380,46380
N1024,49200,49200
N1024,49200,49200
N1024,47700,49500
N1024,47700,49500
N1025,51000,51000
N1025,51000,51000
N1026,48480,48480
N1026,48480,48480
;;;;

data nd;
   set TENT;
   format _all_;
   informat _all_;
run;

data ing;
   set nd;
   if start_time ne time2 then flag=1;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 15 Feb 2018 12:43:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/comparision-between-2-variables-are-not-matching/m-p/437545#M108967</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2018-02-15T12:43:03Z</dc:date>
    </item>
    <item>
      <title>Re: comparision between 2 variables are not matching</title>
      <link>https://communities.sas.com/t5/SAS-Programming/comparision-between-2-variables-are-not-matching/m-p/437546#M108968</link>
      <description>&lt;P&gt;I get for a lot of them for example first 2 rows it flags as 1 where as it should be blank.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Feb 2018 12:46:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/comparision-between-2-variables-are-not-matching/m-p/437546#M108968</guid>
      <dc:creator>hanskronie</dc:creator>
      <dc:date>2018-02-15T12:46:01Z</dc:date>
    </item>
    <item>
      <title>Re: comparision between 2 variables are not matching</title>
      <link>https://communities.sas.com/t5/SAS-Programming/comparision-between-2-variables-are-not-matching/m-p/437551#M108971</link>
      <description>&lt;P&gt;Running&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc print data=ing(obs=2);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;on the exact code that I posted gives&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="Capture.PNG" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/18611iC36FDC1FD6EDD419/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;as desired?&lt;/P&gt;</description>
      <pubDate>Thu, 15 Feb 2018 12:49:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/comparision-between-2-variables-are-not-matching/m-p/437551#M108971</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2018-02-15T12:49:53Z</dc:date>
    </item>
    <item>
      <title>Re: comparision between 2 variables are not matching</title>
      <link>https://communities.sas.com/t5/SAS-Programming/comparision-between-2-variables-are-not-matching/m-p/437583#M108985</link>
      <description>A numeric variable will have a '.' for missing. Your statement is creating flag as a numeric variable&lt;BR /&gt; if start_time ne time2 then flag=1; (numeric flag -- all missing will be .)&lt;BR /&gt;&lt;BR /&gt;But if you did:&lt;BR /&gt; if start_time ne time2 then flag='1'; (character variable missing would be blank)&lt;BR /&gt;&lt;BR /&gt;cynthia</description>
      <pubDate>Thu, 15 Feb 2018 14:09:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/comparision-between-2-variables-are-not-matching/m-p/437583#M108985</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2018-02-15T14:09:08Z</dc:date>
    </item>
  </channel>
</rss>

