<?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: log in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/log-amp-errors/m-p/827030#M326678</link>
    <description>&lt;P&gt;SAS logs don't lie. If there was no error last month and there is this month then your data has changed to cause it. The challenge is to find what that is.&lt;/P&gt;</description>
    <pubDate>Thu, 04 Aug 2022 01:25:03 GMT</pubDate>
    <dc:creator>SASKiwi</dc:creator>
    <dc:date>2022-08-04T01:25:03Z</dc:date>
    <item>
      <title>log &amp; errors</title>
      <link>https://communities.sas.com/t5/SAS-Programming/log-amp-errors/m-p/827009#M326670</link>
      <description>&lt;P&gt;Hello team,&lt;/P&gt;
&lt;P&gt;I have a program that reads a text file and then do a match with another dataset, it gave errors. I read the log entirely. This is what I got&lt;/P&gt;
&lt;P&gt;Invalid argument to function input at line 3186 column 168&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My data has only 3000 rows and 70 colum.&lt;/P&gt;
&lt;P&gt;Number of errors in File load = 1&lt;/P&gt;
&lt;P&gt;Macro variable SYSCC resolves to 1012.&lt;/P&gt;
&lt;P&gt;I don't need the program to be fixed but I do need to know what causes these issues.&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Blue Berry&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Aug 2022 21:24:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/log-amp-errors/m-p/827009#M326670</guid>
      <dc:creator>GN0001</dc:creator>
      <dc:date>2022-08-03T21:24:13Z</dc:date>
    </item>
    <item>
      <title>Re: log &amp; errors</title>
      <link>https://communities.sas.com/t5/SAS-Programming/log-amp-errors/m-p/827017#M326672</link>
      <description>&lt;P&gt;Typically this would be caused by either an unexpected change to the variable type (character or numeric) used in the argument, or an invalid value in the variable for that argument. An example of an invalid argument&amp;nbsp; to an INPUT function would be alpha characters rather than a number:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;input('12345', best12.); * Valid;
input('ABCD', best12.); * Invalid;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Aug 2022 21:43:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/log-amp-errors/m-p/827017#M326672</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2022-08-03T21:43:05Z</dc:date>
    </item>
    <item>
      <title>Re: log &amp; errors</title>
      <link>https://communities.sas.com/t5/SAS-Programming/log-amp-errors/m-p/827022#M326673</link>
      <description>&lt;P&gt;Show the log of the data step with all the messages. And paste the text in a text box. The message windows will reformat text and the column positions may not align.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Line 3186 refers to a program line in the Log, as does column 168. The fact that your data set has 3000 records has NO bearing at all.&lt;/P&gt;
&lt;P&gt;The 168 is likely a function call that is attempting to use invalid data. There might even been an explicit display of values that are involved.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is a contrived example with the log showing a similar message. &lt;/P&gt;
&lt;PRE&gt;150  data junk;
151     set sashelp.class;
152     if name = 'Mary' then newvar = input(sex,4.);
153  run;

NOTE: Invalid argument to function INPUT at line 152 column 35.
Name=Mary Sex=F Age=15 Height=66.5 Weight=112 newvar=. _ERROR_=1 _N_=14

&lt;/PRE&gt;
&lt;P&gt;See my error says line 152 and that refers to the line number on the left of the log entry. The column 35 refers to the position of the function Input call on that line (just in case you have multiple calls to the same function on a line which is possible).&lt;/P&gt;
&lt;P&gt;The line after that shows the data vector and shows that Sex=F. So trying to read "F" as a number with the 4. informat fails. Note that the _N_ = 14 even tells us which ROW of data has the problem.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If your program worked in the past then that means the underlying data changed somehow. The full log, not just one or two lines, often provides lots of examples.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I get to deal with this as one of the contractors I work with changes the column order of the files sent about every other month. So I routinely have to change the order of my input statement. The clue is typically an invalid data message (or 20).&lt;/P&gt;</description>
      <pubDate>Wed, 03 Aug 2022 22:15:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/log-amp-errors/m-p/827022#M326673</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-08-03T22:15:07Z</dc:date>
    </item>
    <item>
      <title>Re: log</title>
      <link>https://communities.sas.com/t5/SAS-Programming/log-amp-errors/m-p/827024#M326674</link>
      <description>Hello,&lt;BR /&gt;I tested the order of columns and contents from prior month to this month. I can’t see anything is changed and I can’t find the error.&lt;BR /&gt;&lt;BR /&gt;Thanks &lt;BR /&gt;Blue berry &lt;BR /&gt;</description>
      <pubDate>Wed, 03 Aug 2022 23:14:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/log-amp-errors/m-p/827024#M326674</guid>
      <dc:creator>GN0001</dc:creator>
      <dc:date>2022-08-03T23:14:45Z</dc:date>
    </item>
    <item>
      <title>Re: log</title>
      <link>https://communities.sas.com/t5/SAS-Programming/log-amp-errors/m-p/827030#M326678</link>
      <description>&lt;P&gt;SAS logs don't lie. If there was no error last month and there is this month then your data has changed to cause it. The challenge is to find what that is.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Aug 2022 01:25:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/log-amp-errors/m-p/827030#M326678</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2022-08-04T01:25:03Z</dc:date>
    </item>
  </channel>
</rss>

