<?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: Invalid data in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Invalid-data/m-p/822559#M324825</link>
    <description>&lt;P&gt;I tried both of these things and was still not able to get it to work. Also the GROC variable is meant to be numeric so I don't want it to be read as a character variable. Any other thoughts?&lt;/P&gt;</description>
    <pubDate>Mon, 11 Jul 2022 14:09:11 GMT</pubDate>
    <dc:creator>balinsk1</dc:creator>
    <dc:date>2022-07-11T14:09:11Z</dc:date>
    <item>
      <title>Invalid data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Invalid-data/m-p/822488#M324794</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I keep getting error messages and have not been able to figure out how to adjust my data to make this work. Any help would be greatly appreciated. Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jul 2022 02:40:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Invalid-data/m-p/822488#M324794</guid>
      <dc:creator>balinsk1</dc:creator>
      <dc:date>2022-07-11T02:40:25Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Invalid-data/m-p/822496#M324798</link>
      <description>&lt;P&gt;Take the data step code from the log, and change the type of GROC to character.&lt;/P&gt;
&lt;P&gt;Or set GUESSINGROWS=MAX for PROC IMPORT.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jul 2022 05:31:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Invalid-data/m-p/822496#M324798</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-07-11T05:31:28Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Invalid-data/m-p/822559#M324825</link>
      <description>&lt;P&gt;I tried both of these things and was still not able to get it to work. Also the GROC variable is meant to be numeric so I don't want it to be read as a character variable. Any other thoughts?&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jul 2022 14:09:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Invalid-data/m-p/822559#M324825</guid>
      <dc:creator>balinsk1</dc:creator>
      <dc:date>2022-07-11T14:09:11Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Invalid-data/m-p/822562#M324826</link>
      <description>&lt;P&gt;Why did you go to the trouble of making a PDF file and adding as an attachment instead of just copying the text and pasting it into your question.&lt;/P&gt;
&lt;P&gt;For example here are the notes from the end of the data step about how many lines read:&lt;/P&gt;
&lt;PRE&gt; NOTE: 203 records were read from the infile REFFILE.
 The minimum record length was 50.
 The maximum record length was 321.
 NOTE: The data set WORK.IMPORT5 has 203 observations and 59 variables.&lt;/PRE&gt;
&lt;P&gt;There is no way you could have a line with only 50 characters that contains values for 59 variables.&lt;/P&gt;
&lt;P&gt;Most likely some of the lines have embedded end of line character in them and that is confusing the data step.&lt;/P&gt;
&lt;P&gt;Remove those end of line characters.&lt;/P&gt;
&lt;P&gt;Since the file only has 203 lines (and will have less once you fix it) just open it in a TEXT editor and remove those offending end of lines.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jul 2022 14:25:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Invalid-data/m-p/822562#M324826</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-07-11T14:25:04Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Invalid-data/m-p/822568#M324828</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/327650"&gt;@balinsk1&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I tried both of these things and was still not able to get it to work. Also the GROC variable is meant to be numeric so I don't want it to be read as a character variable. Any other thoughts?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Look at your log. "T04" is positively not numeric.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Edit: it seems to be what&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;&amp;nbsp;already found. You have line breaks in character columns.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jul 2022 16:42:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Invalid-data/m-p/822568#M324828</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-07-11T16:42:50Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Invalid-data/m-p/822612#M324834</link>
      <description>So the T04 is actually input for the therapist ID variable and not for GROC. The therapist ID variable is meant to be a character variable but the GROC variable is meant to be numeric.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 11 Jul 2022 18:50:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Invalid-data/m-p/822612#M324834</guid>
      <dc:creator>balinsk1</dc:creator>
      <dc:date>2022-07-11T18:50:39Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Invalid-data/m-p/822614#M324835</link>
      <description>Hi,&lt;BR /&gt;I am not sure how to remove embedded end of line characters. What is the best way to do this?&lt;BR /&gt;</description>
      <pubDate>Mon, 11 Jul 2022 18:51:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Invalid-data/m-p/822614#M324835</guid>
      <dc:creator>balinsk1</dc:creator>
      <dc:date>2022-07-11T18:51:39Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Invalid-data/m-p/822618#M324837</link>
      <description>&lt;P&gt;See here:&amp;nbsp;&lt;A href="https://support.sas.com/kb/26/065.html" target="_blank" rel="noopener"&gt;https://support.sas.com/kb/26/065.html&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jul 2022 18:56:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Invalid-data/m-p/822618#M324837</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-07-11T18:56:14Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Invalid-data/m-p/822645#M324844</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/327650"&gt;@balinsk1&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Hi,&lt;BR /&gt;I am not sure how to remove embedded end of line characters. What is the best way to do this?&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You don't know how to edit a text file? How did you create the SAS program code then?&lt;/P&gt;
&lt;P&gt;You should have some type text editor on your computer. Such as NOTEPAD program that comes with WIndows.&amp;nbsp; Just open the file in the editor. find the lines where the line breaks are. It should be obvious. In your posted log the second part all started with a quote. Just delete the end of line before the quote on those broken lines.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want to use CODE to fix the file here is a link to a macro that will attempt to fix it.&amp;nbsp; But it will only work on files that are corrupted in a well defined pattern. That is they have extra end of line characters enclosed in double quote characters.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/sasutils/macros/blob/master/replace_crlf.sas" target="_blank"&gt;https://github.com/sasutils/macros/blob/master/replace_crlf.sas&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jul 2022 19:50:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Invalid-data/m-p/822645#M324844</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-07-11T19:50:25Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Invalid-data/m-p/822647#M324845</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;See here:&amp;nbsp;&lt;A href="https://support.sas.com/kb/26/065.html" target="_blank" rel="noopener"&gt;https://support.sas.com/kb/26/065.html&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;If you use that code make sure to run it on a COPY of the file as it modifies the file you run it against.&lt;/P&gt;
&lt;P&gt;They even include a warning on the Knowledge Base page.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;You should make a copy of your file&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;before&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;running this sample on it.&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Mon, 11 Jul 2022 19:53:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Invalid-data/m-p/822647#M324845</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-07-11T19:53:31Z</dc:date>
    </item>
  </channel>
</rss>

