<?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 Trimming during Import File Procedure in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Trimming-during-Import-File-Procedure/m-p/65649#M6604</link>
    <description>Hi!&lt;BR /&gt;
I've got problems impoting DOS TXT File to SAS Server using EG Import File Wizard. The problem results in trimming some values of character string.&lt;BR /&gt;
&lt;BR /&gt;
For instance, for a character field SAS assigned field width equaled 25 characters.&lt;BR /&gt;
&lt;BR /&gt;
Performing File import procedure results in creating a SAS Data set. &lt;BR /&gt;
&lt;BR /&gt;
Verifying obtained SAS Data set I've noticed that there were some observations with fields length originally greater than 25 which result in trimming such values from the right side from their initial length to 25 symbols.&lt;BR /&gt;
&lt;BR /&gt;
It's absolutely unclear for me how SAS calculates the maximum width of the character fiels. I never had such problems in Excel or Access.&lt;BR /&gt;
&lt;BR /&gt;
The only understandable way of fixing the problem is to determine somehow the length of the longest string of the field and to correct informat manually prior to start import procedure. In most cases it is hard to accomplish due to giant number of observations.&lt;BR /&gt;
&lt;BR /&gt;
Please help me avoid importing txt data trimming, help me make SAS understand maximum field width.&lt;BR /&gt;
&lt;BR /&gt;
P.S.&lt;BR /&gt;
For Excel Files Import in EG we have special option "Use longest value as column width" (Tools\Options\Perfomance)</description>
    <pubDate>Tue, 25 Jan 2011 11:37:07 GMT</pubDate>
    <dc:creator>V_Andy</dc:creator>
    <dc:date>2011-01-25T11:37:07Z</dc:date>
    <item>
      <title>Trimming during Import File Procedure</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Trimming-during-Import-File-Procedure/m-p/65649#M6604</link>
      <description>Hi!&lt;BR /&gt;
I've got problems impoting DOS TXT File to SAS Server using EG Import File Wizard. The problem results in trimming some values of character string.&lt;BR /&gt;
&lt;BR /&gt;
For instance, for a character field SAS assigned field width equaled 25 characters.&lt;BR /&gt;
&lt;BR /&gt;
Performing File import procedure results in creating a SAS Data set. &lt;BR /&gt;
&lt;BR /&gt;
Verifying obtained SAS Data set I've noticed that there were some observations with fields length originally greater than 25 which result in trimming such values from the right side from their initial length to 25 symbols.&lt;BR /&gt;
&lt;BR /&gt;
It's absolutely unclear for me how SAS calculates the maximum width of the character fiels. I never had such problems in Excel or Access.&lt;BR /&gt;
&lt;BR /&gt;
The only understandable way of fixing the problem is to determine somehow the length of the longest string of the field and to correct informat manually prior to start import procedure. In most cases it is hard to accomplish due to giant number of observations.&lt;BR /&gt;
&lt;BR /&gt;
Please help me avoid importing txt data trimming, help me make SAS understand maximum field width.&lt;BR /&gt;
&lt;BR /&gt;
P.S.&lt;BR /&gt;
For Excel Files Import in EG we have special option "Use longest value as column width" (Tools\Options\Perfomance)</description>
      <pubDate>Tue, 25 Jan 2011 11:37:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Trimming-during-Import-File-Procedure/m-p/65649#M6604</guid>
      <dc:creator>V_Andy</dc:creator>
      <dc:date>2011-01-25T11:37:07Z</dc:date>
    </item>
    <item>
      <title>Re: Trimming during Import File Procedure</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Trimming-during-Import-File-Procedure/m-p/65650#M6605</link>
      <description>What version of EGuide?  The Excel import got a lot smarter in 4.2.&lt;BR /&gt;
&lt;BR /&gt;
Another possibilitiy:  Was it the last field imported in a row?  Sometimes non-printable (control) characters can cause problems.  &lt;EOL&gt; and &lt;CTRL&gt; are two that can be nasty to deal with.&lt;/CTRL&gt;&lt;/EOL&gt;</description>
      <pubDate>Tue, 25 Jan 2011 16:01:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Trimming-during-Import-File-Procedure/m-p/65650#M6605</guid>
      <dc:creator>Doc_Duke</dc:creator>
      <dc:date>2011-01-25T16:01:45Z</dc:date>
    </item>
    <item>
      <title>Re: Trimming during Import File Procedure</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Trimming-during-Import-File-Procedure/m-p/65651#M6606</link>
      <description>SAS Enterprise Guide 4.1 (4.1.0.1013)&lt;BR /&gt;
&lt;BR /&gt;
I'm talking about import of DOS TEXT Format but not Excel.&lt;BR /&gt;
This is neither the last field nor the last row.&lt;BR /&gt;
The problem is that within the column values may have various length. In my case I have a table with 3 000 rows.&lt;BR /&gt;
&lt;BR /&gt;
Initially (before import procedure) in one column I have:&lt;BR /&gt;
OTHER&lt;BR /&gt;
HYPOVOL&lt;BR /&gt;
NONSHOCK&lt;BR /&gt;
BACTER&lt;BR /&gt;
CRYSTAL&lt;BR /&gt;
DISCUSSION&lt;BR /&gt;
COMMUNITY&lt;BR /&gt;
&lt;BR /&gt;
For the column shown above EG assigns a width of 7 symbols.&lt;BR /&gt;
&lt;BR /&gt;
After performing File Import procedure I obtain trimming in lines # 3, 6 and 7:&lt;BR /&gt;
&lt;BR /&gt;
OTHER&lt;BR /&gt;
HYPOVOL&lt;BR /&gt;
NONSHOC  &lt;BR /&gt;
BACTER&lt;BR /&gt;
CRYSTAL&lt;BR /&gt;
DISCUSS  &lt;BR /&gt;
COMMUNI  &lt;BR /&gt;
&lt;BR /&gt;
For the exact column I could assign the column width manually (editing informat option) but due to huge number of rows (about 3 milion) I can't determine the longest string.&lt;BR /&gt;
I thing that there is either special option or special informat in SAS EG with variable string width.&lt;BR /&gt;
Does anybody know how to solve the problem?&lt;BR /&gt;
&lt;BR /&gt;
Message was edited by: V.Andy

Message was edited by: V.Andy</description>
      <pubDate>Wed, 26 Jan 2011 07:59:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Trimming-during-Import-File-Procedure/m-p/65651#M6606</guid>
      <dc:creator>V_Andy</dc:creator>
      <dc:date>2011-01-26T07:59:56Z</dc:date>
    </item>
  </channel>
</rss>

