<?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>Thema "Betreff: INFILE: txt-Datei einlesen unter UNIX" in CoDe SAS German</title>
    <link>https://communities.sas.com/t5/CoDe-SAS-German/INFILE-txt-Datei-einlesen-unter-UNIX/m-p/340782#M2240</link>
    <description>&lt;P&gt;Hallo,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;beim Infile-statement&amp;nbsp; option termstr = verwenden.&lt;/P&gt;
&lt;P&gt;Es gibt die Optionen CRLF für Windows Zeilenenende mit x0D0A, CR für Mac Zeilenende mit x0D und LF für Unix-Zeilenende mit&amp;nbsp; x0A&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Ansonsten hat die Datei eventuell keinen Zeilenumbruch und der Versatz kommt nur aus dem automatischen Umbruch deines Editors. Schon mal die Fenstergröße geändert?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Viele Grüße&lt;/P&gt;
&lt;P&gt;Jan&lt;/P&gt;</description>
    <pubDate>Tue, 14 Mar 2017 14:01:11 GMT</pubDate>
    <dc:creator>jh_ti_bw</dc:creator>
    <dc:date>2017-03-14T14:01:11Z</dc:date>
    <item>
      <title>INFILE: txt-Datei einlesen unter UNIX</title>
      <link>https://communities.sas.com/t5/CoDe-SAS-German/INFILE-txt-Datei-einlesen-unter-UNIX/m-p/340728#M2236</link>
      <description>&lt;P&gt;Guten Tag,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Die Datei enthält mehrere rows, es wir aber nur die erste Zeile eingelesen. Woran kann es liegen?&lt;/P&gt;
&lt;P&gt;ich habe es mit INFILE XXXX TRUNCOVER probiert.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Mar 2017 10:28:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/CoDe-SAS-German/INFILE-txt-Datei-einlesen-unter-UNIX/m-p/340728#M2236</guid>
      <dc:creator>Ina</dc:creator>
      <dc:date>2017-03-14T10:28:56Z</dc:date>
    </item>
    <item>
      <title>Betreff: INFILE: txt-Datei einlesen unter UNIX</title>
      <link>https://communities.sas.com/t5/CoDe-SAS-German/INFILE-txt-Datei-einlesen-unter-UNIX/m-p/340741#M2237</link>
      <description>&lt;P&gt;Von welcher Plattform stammt die Datei (Windows, UNIX, sonstwas)?&lt;/P&gt;
&lt;P&gt;Wie kommt die Datei vom Ursprung zum SAS-Server?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Irgendwo da passiert wahrscheinlich was.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Unter Windows solltest Du die Datei mit sowas wie notepad++ öffnen und dann auf Hexadezimal-Darstellung schalten; damit sieht man dann, wie die Zeilenenden kodiert sind.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Edit: SAS läuft unter UNIX, also ist das schon mal geklärt. Bleibt die Frage, wie die Datei zum UNIX-Server kommt, und von wo sie ursprünglich stammt. Im Notfall einen Exzerpt in ein zip-Archiv stellen und das hier anhängen.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Mar 2017 11:53:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/CoDe-SAS-German/INFILE-txt-Datei-einlesen-unter-UNIX/m-p/340741#M2237</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-03-14T11:53:54Z</dc:date>
    </item>
    <item>
      <title>Betreff: INFILE: txt-Datei einlesen unter UNIX</title>
      <link>https://communities.sas.com/t5/CoDe-SAS-German/INFILE-txt-Datei-einlesen-unter-UNIX/m-p/340743#M2238</link>
      <description>&lt;P&gt;Die Datei liegt auch auf UNIX.&lt;/P&gt;
&lt;P&gt;wie sie zum Unix-Server kommt, weiß ich leider nicht. Ursprünglich war es eine txt-Datei.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;mit INFILE XXX lrecl=106 recfm=f&lt;/P&gt;
&lt;P&gt;habe ich es geschafft, dass auch andere Zeilen gelesen, aber mit fehlerhaften Einträgen.&lt;/P&gt;
&lt;P&gt;Ich vermute, es liegt daran, dass&lt;/P&gt;
&lt;P&gt;die Datei so aussieht:&lt;/P&gt;
&lt;P&gt;a b c d&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; a b c d&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; a b c d&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;</description>
      <pubDate>Tue, 14 Mar 2017 12:05:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/CoDe-SAS-German/INFILE-txt-Datei-einlesen-unter-UNIX/m-p/340743#M2238</guid>
      <dc:creator>Ina</dc:creator>
      <dc:date>2017-03-14T12:05:02Z</dc:date>
    </item>
    <item>
      <title>Betreff: INFILE: txt-Datei einlesen unter UNIX</title>
      <link>https://communities.sas.com/t5/CoDe-SAS-German/INFILE-txt-Datei-einlesen-unter-UNIX/m-p/340746#M2239</link>
      <description>&lt;P&gt;Wenn das so gestaffelt aussieht, dann ist höchstwahrscheinlich recfm=f korrekt, aber die lrecl zu kurz.&lt;/P&gt;
&lt;P&gt;Einfach den Verschub von einer Zeile zur nächsten auszählen und das Ergebnis zur lrecl addieren.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Trotzdem ist es wichtig, die Struktur der Datei zu kennen. Auf Linux gibts das Tool hexdump zum Anzeigen einer Datei in Hexadezimal-Darstellung.&lt;/P&gt;
&lt;PRE&gt;hexdump -C dateiname | head&lt;/PRE&gt;
&lt;P&gt;zeigt einem die ersten 160 Zeichen. Falls mehr gebraucht wird, einfach (zB) -20 an das head anhängen.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Mar 2017 12:11:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/CoDe-SAS-German/INFILE-txt-Datei-einlesen-unter-UNIX/m-p/340746#M2239</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-03-14T12:11:29Z</dc:date>
    </item>
    <item>
      <title>Betreff: INFILE: txt-Datei einlesen unter UNIX</title>
      <link>https://communities.sas.com/t5/CoDe-SAS-German/INFILE-txt-Datei-einlesen-unter-UNIX/m-p/340782#M2240</link>
      <description>&lt;P&gt;Hallo,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;beim Infile-statement&amp;nbsp; option termstr = verwenden.&lt;/P&gt;
&lt;P&gt;Es gibt die Optionen CRLF für Windows Zeilenenende mit x0D0A, CR für Mac Zeilenende mit x0D und LF für Unix-Zeilenende mit&amp;nbsp; x0A&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Ansonsten hat die Datei eventuell keinen Zeilenumbruch und der Versatz kommt nur aus dem automatischen Umbruch deines Editors. Schon mal die Fenstergröße geändert?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Viele Grüße&lt;/P&gt;
&lt;P&gt;Jan&lt;/P&gt;</description>
      <pubDate>Tue, 14 Mar 2017 14:01:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/CoDe-SAS-German/INFILE-txt-Datei-einlesen-unter-UNIX/m-p/340782#M2240</guid>
      <dc:creator>jh_ti_bw</dc:creator>
      <dc:date>2017-03-14T14:01:11Z</dc:date>
    </item>
    <item>
      <title>Betreff: INFILE: txt-Datei einlesen unter UNIX</title>
      <link>https://communities.sas.com/t5/CoDe-SAS-German/INFILE-txt-Datei-einlesen-unter-UNIX/m-p/340794#M2241</link>
      <description>&lt;P&gt;Mit auszählen des Abstandes für lrecl hat es geklappt! Vielen Dank!&lt;/P&gt;</description>
      <pubDate>Tue, 14 Mar 2017 14:22:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/CoDe-SAS-German/INFILE-txt-Datei-einlesen-unter-UNIX/m-p/340794#M2241</guid>
      <dc:creator>Ina</dc:creator>
      <dc:date>2017-03-14T14:22:34Z</dc:date>
    </item>
    <item>
      <title>Betreff: INFILE: txt-Datei einlesen unter UNIX</title>
      <link>https://communities.sas.com/t5/CoDe-SAS-German/INFILE-txt-Datei-einlesen-unter-UNIX/m-p/340796#M2242</link>
      <description>&lt;P&gt;mit der Option termstr=lf klappt es leider nicht&lt;/P&gt;</description>
      <pubDate>Tue, 14 Mar 2017 14:25:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/CoDe-SAS-German/INFILE-txt-Datei-einlesen-unter-UNIX/m-p/340796#M2242</guid>
      <dc:creator>Ina</dc:creator>
      <dc:date>2017-03-14T14:25:18Z</dc:date>
    </item>
    <item>
      <title>Betreff: INFILE: txt-Datei einlesen unter UNIX</title>
      <link>https://communities.sas.com/t5/CoDe-SAS-German/INFILE-txt-Datei-einlesen-unter-UNIX/m-p/340800#M2243</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;Ina schrieb:&lt;BR /&gt;
&lt;P&gt;mit der Option termstr=lf klappt es leider nicht&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Das sieht mir auch sehr nach einer FB-Datei vom Großrechner aus. Oder nach etwas, das genauso erstellt wurde.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Mar 2017 14:35:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/CoDe-SAS-German/INFILE-txt-Datei-einlesen-unter-UNIX/m-p/340800#M2243</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-03-14T14:35:47Z</dc:date>
    </item>
  </channel>
</rss>

