<?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 Files from PC to Unix in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Import-Files-from-PC-to-Unix/m-p/107902#M30085</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you, HaiKuo.&lt;/P&gt;&lt;P&gt;I ran your code and received an error stating "the physical file does not exist".&amp;nbsp; It seems to look for the file on the Unix server and can't find it.&amp;nbsp; This is part an automated program so&amp;nbsp; manual upload is not preferred. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any other suggestions?&lt;/P&gt;&lt;P&gt;I really appreciate your help! &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 26 Dec 2012 16:41:49 GMT</pubDate>
    <dc:creator>KevinC_</dc:creator>
    <dc:date>2012-12-26T16:41:49Z</dc:date>
    <item>
      <title>Import Files from PC to Unix</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Import-Files-from-PC-to-Unix/m-p/107898#M30081</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to 'import' a text file from PC to Unix.&amp;nbsp; I have tried using the code below with no success.&amp;nbsp; I wonder if anyone knows a different approach?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Proc Import out = DNL&lt;/P&gt;&lt;P&gt;database= "c:\My Docs\Denials.txt"&lt;/P&gt;&lt;P&gt;DBMS=TAB Replace;&lt;/P&gt;&lt;P&gt;Getnames=Yes;&lt;/P&gt;&lt;P&gt;Datarow=2;&lt;/P&gt;&lt;P&gt;Run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I submit this code from Unix it just sits there without generating an error code or any output.&amp;nbsp; I always end up killing the job later.&amp;nbsp; Does anyone have any suggestions on how to get data from PC to Unix?&amp;nbsp; This needs to be done within a SAS program, meaning no manual intervention, as this is an automated process.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I really appreciate any input! &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Dec 2012 20:21:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Import-Files-from-PC-to-Unix/m-p/107898#M30081</guid>
      <dc:creator>KevinC_</dc:creator>
      <dc:date>2012-12-24T20:21:14Z</dc:date>
    </item>
    <item>
      <title>Re: Import Files from PC to Unix</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Import-Files-from-PC-to-Unix/m-p/107899#M30082</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you post a txt file you imported.&lt;/P&gt;&lt;P&gt;Maybe your txt file is not really txt file, it is a delimiter file. or try.&lt;/P&gt;&lt;P&gt;DBMS=dlm Replace;&lt;/P&gt;&lt;P&gt;delimiter='|' ;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Dec 2012 05:12:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Import-Files-from-PC-to-Unix/m-p/107899#M30082</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2012-12-25T05:12:42Z</dc:date>
    </item>
    <item>
      <title>Re: Import Files from PC to Unix</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Import-Files-from-PC-to-Unix/m-p/107900#M30083</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you, Ksharp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is a sample of the text file I am trying to import.&amp;nbsp; It is tab delimited.&amp;nbsp; Hence the 'DBMS=TAB replace" in my code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"ID"&amp;nbsp; "Client"&amp;nbsp; "C_Code"&lt;/P&gt;&lt;P&gt;"0001298477"&amp;nbsp; "743"&amp;nbsp; "41"&lt;/P&gt;&lt;P&gt;"0003876533"&amp;nbsp; "654"&amp;nbsp; "20"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions? &lt;/P&gt;&lt;P&gt;Thanks again.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Dec 2012 15:10:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Import-Files-from-PC-to-Unix/m-p/107900#M30083</guid>
      <dc:creator>KevinC_</dc:creator>
      <dc:date>2012-12-26T15:10:24Z</dc:date>
    </item>
    <item>
      <title>Re: Import Files from PC to Unix</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Import-Files-from-PC-to-Unix/m-p/107901#M30084</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;One possible lazy approach is to using infile statment and pre-assign a large length to include all of your variables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data dnl;&lt;/P&gt;&lt;P&gt;&amp;nbsp; infile "c:\My Docs\Denials.txt" dsd dlm='09'x firstobs=2;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input (ID Client C_Code) (:$15.);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Haikuo &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Dec 2012 15:39:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Import-Files-from-PC-to-Unix/m-p/107901#M30084</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2012-12-26T15:39:38Z</dc:date>
    </item>
    <item>
      <title>Re: Import Files from PC to Unix</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Import-Files-from-PC-to-Unix/m-p/107902#M30085</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you, HaiKuo.&lt;/P&gt;&lt;P&gt;I ran your code and received an error stating "the physical file does not exist".&amp;nbsp; It seems to look for the file on the Unix server and can't find it.&amp;nbsp; This is part an automated program so&amp;nbsp; manual upload is not preferred. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any other suggestions?&lt;/P&gt;&lt;P&gt;I really appreciate your help! &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Dec 2012 16:41:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Import-Files-from-PC-to-Unix/m-p/107902#M30085</guid>
      <dc:creator>KevinC_</dc:creator>
      <dc:date>2012-12-26T16:41:49Z</dc:date>
    </item>
    <item>
      <title>Re: Import Files from PC to Unix</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Import-Files-from-PC-to-Unix/m-p/107903#M30086</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So you are running SAS on Unix server. Then you need the correct network mapping address for your txt file, or you need to do FTP. Check SAS docs on "filename ftp".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Haikuo &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Dec 2012 16:48:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Import-Files-from-PC-to-Unix/m-p/107903#M30086</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2012-12-26T16:48:47Z</dc:date>
    </item>
    <item>
      <title>Re: Import Files from PC to Unix</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Import-Files-from-PC-to-Unix/m-p/107904#M30087</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have the correct network mapping.&amp;nbsp; I looked up the FTP stuff and don't really know how it applies to my situation.&lt;/P&gt;&lt;P&gt;Does Proc Import even work on Unix?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Dec 2012 17:14:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Import-Files-from-PC-to-Unix/m-p/107904#M30087</guid>
      <dc:creator>KevinC_</dc:creator>
      <dc:date>2012-12-26T17:14:13Z</dc:date>
    </item>
    <item>
      <title>Re: Import Files from PC to Unix</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Import-Files-from-PC-to-Unix/m-p/107905#M30088</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, "c:\My Docs\Denials.txt" does NOT look like a network address to me. Proc import will work the same on Unix as it works on PC, but you do need to input the address that Unix can recognize. "c:\My Docs\Denials.txt" is clearly a windows address.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Haikuo&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;update: Let me restate it clearly, you need to either map "c:\My Docs\Denials.txt" as a network address that Unix can access, Or you need to use FTP to bring this file to your Unix server.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Dec 2012 17:17:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Import-Files-from-PC-to-Unix/m-p/107905#M30088</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2012-12-26T17:17:57Z</dc:date>
    </item>
    <item>
      <title>Re: Import Files from PC to Unix</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Import-Files-from-PC-to-Unix/m-p/107906#M30089</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your reply.&lt;/P&gt;&lt;P&gt;Since this is an automated process, both approaches (a Unix-reconizable directory or FTP) will need to require no manual intervention.&amp;nbsp; That is the part I am having difficulties with.&amp;nbsp; I can easily FTP the file or run proc import from PC SAS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way to automatically FTP a file from a windows directory to a UNIX directory - meaning including it as part of the code?&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Dec 2012 18:44:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Import-Files-from-PC-to-Unix/m-p/107906#M30089</guid>
      <dc:creator>KevinC_</dc:creator>
      <dc:date>2012-12-26T18:44:27Z</dc:date>
    </item>
    <item>
      <title>Re: Import Files from PC to Unix</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Import-Files-from-PC-to-Unix/m-p/107907#M30090</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you can't have your windows address mounted ( this is only need to be done one time), then try the following FTP approach: &lt;/P&gt;&lt;P&gt;Step 1: Make sure your PC or Windows server has FTP server running. Check this with your Windows team, if not, then you need to install FTP server service and make it active. This is only need to be done one time.&lt;/P&gt;&lt;P&gt;Step 2: &lt;/P&gt;&lt;P&gt;filename myfile ftp ' \Denials.txt ' cd= 'c:\My Docs\ '&lt;/P&gt;&lt;P&gt;&amp;nbsp; user='xxx'&lt;/P&gt;&lt;P&gt; pass=xxx &lt;/P&gt;&lt;P&gt;&amp;nbsp; host='network name or ip address of your pc or win server'&lt;/P&gt;&lt;P&gt;&amp;nbsp; recfm=v ;run;&lt;/P&gt;&lt;P&gt;data dnl;&lt;/P&gt;&lt;P&gt;&amp;nbsp; infile myfile dsd dlm='09'x firstobs=2;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input (ID Client C_Code) (:$15.);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck,&lt;/P&gt;&lt;P&gt;Haikuo &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Dec 2012 19:23:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Import-Files-from-PC-to-Unix/m-p/107907#M30090</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2012-12-26T19:23:41Z</dc:date>
    </item>
    <item>
      <title>Re: Import Files from PC to Unix</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Import-Files-from-PC-to-Unix/m-p/107908#M30091</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I found a problem in your code.&lt;/P&gt;&lt;P&gt;database= "c:\My Docs\Denials.txt"&lt;/P&gt;&lt;P&gt;should be&lt;/P&gt;&lt;P&gt;datafile= "c:\My Docs\Denials.txt"&lt;/P&gt;&lt;P&gt;and your sample data is not delimited by TAB ,but a white space.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Proc Import out = DNL&lt;/P&gt;&lt;P&gt;datafile= "c:\My Docs\Denials.txt"&lt;/P&gt;&lt;P&gt;DBMS=dlm Replace;&lt;/P&gt;&lt;P&gt;Getnames=Yes;&lt;/P&gt;&lt;P&gt;Datarow=2;&lt;/P&gt;&lt;P&gt;delimiter=' ';&lt;/P&gt;&lt;P&gt;Run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Recommend to use webdev to map your local PC fold to UNIX , then you can directly use this path to import this file into UNIX.&lt;/P&gt;&lt;P&gt;filename x webdev 'your-path' ;&lt;/P&gt;&lt;P&gt;..................&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ksharp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Dec 2012 04:45:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Import-Files-from-PC-to-Unix/m-p/107908#M30091</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2012-12-27T04:45:11Z</dc:date>
    </item>
    <item>
      <title>Re: Import Files from PC to Unix</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Import-Files-from-PC-to-Unix/m-p/107909#M30092</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Ksharp for your suggestion.&lt;/P&gt;&lt;P&gt;I have modified my code according to your suggestion.&amp;nbsp; The code still sits there without generating any output or errors.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I wonder if my Unix environment has been 'setup' to handle proc import.&amp;nbsp; Is there some kind of command(s) I need to run in my Unix folder before using proc import? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Dec 2012 16:31:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Import-Files-from-PC-to-Unix/m-p/107909#M30092</guid>
      <dc:creator>KevinC_</dc:creator>
      <dc:date>2012-12-27T16:31:30Z</dc:date>
    </item>
    <item>
      <title>Re: Import Files from PC to Unix</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Import-Files-from-PC-to-Unix/m-p/107910#M30093</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;"I wonder if my Unix environment has been 'setup' to handle proc import. "&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am afraid that your UNIX is not ready for it . You need the help from your UNIX administrator .&lt;/P&gt;&lt;P&gt;Let him use SIMBA (a software can mount a Windows folder on a UNIX directory ), at that time , you can use the proc import as I suggested.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good Luck.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ksharp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Dec 2012 01:33:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Import-Files-from-PC-to-Unix/m-p/107910#M30093</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2012-12-28T01:33:09Z</dc:date>
    </item>
  </channel>
</rss>

