<?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: Using Format in Proc Import in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Using-Format-in-Proc-Import/m-p/676976#M23758</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/341727"&gt;@IrynaDemko&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I want ParkName to have 30 characters in the proc import statement while Guessingrows sets it to 24. The log says that the format statement is not supported.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;proc import datafile="s:\workshop\data\np_traffic.csv"&lt;BR /&gt;dbms = csv&lt;BR /&gt;out = pg1.traffic replace;&lt;BR /&gt;guessingrows=max;&lt;BR /&gt;format ParkName $30.;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The length of 24 is the longest value encountered in this data set for the variable.&lt;/P&gt;
&lt;P&gt;Changing the forrmat only effects display. If there are only 24 characters that's all there are. You would have to change the&lt;/P&gt;
&lt;P&gt;INFORMAT to get 30 as the length and you can't do that with Proc Import.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When you use Proc Import you are in effect telling SAS to follow some arbitrary generic rules for determining variable properties and those rules will get things other than desired sometimes (or often in the case of some file formats) and based on the actual values encountered. If you want to have consistent results for multiple sets then do not rely on Proc Import.&lt;/P&gt;</description>
    <pubDate>Sat, 15 Aug 2020 15:01:16 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2020-08-15T15:01:16Z</dc:date>
    <item>
      <title>Using Format in Proc Import</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Using-Format-in-Proc-Import/m-p/676923#M23753</link>
      <description>&lt;P&gt;I want ParkName to have 30 characters in the proc import statement while Guessingrows sets it to 24. The log says that the format statement is not supported.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;proc import datafile="s:\workshop\data\np_traffic.csv"&lt;BR /&gt;dbms = csv&lt;BR /&gt;out = pg1.traffic replace;&lt;BR /&gt;guessingrows=max;&lt;BR /&gt;format ParkName $30.;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Sat, 15 Aug 2020 04:32:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Using-Format-in-Proc-Import/m-p/676923#M23753</guid>
      <dc:creator>IrynaDemko</dc:creator>
      <dc:date>2020-08-15T04:32:24Z</dc:date>
    </item>
    <item>
      <title>Re: Using Format in Proc Import</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Using-Format-in-Proc-Import/m-p/676930#M23754</link>
      <description>&lt;P&gt;Copy the code generated by proc import from the log to the program editor&lt;/P&gt;
&lt;P&gt;and make there all required adaptations as adding length, format and other&lt;/P&gt;
&lt;P&gt;statements.&lt;/P&gt;</description>
      <pubDate>Sat, 15 Aug 2020 05:15:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Using-Format-in-Proc-Import/m-p/676930#M23754</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2020-08-15T05:15:02Z</dc:date>
    </item>
    <item>
      <title>Re: Using Format in Proc Import</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Using-Format-in-Proc-Import/m-p/676935#M23755</link>
      <description>&lt;P&gt;It's possible you may need to add this before your PROC IMPORT code for the generated DATA step statements &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/88384"&gt;@Shmuel&lt;/a&gt; is referring to so that it shows in your SAS log:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options source;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 15 Aug 2020 05:41:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Using-Format-in-Proc-Import/m-p/676935#M23755</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2020-08-15T05:41:58Z</dc:date>
    </item>
    <item>
      <title>Re: Using Format in Proc Import</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Using-Format-in-Proc-Import/m-p/676976#M23758</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/341727"&gt;@IrynaDemko&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I want ParkName to have 30 characters in the proc import statement while Guessingrows sets it to 24. The log says that the format statement is not supported.&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;proc import datafile="s:\workshop\data\np_traffic.csv"&lt;BR /&gt;dbms = csv&lt;BR /&gt;out = pg1.traffic replace;&lt;BR /&gt;guessingrows=max;&lt;BR /&gt;format ParkName $30.;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The length of 24 is the longest value encountered in this data set for the variable.&lt;/P&gt;
&lt;P&gt;Changing the forrmat only effects display. If there are only 24 characters that's all there are. You would have to change the&lt;/P&gt;
&lt;P&gt;INFORMAT to get 30 as the length and you can't do that with Proc Import.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When you use Proc Import you are in effect telling SAS to follow some arbitrary generic rules for determining variable properties and those rules will get things other than desired sometimes (or often in the case of some file formats) and based on the actual values encountered. If you want to have consistent results for multiple sets then do not rely on Proc Import.&lt;/P&gt;</description>
      <pubDate>Sat, 15 Aug 2020 15:01:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Using-Format-in-Proc-Import/m-p/676976#M23758</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-08-15T15:01:16Z</dc:date>
    </item>
    <item>
      <title>Re: Using Format in Proc Import</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Using-Format-in-Proc-Import/m-p/676985#M23759</link>
      <description>&lt;P&gt;Note that changing the informat used to convert text into values would not change the length of the variable either.&lt;/P&gt;</description>
      <pubDate>Sat, 15 Aug 2020 16:24:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Using-Format-in-Proc-Import/m-p/676985#M23759</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2020-08-15T16:24:46Z</dc:date>
    </item>
  </channel>
</rss>

