<?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: File Imported Different from actual file in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/File-Imported-Different-from-actual-file/m-p/459896#M70286</link>
    <description>&lt;P&gt;A very common issue with any data entered in Excel, especially in the default general type fields, is that a value that looks like a number may actually be characters.&amp;nbsp;There&amp;nbsp; are associated issues around custom displays for certain values.&lt;/P&gt;
&lt;P&gt;Specific issues with specific files requires looking at the data to determine why.&lt;/P&gt;
&lt;P&gt;Generally I look at CSV files in a text editor as Excel hides so much garbage in many ways.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#ff0000" size="4"&gt;Didn't work &lt;/FONT&gt;&lt;/STRONG&gt;is awful vague.&lt;BR /&gt;&lt;BR /&gt;Are there errors in the log?: Post the code and log in a code box opened with the {i} to maintain formatting of error messages.&lt;BR /&gt;&lt;BR /&gt;No output? Post any log in a code box.&lt;BR /&gt;&lt;BR /&gt;Unexpected output? Provide input data in the form of data step code pasted into a code box, the actual results and the expected results. Instructions here: &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat&lt;/A&gt;... will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the {i} icon or attached as text to show exactly what you have and that we can test code against.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However you may be learning that anything in the WORK library , as placed there with:&lt;/P&gt;
&lt;PRE&gt;PROC IMPORT OUT= WORK.all &lt;/PRE&gt;
&lt;P&gt;is temporary and deleted when SAS shuts down. Or if SAS crashes for some reason (macro programming anyone?) when restarted the WORK library is assigned to a different location. So you may be able to recover work from a crashed session. Maybe.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 16 May 2018 15:32:47 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2018-05-16T15:32:47Z</dc:date>
    <item>
      <title>File Imported Different from actual file</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/File-Imported-Different-from-actual-file/m-p/459880#M70283</link>
      <description>&lt;P&gt;G'day.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We are attempting to import an .xlsx file.&amp;nbsp; We had used the proc import statement&lt;/P&gt;
&lt;PRE&gt;%let location= D:\;
%let filename=All.xlsx;


PROC IMPORT OUT= WORK.all 
	DATAFILE= "'&amp;amp;location.&amp;amp;filename'" 
            DBMS=EXCEL REPLACE;
     RANGE="All$"; 
     GETNAMES=YES;
     MIXED=NO;
     SCANTEXT=YES;
     USEDATE=YES;
     SCANTIME=YES;
RUN;&lt;/PRE&gt;
&lt;P&gt;The file which has about 9000&amp;nbsp;rows&amp;nbsp;imported fine except one field.&amp;nbsp; This one field with problems&amp;nbsp;was missing the 3 nonzero observations which were 1 digit long.&amp;nbsp; The field:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;-is a 'General' type in the&amp;nbsp;excel spreadsheet&amp;nbsp;under 'Number'&lt;/P&gt;
&lt;P&gt;-&amp;nbsp; in the Excel file had 2 observations missing information in row 2000 and 7000&lt;/P&gt;
&lt;P&gt;- had all zeros in the spreadsheet&amp;nbsp;except 3 observations which were listed in row 3000 and 6000 and 8000&lt;/P&gt;
&lt;P&gt;- was&amp;nbsp;imported as numeric in SAS&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Finally, when closing and reopening SAS and restarting the computer didn't work, after using the Import WIzard, it worked.&lt;/P&gt;
&lt;P&gt;Why did it work for the import wizard but not using the program and macro variables above?&amp;nbsp; Now, I'm importing everything using the Import wizard.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Thu, 03 May 2018 22:32:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/File-Imported-Different-from-actual-file/m-p/459880#M70283</guid>
      <dc:creator>jcis7</dc:creator>
      <dc:date>2018-05-03T22:32:20Z</dc:date>
    </item>
    <item>
      <title>Re: File Imported Different from actual file</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/File-Imported-Different-from-actual-file/m-p/459896#M70286</link>
      <description>&lt;P&gt;A very common issue with any data entered in Excel, especially in the default general type fields, is that a value that looks like a number may actually be characters.&amp;nbsp;There&amp;nbsp; are associated issues around custom displays for certain values.&lt;/P&gt;
&lt;P&gt;Specific issues with specific files requires looking at the data to determine why.&lt;/P&gt;
&lt;P&gt;Generally I look at CSV files in a text editor as Excel hides so much garbage in many ways.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;FONT color="#ff0000" size="4"&gt;Didn't work &lt;/FONT&gt;&lt;/STRONG&gt;is awful vague.&lt;BR /&gt;&lt;BR /&gt;Are there errors in the log?: Post the code and log in a code box opened with the {i} to maintain formatting of error messages.&lt;BR /&gt;&lt;BR /&gt;No output? Post any log in a code box.&lt;BR /&gt;&lt;BR /&gt;Unexpected output? Provide input data in the form of data step code pasted into a code box, the actual results and the expected results. Instructions here: &lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat&lt;/A&gt;... will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the {i} icon or attached as text to show exactly what you have and that we can test code against.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However you may be learning that anything in the WORK library , as placed there with:&lt;/P&gt;
&lt;PRE&gt;PROC IMPORT OUT= WORK.all &lt;/PRE&gt;
&lt;P&gt;is temporary and deleted when SAS shuts down. Or if SAS crashes for some reason (macro programming anyone?) when restarted the WORK library is assigned to a different location. So you may be able to recover work from a crashed session. Maybe.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 May 2018 15:32:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/File-Imported-Different-from-actual-file/m-p/459896#M70286</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-05-16T15:32:47Z</dc:date>
    </item>
    <item>
      <title>Re: File Imported Different from actual file</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/File-Imported-Different-from-actual-file/m-p/459931#M70289</link>
      <description>&lt;P&gt;If you want consistent results, get rid&amp;nbsp; of the crappy Excel file format and of proc import. Save to csv, and use a custom written data step to read that. Otherwise, you'll always be subject to the idiosyncrasies of Excel and the guessings of proc import.&lt;/P&gt;</description>
      <pubDate>Fri, 04 May 2018 04:48:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/File-Imported-Different-from-actual-file/m-p/459931#M70289</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-05-04T04:48:09Z</dc:date>
    </item>
    <item>
      <title>Re: File Imported Different from actual file</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/File-Imported-Different-from-actual-file/m-p/460119#M70296</link>
      <description>Thanks. I tried viewing the link but it is brought me to a page that said the content moved.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 04 May 2018 17:40:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/File-Imported-Different-from-actual-file/m-p/460119#M70296</guid>
      <dc:creator>jcis7</dc:creator>
      <dc:date>2018-05-04T17:40:41Z</dc:date>
    </item>
    <item>
      <title>Re: File Imported Different from actual file</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/File-Imported-Different-from-actual-file/m-p/460120#M70297</link>
      <description>Thanks.  Any guidance on how exactly to do that?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 04 May 2018 17:41:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/File-Imported-Different-from-actual-file/m-p/460120#M70297</guid>
      <dc:creator>jcis7</dc:creator>
      <dc:date>2018-05-04T17:41:41Z</dc:date>
    </item>
    <item>
      <title>Re: File Imported Different from actual file</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/File-Imported-Different-from-actual-file/m-p/461153#M70344</link>
      <description>&lt;P&gt;Didn't work means one field which had all zeros for its almost 10,000 observations except a few was imported as all zeros.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is&amp;nbsp; the Excel file as Text (tab delimted) the same as copying and pasting into a text editor?&lt;/P&gt;
&lt;P&gt;Or Is saving as a .csv foolproof?&lt;/P&gt;
&lt;P&gt;Or is getting requesting it as text from the source the best?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Wed, 09 May 2018 18:16:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/File-Imported-Different-from-actual-file/m-p/461153#M70344</guid>
      <dc:creator>jcis7</dc:creator>
      <dc:date>2018-05-09T18:16:53Z</dc:date>
    </item>
    <item>
      <title>Re: File Imported Different from actual file</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/File-Imported-Different-from-actual-file/m-p/461864#M70376</link>
      <description>&lt;UL&gt;
&lt;LI&gt;In Excel, File Save as CSV&lt;/LI&gt;
&lt;LI&gt;In SAS, modify your PROC IMPORT to use DBMS = CSV&lt;/LI&gt;
&lt;LI&gt;SAS will generate DATA step code which you can see in the SAS log&lt;/LI&gt;
&lt;LI&gt;Copy the SAS log code into your SAS editor and change it until you get your desired result&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Sun, 13 May 2018 20:38:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/File-Imported-Different-from-actual-file/m-p/461864#M70376</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2018-05-13T20:38:08Z</dc:date>
    </item>
    <item>
      <title>Re: File Imported Different from actual file</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/File-Imported-Different-from-actual-file/m-p/471530#M70928</link>
      <description>&lt;P&gt;Question:&amp;nbsp; How do you copy the SAS Code from the log while omitting the line numbers in the log? Or do I post as a different question?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jun 2018 21:32:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/File-Imported-Different-from-actual-file/m-p/471530#M70928</guid>
      <dc:creator>jcis7</dc:creator>
      <dc:date>2018-06-19T21:32:54Z</dc:date>
    </item>
    <item>
      <title>Re: File Imported Different from actual file</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/File-Imported-Different-from-actual-file/m-p/471604#M70932</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/40498"&gt;@jcis7&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Question:&amp;nbsp; How do you copy the SAS Code from the log while omitting the line numbers in the log? Or do I post as a different question?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;While marking text for copying with the mouse, hold down the Alt key. This lets you select a vertically and horizontally aligned block.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jun 2018 05:10:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/File-Imported-Different-from-actual-file/m-p/471604#M70932</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-06-20T05:10:19Z</dc:date>
    </item>
  </channel>
</rss>

