<?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: SAS code problem (simple one) in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/SAS-code-problem-simple-one/m-p/213539#M52685</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI, rw9.&lt;/P&gt;&lt;P&gt;i Want to know why&amp;nbsp; b=1 when you run my first program but b= a missing value in my second program.&lt;/P&gt;&lt;P&gt;both of them are same program.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 25 Jun 2015 11:27:32 GMT</pubDate>
    <dc:creator>gyambqt</dc:creator>
    <dc:date>2015-06-25T11:27:32Z</dc:date>
    <item>
      <title>SAS code problem (simple one)</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-code-problem-simple-one/m-p/213533#M52679</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Experts,&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Calibri',sans-serif; font-size: 11pt; mso-fareast-font-family: SimSun; mso-fareast-theme-font: minor-fareast; mso-ansi-language: EN-AU; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA; mso-bidi-font-family: 'Times New Roman';"&gt;I have two programs, A and B, I want to know why the "if" condition is satisfied in program B but not satisfied in program A&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Program A:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;data a;&lt;/P&gt;&lt;P&gt;input;&lt;BR /&gt;if _infile_=:"abc" then b=1;&lt;BR /&gt;output;&lt;BR /&gt;cards;&lt;BR /&gt;ab&lt;/P&gt;&lt;P&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Program B:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I create a txt file called “file” then I save the value "ab" to the file&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data a;&lt;/P&gt;&lt;P&gt;infile "c:/file.txt";&lt;BR /&gt;input;&lt;/P&gt;&lt;P&gt;if _infile_=:"abc" then b=1;&lt;BR /&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jun 2015 03:52:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-code-problem-simple-one/m-p/213533#M52679</guid>
      <dc:creator>gyambqt</dc:creator>
      <dc:date>2015-06-25T03:52:05Z</dc:date>
    </item>
    <item>
      <title>Re: SAS code problem (simple one)</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-code-problem-simple-one/m-p/213534#M52680</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The value in the CARDS data is "ab,", not "ab"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jun 2015 05:01:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-code-problem-simple-one/m-p/213534#M52680</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2015-06-25T05:01:50Z</dc:date>
    </item>
    <item>
      <title>Re: SAS code problem (simple one)</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-code-problem-simple-one/m-p/213535#M52681</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the typo has been fixed in my original post.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jun 2015 05:57:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-code-problem-simple-one/m-p/213535#M52681</guid>
      <dc:creator>gyambqt</dc:creator>
      <dc:date>2015-06-25T05:57:25Z</dc:date>
    </item>
    <item>
      <title>Re: SAS code problem (simple one)</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-code-problem-simple-one/m-p/213536#M52682</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is it your trying to achieve?&amp;nbsp; Personally I would not trust any code which "guesses" things straight off.&amp;nbsp; Always be explicit and clear in your code.&amp;nbsp; Also, by what do you mean the condition is not satisfied, example inputs and outputs are descriptive.&amp;nbsp; I would first start by changing the code to:&lt;/P&gt;&lt;P&gt;data a;&lt;/P&gt;&lt;P&gt;&amp;nbsp; length tmp $20;&amp;nbsp; /* Explicitly set length so we know this is not an issue */&lt;/P&gt;&lt;P&gt;&amp;nbsp; input tmp $;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Explicitly set a variable so we know what data is being read in */&lt;/P&gt;&lt;P&gt;&amp;nbsp; if tmp="abc" then b=1;&amp;nbsp; /* Write the logic using the read in data - preferable using standard logic gate */&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;ab&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jun 2015 09:02:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-code-problem-simple-one/m-p/213536#M52682</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2015-06-25T09:02:55Z</dc:date>
    </item>
    <item>
      <title>Re: SAS code problem (simple one)</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-code-problem-simple-one/m-p/213537#M52683</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You said it's a typo so assuming the value is "abc". When running below code in my environment then the condition is true. So I can't replicate your result.&lt;/P&gt;&lt;P&gt;Can you please post your real code AFTER you actually run it (copy/paste) so that we can replicate what you seem to observe?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data a;&lt;/P&gt;&lt;P&gt;input;&lt;/P&gt;&lt;P&gt;if _infile_=:"abc" then b=1;&lt;/P&gt;&lt;P&gt;output;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;abc&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jun 2015 11:08:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-code-problem-simple-one/m-p/213537#M52683</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2015-06-25T11:08:43Z</dc:date>
    </item>
    <item>
      <title>Re: SAS code problem (simple one)</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-code-problem-simple-one/m-p/213538#M52684</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI patrick, &lt;/P&gt;&lt;P&gt;the typo has been fixed in my original post.&lt;/P&gt;&lt;P&gt;the value following cards statement is ab &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jun 2015 11:25:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-code-problem-simple-one/m-p/213538#M52684</guid>
      <dc:creator>gyambqt</dc:creator>
      <dc:date>2015-06-25T11:25:28Z</dc:date>
    </item>
    <item>
      <title>Re: SAS code problem (simple one)</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-code-problem-simple-one/m-p/213539#M52685</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI, rw9.&lt;/P&gt;&lt;P&gt;i Want to know why&amp;nbsp; b=1 when you run my first program but b= a missing value in my second program.&lt;/P&gt;&lt;P&gt;both of them are same program.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jun 2015 11:27:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-code-problem-simple-one/m-p/213539#M52685</guid>
      <dc:creator>gyambqt</dc:creator>
      <dc:date>2015-06-25T11:27:32Z</dc:date>
    </item>
    <item>
      <title>Re: SAS code problem (simple one)</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-code-problem-simple-one/m-p/213540#M52686</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;O.K. - now I can replicate what you're saying and it looks like a bug to me. I&lt;SPAN style="text-decoration: line-through;"&gt; suggest you raise a SAS TechSupport track for this one and then let us know what answer you've got.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's not a bug. Read &lt;A __default_attr="2431" __jive_macro_name="user" class="jive_macro jive_macro_user" data-objecttype="3" href="https://communities.sas.com/"&gt;&lt;/A&gt;'s explanation below. That explains it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I believe the value for "b" in data set a2 should be missing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data a1;&lt;/P&gt;&lt;P&gt;&amp;nbsp; infile datalines truncover;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if _infile_=:"abc" then b=1;&lt;/P&gt;&lt;P&gt;&amp;nbsp; output;&lt;/P&gt;&lt;P&gt;&amp;nbsp; cards;&lt;/P&gt;&lt;P&gt;ab&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;filename ab temp;&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;&amp;nbsp; file ab;&lt;/P&gt;&lt;P&gt;&amp;nbsp; put 'ab';&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data a2;&lt;/P&gt;&lt;P&gt;&amp;nbsp; infile ab truncover;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input var :$10.;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if _infile_=:"abc" then b=1;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if var=:"abc" then c=1;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jun 2015 11:58:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-code-problem-simple-one/m-p/213540#M52686</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2015-06-25T11:58:54Z</dc:date>
    </item>
    <item>
      <title>Re: SAS code problem (simple one)</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-code-problem-simple-one/m-p/213541#M52687</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thats why I am asking for clarification.&amp;nbsp; When I run the code posted in your original post:&lt;/P&gt;&lt;P&gt;data a;&lt;/P&gt;&lt;P&gt;input;&lt;/P&gt;&lt;P&gt;if _infile_=:"abc" then b=1;&lt;/P&gt;&lt;P&gt;output;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;ab&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;This yields a dataset called a in work which has one column b with missing value.&amp;nbsp; Hence I don't understand what your question is about.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jun 2015 12:12:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-code-problem-simple-one/m-p/213541#M52687</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2015-06-25T12:12:59Z</dc:date>
    </item>
    <item>
      <title>Re: SAS code problem (simple one)</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-code-problem-simple-one/m-p/213542#M52688</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;to me, it seems when you read raw data from txt file, the record hold in the input buffer _infile_ will be applied a trim function automatically&amp;nbsp; when sas evaluate expression with colon like _infile_=: "abc".&lt;/P&gt;&lt;P&gt;so the right side of the expression "abc" will be truncated to "ab" .&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;Trim("_infile_")="ab" &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;or "ab" ="ab"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;however if sas read data using cards statement, since input buffer _infile_ has a default length of 32367,&lt;/P&gt;&lt;P&gt;so the left side of the expression will be truncated to 3.&amp;nbsp; &lt;/P&gt;&lt;P&gt;e.g. "ab&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (A lot of space until 32367 characters reached)&amp;nbsp; "="abc". Become "ab "="abc"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jun 2015 12:15:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-code-problem-simple-one/m-p/213542#M52688</guid>
      <dc:creator>gyambqt</dc:creator>
      <dc:date>2015-06-25T12:15:35Z</dc:date>
    </item>
    <item>
      <title>Re: SAS code problem (simple one)</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-code-problem-simple-one/m-p/213543#M52689</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI rw9,&lt;/P&gt;&lt;P&gt;i Am expecting both program a and b produce same result Like either b=1 or missing value in both program. &lt;/P&gt;&lt;P&gt;BUt when you run the two program. B=1 in first program and b=. In second program. Why?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jun 2015 12:20:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-code-problem-simple-one/m-p/213543#M52689</guid>
      <dc:creator>gyambqt</dc:creator>
      <dc:date>2015-06-25T12:20:36Z</dc:date>
    </item>
    <item>
      <title>Re: SAS code problem (simple one)</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-code-problem-simple-one/m-p/213544#M52690</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The answer goes back to the value of _infile_.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When reading data from a file, _infile_ is a copy of the incoming data line.&amp;nbsp; But when reading in-stream using CARDS, _infile_ is automatically 80 bytes long.&amp;nbsp; So in that case, you end up comparing three characters ("abc") to three characters ("ab ") and find that they do not match.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jun 2015 12:26:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-code-problem-simple-one/m-p/213544#M52690</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2015-06-25T12:26:37Z</dc:date>
    </item>
    <item>
      <title>Re: SAS code problem (simple one)</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-code-problem-simple-one/m-p/213545#M52691</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Because you are using the : modifier.&amp;nbsp; When you read from a text file the value of _INFILE_ matches what is in the file. If the line actually contains trailing blanks then the trialing blanks will be in the _INFILE_ variable.&amp;nbsp; When you read from CARDS then the lines are padded to a multiple of 80 bytes (ie card images).&lt;/P&gt;&lt;P&gt;Try it with a file that has trailing blanks on the lines.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;filename&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; sample &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;temp&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;&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: blue; background: white;"&gt;_null_&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; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;file&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; sample;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;put&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: purple; background: white;"&gt;'ab'&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; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;put&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: purple; background: white;"&gt;'ab '&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;&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;&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: blue; background: white;"&gt;_null_&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; &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: black; background: white;"&gt; sample &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;length&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;=len;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&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;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;&amp;nbsp; check= (&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: purple; background: white;"&gt;'abc'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;=:_infile_);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;put&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; check= len=&amp;nbsp; &lt;/SPAN&gt;&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: black; background: white;"&gt;;&lt;/SPAN&gt;&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;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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jun 2015 15:18:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-code-problem-simple-one/m-p/213545#M52691</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2015-06-25T15:18:57Z</dc:date>
    </item>
    <item>
      <title>Re: SAS code problem (simple one)</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-code-problem-simple-one/m-p/213546#M52692</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;Small input from my side also. Just use 'TRIM function' with _infile_ and your if condition will match&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;*Program A;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;data a;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&amp;nbsp; input;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&amp;nbsp; if trim(_infile_)=: "abc" then b=1;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&amp;nbsp; output;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&amp;nbsp; put _infile_ b=;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;datalines;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;ab&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;*Program B;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;data a;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&amp;nbsp; infile "C:\temp\file.txt";&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&amp;nbsp; input;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&amp;nbsp; if trim(_infile_)=:"abc" then b=1;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&amp;nbsp; output;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&amp;nbsp; put _infile_ '*****' b=;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jun 2015 16:22:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-code-problem-simple-one/m-p/213546#M52692</guid>
      <dc:creator>AmitRathore</dc:creator>
      <dc:date>2015-06-25T16:22:16Z</dc:date>
    </item>
    <item>
      <title>Re: SAS code problem (simple one)</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/SAS-code-problem-simple-one/m-p/213547#M52693</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How about chenge from:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; infile "c:/file.txt";&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; To:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; infile "c:/file.txt"&amp;nbsp;&amp;nbsp; LRECL=80&amp;nbsp;&amp;nbsp; PAD ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in Program B.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ozawa&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Jun 2015 06:15:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/SAS-code-problem-simple-one/m-p/213547#M52693</guid>
      <dc:creator>OzawaOZ</dc:creator>
      <dc:date>2015-06-26T06:15:12Z</dc:date>
    </item>
  </channel>
</rss>

