<?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: Import Unsuccessful in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Import-Unsuccessful/m-p/850594#M37253</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Where is SAS actually executing?&lt;/P&gt;
&lt;P&gt;And the search path to your file doesn't look like a desktop location.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As mentioned, a complete log would help.&lt;/P&gt;</description>
    <pubDate>Wed, 21 Dec 2022 10:33:25 GMT</pubDate>
    <dc:creator>LinusH</dc:creator>
    <dc:date>2022-12-21T10:33:25Z</dc:date>
    <item>
      <title>Import Unsuccessful</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Import-Unsuccessful/m-p/850578#M37250</link>
      <description>&lt;P&gt;Iam using proc import procedure to import .txt file to SAS.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The&amp;nbsp; text file is in my desktop. The following is the code.&lt;/P&gt;&lt;P&gt;proc import datafile="/Desktop/Sample.txt"&lt;/P&gt;&lt;P&gt;out=new_sample&lt;/P&gt;&lt;P&gt;dbms=dlm&lt;/P&gt;&lt;P&gt;replace;&lt;/P&gt;&lt;P&gt;guessingrows=2;&lt;/P&gt;&lt;P&gt;getnames=no;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;The log error is given below&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;ERROR: Import unsuccessful. See SAS Log for details.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Is there something wrong in the way I have imported the file??. Kindly support.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Dec 2022 06:52:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Import-Unsuccessful/m-p/850578#M37250</guid>
      <dc:creator>vinsonros</dc:creator>
      <dc:date>2022-12-21T06:52:25Z</dc:date>
    </item>
    <item>
      <title>Re: Import Unsuccessful</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Import-Unsuccessful/m-p/850580#M37251</link>
      <description>Good Morning ... could you provide the log file, pls (as indicated)? And maybe the first couple of lines of your input file ...&lt;BR /&gt;--fja</description>
      <pubDate>Wed, 21 Dec 2022 07:37:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Import-Unsuccessful/m-p/850580#M37251</guid>
      <dc:creator>fja</dc:creator>
      <dc:date>2022-12-21T07:37:21Z</dc:date>
    </item>
    <item>
      <title>Re: Import Unsuccessful</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Import-Unsuccessful/m-p/850594#M37253</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Where is SAS actually executing?&lt;/P&gt;
&lt;P&gt;And the search path to your file doesn't look like a desktop location.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As mentioned, a complete log would help.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Dec 2022 10:33:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Import-Unsuccessful/m-p/850594#M37253</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2022-12-21T10:33:25Z</dc:date>
    </item>
    <item>
      <title>Re: Import Unsuccessful</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Import-Unsuccessful/m-p/850601#M37254</link>
      <description>&lt;P&gt;Hello &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/437853"&gt;@vinsonros&lt;/a&gt;,&lt;BR /&gt;I'm guessing without seeing the full log that there is also a message in the Log stating ERROR: Physical file does not exist, \Desktop\Sample.txt. Here is a tip to help you locate the full path of the .txt file that is needed for the &lt;STRONG&gt;datafile=&lt;/STRONG&gt; option.&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Locate the file on the Desktop&lt;/LI&gt;
&lt;LI&gt;Right click the file.&lt;/LI&gt;
&lt;LI&gt;Select Properties&lt;/LI&gt;
&lt;LI&gt;Copy and paste the value in the &lt;STRONG&gt;Location:&lt;/STRONG&gt; field in the Properties window for the file into the&amp;nbsp;&lt;FONT face="times new roman,times"&gt;datafile="&lt;STRONG&gt;&lt;EM&gt;Copy-paste-location-here&lt;/EM&gt;&lt;/STRONG&gt;/Sample.txt"&lt;/FONT&gt;&amp;nbsp; option.&lt;/LI&gt;
&lt;LI&gt;Try submitting the code again.&amp;nbsp;&amp;nbsp;&lt;/LI&gt;
&lt;/OL&gt;</description>
      <pubDate>Wed, 21 Dec 2022 11:46:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Import-Unsuccessful/m-p/850601#M37254</guid>
      <dc:creator>D_Dunlap</dc:creator>
      <dc:date>2022-12-21T11:46:36Z</dc:date>
    </item>
    <item>
      <title>Re: Import Unsuccessful</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Import-Unsuccessful/m-p/850799#M37295</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the reply.&lt;/P&gt;&lt;P&gt;Please find the attached log as requested.The following is the program run. This program run in Sas studio.&lt;/P&gt;&lt;P&gt;proc import datafile="C:/Users/acer/Desktop/Sample.txt"&lt;/P&gt;&lt;P&gt;out=vin_blanks4&lt;/P&gt;&lt;P&gt;dbms=dlm&lt;/P&gt;&lt;P&gt;replace;&lt;/P&gt;&lt;P&gt;guessingrows=2;&lt;/P&gt;&lt;P&gt;getnames=no;&lt;/P&gt;&lt;P&gt;run;&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>Thu, 22 Dec 2022 15:22:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Import-Unsuccessful/m-p/850799#M37295</guid>
      <dc:creator>vinsonros</dc:creator>
      <dc:date>2022-12-22T15:22:20Z</dc:date>
    </item>
    <item>
      <title>Re: Import Unsuccessful</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Import-Unsuccessful/m-p/850807#M37296</link>
      <description>&lt;P&gt;There is no need to attach text as FILES.&amp;nbsp; Just paste into the pop-up window opened by the Insert Code icon.&lt;/P&gt;
&lt;PRE&gt;ERROR: Physical file does not exist, /pbr/biconfig/940/Lev1/SASApp/C:/Users/acer/Desktop/Sample.txt. &lt;/PRE&gt;
&lt;P&gt;The reason it did not work is that there is no file with that name on the machine where SAS is running.&lt;/P&gt;
&lt;P&gt;It looks like you tried to ask SAS to find a file on your machine instead of one on the machine where SAS is running.&amp;nbsp; Since the filename did not start with the root node Unix interpreted it as a relative file name so it looked for that a directory named C: under the current working directory that was in effect with SAS started.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Upload the file to your SAS machine first and then use a path in the SAS code that points to where you put the file.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Dec 2022 16:05:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Import-Unsuccessful/m-p/850807#M37296</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-12-22T16:05:19Z</dc:date>
    </item>
    <item>
      <title>Re: Import Unsuccessful</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Import-Unsuccessful/m-p/850808#M37297</link>
      <description>&lt;P&gt;This is your clue (as usual, the&amp;nbsp;&lt;U&gt;first&lt;/U&gt; error message is the most important):&lt;/P&gt;
&lt;PRE&gt;ERROR: Physical file does not exist, /pbr/biconfig/940/Lev1/SASApp/C:/Users/acer/Desktop/Sample.txt. &lt;/PRE&gt;
&lt;P&gt;You try to use a Windows path, while your SAS runs on a remote UNIX server.&lt;/P&gt;
&lt;P&gt;Either upload the file to the server (both SAS Studio and Enterprise Guide can do this), or store it on a network share accessible both from your desktop and the SAS server.&lt;/P&gt;
&lt;P&gt;If you use a licensed SAS install at your company/institution, get in touch with your SAS admins. If this happens on SAS On Demand, upload the file with SAS Studio and import from the upload location.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Dec 2022 16:06:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Import-Unsuccessful/m-p/850808#M37297</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-12-22T16:06:36Z</dc:date>
    </item>
    <item>
      <title>Re: Import Unsuccessful</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Import-Unsuccessful/m-p/850809#M37298</link>
      <description>&lt;P&gt;There is no need to use PROC IMPORT to read a simple file like that.&lt;/P&gt;
&lt;PRE&gt;vineeth 85 35 Suceess
Rosu 95 55 Failure
Ryan 35 25 Sucess
Sonny 45 21 Sucess&lt;/PRE&gt;
&lt;P&gt;Just write the code yourself, you will do a MUCH better job than PROC IMPORT could.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
  infile '~/Sample.txt' truncover;
  input name :$20. var1 var2 status :$10. ;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 22 Dec 2022 16:12:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Import-Unsuccessful/m-p/850809#M37298</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-12-22T16:12:07Z</dc:date>
    </item>
    <item>
      <title>Re: Import Unsuccessful</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Import-Unsuccessful/m-p/850906#M37300</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Thanks for the code.&lt;/P&gt;&lt;P&gt;I am in the learning stage now just would like to see whether proc import procedure is working in the system and why the error is being shown in the pgm.&lt;/P&gt;&lt;P&gt;Part of the learning process:)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Dec 2022 07:10:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Import-Unsuccessful/m-p/850906#M37300</guid>
      <dc:creator>vinsonros</dc:creator>
      <dc:date>2022-12-23T07:10:50Z</dc:date>
    </item>
    <item>
      <title>Re: Import Unsuccessful</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Import-Unsuccessful/m-p/850925#M37302</link>
      <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;&lt;SPAN&gt;why the error is being shown in the pgm&lt;/SPAN&gt;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Hello!&lt;/P&gt;
&lt;P&gt;As indicated already by the others: Your program cannot find the file under the path and name you have provided in the code.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When looking at the log message it seems that you try to use a windows path on a unix machine (where sas runs). That is, you need to make the file available to sas first and than use the filename under which sas sees the file.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In other words: You need to upload the file to the sas machine (or use some shared folders) so that you find it listed in SAS Studio. And the properties of _that_ file (again via SAS) reveal the path and filename you need to use in your in your program.&lt;/P&gt;
&lt;P&gt;--fja&lt;/P&gt;</description>
      <pubDate>Fri, 23 Dec 2022 08:58:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Import-Unsuccessful/m-p/850925#M37302</guid>
      <dc:creator>fja</dc:creator>
      <dc:date>2022-12-23T08:58:13Z</dc:date>
    </item>
  </channel>
</rss>

