<?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 proc import truncating values in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/proc-import-truncating-values/m-p/916628#M361020</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When&amp;nbsp; I proc import my CSV file, some of the values are truncated.&amp;nbsp; I'm think because the first variable has a length=39, which is causing longer variables to be truncated.&amp;nbsp; How do i avoid this issue?&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;%web_drop_table(WORK.IMPORT1);


FILENAME REFFILE "data.csv";

PROC IMPORT DATAFILE=REFFILE
	DBMS=csv
	OUT=WORK.IMPORT1;
	GETNAMES=YES;
RUN;

PROC CONTENTS DATA=WORK.IMPORT1; RUN;


%web_open_table(WORK.IMPORT1);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;excel spreadsheet variable:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="HitmonTran_0-1708189160943.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/93890i387F843B7C625C81/image-size/large?v=v2&amp;amp;px=999" role="button" title="HitmonTran_0-1708189160943.png" alt="HitmonTran_0-1708189160943.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;data truncated:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="HitmonTran_1-1708189224605.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/93891iDA4CAC12E423B4C5/image-size/large?v=v2&amp;amp;px=999" role="button" title="HitmonTran_1-1708189224605.png" alt="HitmonTran_1-1708189224605.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 17 Feb 2024 17:00:36 GMT</pubDate>
    <dc:creator>HitmonTran</dc:creator>
    <dc:date>2024-02-17T17:00:36Z</dc:date>
    <item>
      <title>proc import truncating values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-import-truncating-values/m-p/916628#M361020</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When&amp;nbsp; I proc import my CSV file, some of the values are truncated.&amp;nbsp; I'm think because the first variable has a length=39, which is causing longer variables to be truncated.&amp;nbsp; How do i avoid this issue?&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;%web_drop_table(WORK.IMPORT1);


FILENAME REFFILE "data.csv";

PROC IMPORT DATAFILE=REFFILE
	DBMS=csv
	OUT=WORK.IMPORT1;
	GETNAMES=YES;
RUN;

PROC CONTENTS DATA=WORK.IMPORT1; RUN;


%web_open_table(WORK.IMPORT1);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;excel spreadsheet variable:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="HitmonTran_0-1708189160943.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/93890i387F843B7C625C81/image-size/large?v=v2&amp;amp;px=999" role="button" title="HitmonTran_0-1708189160943.png" alt="HitmonTran_0-1708189160943.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;data truncated:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="HitmonTran_1-1708189224605.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/93891iDA4CAC12E423B4C5/image-size/large?v=v2&amp;amp;px=999" role="button" title="HitmonTran_1-1708189224605.png" alt="HitmonTran_1-1708189224605.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 17 Feb 2024 17:00:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-import-truncating-values/m-p/916628#M361020</guid>
      <dc:creator>HitmonTran</dc:creator>
      <dc:date>2024-02-17T17:00:36Z</dc:date>
    </item>
    <item>
      <title>Re: proc import truncating values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-import-truncating-values/m-p/916629#M361021</link>
      <description>&lt;P&gt;PROC IMPORT is a guessing procedure, it sometimes guesses wrong. But for CSV files, the code used by PROC IMPORT is in the log, you could easily copy the code out of the log and then modify it so that it works on your data. Or, you can add the option &lt;FONT face="courier new,courier"&gt;GUESSINGROWS=MAX;&lt;/FONT&gt; into your PROC IMPORT code and this ought to work as well, but it will take a very long time if you have a large data set.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And what do the calls to the two different macros have to do with anything?&lt;/P&gt;</description>
      <pubDate>Sat, 17 Feb 2024 16:53:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-import-truncating-values/m-p/916629#M361021</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2024-02-17T16:53:01Z</dc:date>
    </item>
    <item>
      <title>Re: proc import truncating values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-import-truncating-values/m-p/916693#M361061</link>
      <description>&lt;P&gt;&lt;STRONG&gt;CAUTION:&lt;/STRONG&gt; You show your&amp;nbsp; CSV file opened in Excel. You want to be very careful with this as if you accidentally SAVE the file when closing Excel (such as you widened a column for readability which Excel interprets as a change to the file) as Excel will change some values when saving the file. Which means that your CSV may misbehave in a number of ways.&lt;/P&gt;</description>
      <pubDate>Sun, 18 Feb 2024 16:19:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-import-truncating-values/m-p/916693#M361061</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2024-02-18T16:19:54Z</dc:date>
    </item>
  </channel>
</rss>

