<?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 import csv or Access table from Window environment to Unix Environment in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/import-csv-or-Access-table-from-Window-environment-to-Unix/m-p/445123#M111510</link>
    <description>&lt;P&gt;I am working on SAS 9.4 which is available on cloud Unix environment and I have a file which is available in the window environment. I know I can import this file manually going file--&amp;gt;import data. So according to me if this is available manually then there should be any such way by coding as well. I need to automate it so I can't go every time and import this manually.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Though I have my File in MS-Access, for ease purpose I mentioned csv also. If you can solve the problem for either CSV file or access file. It will work for me.&lt;/P&gt;</description>
    <pubDate>Tue, 13 Mar 2018 12:04:11 GMT</pubDate>
    <dc:creator>Deepankar</dc:creator>
    <dc:date>2018-03-13T12:04:11Z</dc:date>
    <item>
      <title>import csv or Access table from Window environment to Unix Environment</title>
      <link>https://communities.sas.com/t5/SAS-Programming/import-csv-or-Access-table-from-Window-environment-to-Unix/m-p/445123#M111510</link>
      <description>&lt;P&gt;I am working on SAS 9.4 which is available on cloud Unix environment and I have a file which is available in the window environment. I know I can import this file manually going file--&amp;gt;import data. So according to me if this is available manually then there should be any such way by coding as well. I need to automate it so I can't go every time and import this manually.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Though I have my File in MS-Access, for ease purpose I mentioned csv also. If you can solve the problem for either CSV file or access file. It will work for me.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Mar 2018 12:04:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/import-csv-or-Access-table-from-Window-environment-to-Unix/m-p/445123#M111510</guid>
      <dc:creator>Deepankar</dc:creator>
      <dc:date>2018-03-13T12:04:11Z</dc:date>
    </item>
    <item>
      <title>Re: import csv or Access table from Window environment to Unix Environment</title>
      <link>https://communities.sas.com/t5/SAS-Programming/import-csv-or-Access-table-from-Window-environment-to-Unix/m-p/445128#M111512</link>
      <description>&lt;P&gt;CSV would be the simplest.&amp;nbsp; This is a plain text file with data delimited by commas.&amp;nbsp; So you can read that in one any system, using datastep or proc import.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Access is Windows only, so you need to use something called pcfiles.&amp;nbsp; There are details in the manual, assuming you have that licensed.&amp;nbsp; Personally I would really avoid proprietary file formats, as it just adds adds in the overhead.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Mar 2018 12:12:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/import-csv-or-Access-table-from-Window-environment-to-Unix/m-p/445128#M111512</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-03-13T12:12:24Z</dc:date>
    </item>
    <item>
      <title>Re: import csv or Access table from Window environment to Unix Environment</title>
      <link>https://communities.sas.com/t5/SAS-Programming/import-csv-or-Access-table-from-Window-environment-to-Unix/m-p/445130#M111513</link>
      <description>&lt;P&gt;how to write this by code as csv&amp;nbsp;is available on window environment &amp;amp; i have to import this in unix&amp;nbsp;environment via sas.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Mar 2018 12:15:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/import-csv-or-Access-table-from-Window-environment-to-Unix/m-p/445130#M111513</guid>
      <dc:creator>Deepankar</dc:creator>
      <dc:date>2018-03-13T12:15:08Z</dc:date>
    </item>
    <item>
      <title>Re: import csv or Access table from Window environment to Unix Environment</title>
      <link>https://communities.sas.com/t5/SAS-Programming/import-csv-or-Access-table-from-Window-environment-to-Unix/m-p/445134#M111515</link>
      <description>&lt;P&gt;I don't understand what you mean?&amp;nbsp; CSV is a plain text file, you import it the same way on any operating system.&amp;nbsp; Either datastep:&lt;/P&gt;
&lt;PRE&gt;data want;
  infile "yourcsv.csv" dlm=",";
  length a 8 b $10;
  input a b $;
run;
  &lt;/PRE&gt;
&lt;P&gt;Plenty of examples out there.&lt;/P&gt;
&lt;P&gt;Or via proc import:&lt;/P&gt;
&lt;PRE&gt;proc import datafile="yourcsv.csv" out=want dbms=csv;
run;&lt;/PRE&gt;</description>
      <pubDate>Tue, 13 Mar 2018 12:18:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/import-csv-or-Access-table-from-Window-environment-to-Unix/m-p/445134#M111515</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-03-13T12:18:04Z</dc:date>
    </item>
    <item>
      <title>Re: import csv or Access table from Window environment to Unix Environment</title>
      <link>https://communities.sas.com/t5/SAS-Programming/import-csv-or-Access-table-from-Window-environment-to-Unix/m-p/445135#M111516</link>
      <description>&lt;P&gt;If you want to automate this, you need to solve two issues:&lt;/P&gt;
&lt;P&gt;- the server needs to be able to access the file, so you either need a shared resource where you can put the file, or you need to transfer the file to the server, using tools like WinSCP or any other SSH-capable ftp tool.&lt;/P&gt;
&lt;P&gt;- reading a delimited text file. You can start out and write the data step yourself, or you can use proc import to get data step code you can adapt and fine-tune.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Mar 2018 12:23:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/import-csv-or-Access-table-from-Window-environment-to-Unix/m-p/445135#M111516</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-03-13T12:23:01Z</dc:date>
    </item>
    <item>
      <title>Re: import csv or Access table from Window environment to Unix Environment</title>
      <link>https://communities.sas.com/t5/SAS-Programming/import-csv-or-Access-table-from-Window-environment-to-Unix/m-p/445156#M111520</link>
      <description>&lt;P&gt;well, if that is in unix&amp;nbsp;environment then there is no issue atall. when i manually import then sas&amp;nbsp;show the window location and if i write a sas code it only taked&amp;nbsp;unix&amp;nbsp;location. when i use infile&amp;nbsp;when file is on window location then it prepare a file in temp then import it. Can't i do with the code.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Mar 2018 13:16:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/import-csv-or-Access-table-from-Window-environment-to-Unix/m-p/445156#M111520</guid>
      <dc:creator>Deepankar</dc:creator>
      <dc:date>2018-03-13T13:16:52Z</dc:date>
    </item>
    <item>
      <title>Re: import csv or Access table from Window environment to Unix Environment</title>
      <link>https://communities.sas.com/t5/SAS-Programming/import-csv-or-Access-table-from-Window-environment-to-Unix/m-p/445166#M111522</link>
      <description>Hi: When you say you are using a Unix Environment, it would help to be specific. The answer to your question will depend on how you are using SAS on Unix. For example, are you actually using SAS University Edition, with shared folders? In this case, you MUST put the CSV file to import into your shared folder location and then you can import it with code using PROC IMPORT. &lt;BR /&gt;&lt;BR /&gt;Or, if you are using SAS on Unix via SAS OnDemand for Academics, then you CANNOT read from your personal C: drive, but must upload your CSV file to the OnDemand folder location in your /home directory on the OnDemand cloud server and in this case, once uploaded, you can use PROC IMPORT to import the CSV file. &lt;BR /&gt;&lt;BR /&gt;Or, do you have SAS on your company's Unix machine and your files on your personal computer's C: drive? In this case, whether you can run code to import depends entirely on whether the SAS server can read directly from your C: drive. &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt; explained how you would get the file to Unix if the server cannot read your C: drive directly.&lt;BR /&gt;&lt;BR /&gt;cynthia</description>
      <pubDate>Tue, 13 Mar 2018 13:52:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/import-csv-or-Access-table-from-Window-environment-to-Unix/m-p/445166#M111522</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2018-03-13T13:52:50Z</dc:date>
    </item>
    <item>
      <title>Re: import csv or Access table from Window environment to Unix Environment</title>
      <link>https://communities.sas.com/t5/SAS-Programming/import-csv-or-Access-table-from-Window-environment-to-Unix/m-p/445168#M111523</link>
      <description>&lt;P&gt;So you need to solve my first point. Once you know the methods available to you (either how to make a file visible to the server or how to copy it there), we can look for ways to automate this.&lt;/P&gt;
&lt;P&gt;Your network people should be able to help you in this regard.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Mar 2018 14:00:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/import-csv-or-Access-table-from-Window-environment-to-Unix/m-p/445168#M111523</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-03-13T14:00:54Z</dc:date>
    </item>
    <item>
      <title>Re: import csv or Access table from Window environment to Unix Environment</title>
      <link>https://communities.sas.com/t5/SAS-Programming/import-csv-or-Access-table-from-Window-environment-to-Unix/m-p/445173#M111524</link>
      <description>&lt;P&gt;lets say i transfered&amp;nbsp;my msaccess.accdb&amp;nbsp;file (version 2013), how can i import this in sas.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Mar 2018 14:13:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/import-csv-or-Access-table-from-Window-environment-to-Unix/m-p/445173#M111524</guid>
      <dc:creator>Deepankar</dc:creator>
      <dc:date>2018-03-13T14:13:23Z</dc:date>
    </item>
    <item>
      <title>Re: import csv or Access table from Window environment to Unix Environment</title>
      <link>https://communities.sas.com/t5/SAS-Programming/import-csv-or-Access-table-from-Window-environment-to-Unix/m-p/445181#M111526</link>
      <description>Hi:&lt;BR /&gt;  Suggest you investigate whether you have the PC File server or not. There are a lot of examples in the documentation, such as these: &lt;A href="http://go.documentation.sas.com/?docsetId=pcfsicg&amp;amp;docsetTarget=p1m2b3th113t84n1pt0vi70jj2ni.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en" target="_blank"&gt;http://go.documentation.sas.com/?docsetId=pcfsicg&amp;amp;docsetTarget=p1m2b3th113t84n1pt0vi70jj2ni.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en&lt;/A&gt; &lt;BR /&gt;&lt;BR /&gt;cynthia</description>
      <pubDate>Tue, 13 Mar 2018 14:24:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/import-csv-or-Access-table-from-Window-environment-to-Unix/m-p/445181#M111526</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2018-03-13T14:24:18Z</dc:date>
    </item>
    <item>
      <title>Re: import csv or Access table from Window environment to Unix Environment</title>
      <link>https://communities.sas.com/t5/SAS-Programming/import-csv-or-Access-table-from-Window-environment-to-Unix/m-p/445184#M111527</link>
      <description>&lt;P&gt;I'd rather use a text-based format like csv for data transfer between environments.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Mar 2018 14:27:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/import-csv-or-Access-table-from-Window-environment-to-Unix/m-p/445184#M111527</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-03-13T14:27:28Z</dc:date>
    </item>
    <item>
      <title>Re: import csv or Access table from Window environment to Unix Environment</title>
      <link>https://communities.sas.com/t5/SAS-Programming/import-csv-or-Access-table-from-Window-environment-to-Unix/m-p/445197#M111531</link>
      <description>&lt;P&gt;1. You'll run into issues transfering files between Windows and Unix, so it's best to keep it as text if possible.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2. To import via code, the file must be available to SAS on the server. You can upload the file as part of your process and then use a PROC IMPORT to read the data.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Mar 2018 15:18:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/import-csv-or-Access-table-from-Window-environment-to-Unix/m-p/445197#M111531</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2018-03-13T15:18:09Z</dc:date>
    </item>
    <item>
      <title>Re: import csv or Access table from Window environment to Unix Environment</title>
      <link>https://communities.sas.com/t5/SAS-Programming/import-csv-or-Access-table-from-Window-environment-to-Unix/m-p/445454#M111621</link>
      <description>&lt;P&gt;&lt;FONT face="verdana,geneva"&gt;You need to license SAS/ACCESS to PC Files to have the ability to read/write Microsoft Access files:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;SAS/ACCESS® 9.4 Interface to PC Files: Reference, Fourth Edition&lt;/STRONG&gt;&lt;BR /&gt;&lt;FONT face="verdana,geneva"&gt;&lt;A href="http://go.documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.3&amp;amp;docsetId=acpcref&amp;amp;docsetTarget=titlepage.htm&amp;amp;locale=en" target="_blank"&gt;http://go.documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.3&amp;amp;docsetId=acpcref&amp;amp;docsetTarget=titlepage.htm&amp;amp;locale=en&lt;/A&gt;&lt;/FONT&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;FONT face="verdana,geneva"&gt;If you want to read/write files from your UNIX environment, then you must license the software for that environment.&lt;/FONT&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;FONT face="verdana,geneva"&gt;You also need the SAS PC Files Server running on a Windows-based machine:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Downloads: SAS PC Files Server&lt;/STRONG&gt;&lt;BR /&gt;&lt;FONT face="verdana,geneva"&gt;&lt;A href="https://support.sas.com/downloads/package.htm?pid=2167" target="_blank"&gt;https://support.sas.com/downloads/package.htm?pid=2167&lt;/A&gt;&lt;/FONT&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;FONT face="verdana,geneva"&gt;The UNIX and Windows machines must be able to communicate with one another.&lt;/FONT&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;FONT face="verdana,geneva"&gt;Here are the steps to import the file in your UNIX environment (similar steps for Windows):&lt;/FONT&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;FONT face="verdana,geneva"&gt;1. Place the Microsoft Access database file in &lt;FONT face="courier new,courier"&gt;C:\temp\&lt;/FONT&gt; on the Windows machine. In this example I use the DEMO.ACCDB file from the SAS installation located at C:\Program Files\SASHome\SASFoundation\9.4\access\sasmisc\demo.accdb.&lt;/FONT&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;FONT face="verdana,geneva"&gt;2. Start the SAS PC Files Server on the Windows machine.&lt;/FONT&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;FONT face="verdana,geneva"&gt;3. Click &lt;STRONG&gt;File &amp;gt; Import Data&lt;/STRONG&gt; on the UNIX machine to open the SAS Import Wizard.&lt;/FONT&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;FONT face="verdana,geneva"&gt;4. Select &lt;STRONG&gt;Microsoft Access Database on PC Files Server&lt;/STRONG&gt; in the &lt;STRONG&gt;Standard data source&lt;/STRONG&gt; drop-down menu, and then click &lt;STRONG&gt;Next&lt;/STRONG&gt;.&lt;/FONT&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;FONT face="verdana,geneva"&gt;5. Specify &lt;FONT face="courier new,courier"&gt;C:\temp\demo.accdb&lt;/FONT&gt; in the &lt;STRONG&gt;Database&lt;/STRONG&gt; text box, and the host name of the machine running the SAS PC Files Server in the &lt;STRONG&gt;Server name&lt;/STRONG&gt; text box. Click &lt;STRONG&gt;OK&lt;/STRONG&gt;. A connection is made to the SAS PC Files Server, and the available tables are displayed in the next dialog. &lt;/FONT&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;FONT face="verdana,geneva"&gt;6. Select &lt;FONT face="courier new,courier"&gt;Customers&lt;/FONT&gt; in the &lt;STRONG&gt;What table do you want to import?&lt;/STRONG&gt; drop-down list, and then click &lt;STRONG&gt;Next&lt;/STRONG&gt;.&lt;/FONT&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;FONT face="verdana,geneva"&gt;7. Specify &lt;FONT face="courier new,courier"&gt;CUSTOMERS&lt;/FONT&gt; in the &lt;STRONG&gt;Member&lt;/STRONG&gt; text entry field, and then click &lt;STRONG&gt;Next&lt;/STRONG&gt;.&lt;/FONT&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;FONT face="verdana,geneva"&gt;8. The SAS Import Wizard creates and submits PROC IMPORT code to import the ACCDB file, and you can save the code into a file. Specify the UNIX file location for the code, and then click &lt;STRONG&gt;Finish&lt;/STRONG&gt;.&lt;/FONT&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;FONT face="verdana,geneva"&gt;Verify that the ACCDB file was correctly imported:&lt;/FONT&gt;&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;NOTE: WORK.CUSTOMERS data set was successfully created.
NOTE: The data set WORK.CUSTOMERS has 20 observations and 10 variables.&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;FONT face="verdana,geneva"&gt;View the SAS code generated by PROC IMPORT. It should look something like this:&lt;/FONT&gt;&lt;BR /&gt; &lt;FONT face="verdana,geneva"&gt;&amp;nbsp;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC IMPORT OUT= WORK.customers 
  DATATABLE= "Customers" 
  DBMS=ACCESSCS REPLACE;
  DATABASE="c:\temp\demo.accdb"; 
  SERVER="PC-Files-Server-host-name"; 
  PORT=9621; 
  SCANMEMO=YES;
  USEDATE=NO;
  SCANTIME=YES;
RUN;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;FONT face="verdana,geneva"&gt;Modify and use this code in your automated process.&lt;/FONT&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;FONT face="verdana,geneva"&gt;Vince DelGobbo&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="verdana,geneva"&gt;SAS R&amp;amp;D&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Mar 2018 12:32:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/import-csv-or-Access-table-from-Window-environment-to-Unix/m-p/445454#M111621</guid>
      <dc:creator>Vince_SAS</dc:creator>
      <dc:date>2018-03-14T12:32:30Z</dc:date>
    </item>
    <item>
      <title>Re: import csv or Access table from Window environment to Unix Environment</title>
      <link>https://communities.sas.com/t5/SAS-Programming/import-csv-or-Access-table-from-Window-environment-to-Unix/m-p/464865#M118545</link>
      <description>Thank you for the answer. This saved me a lot of time and worked wonderfully!</description>
      <pubDate>Thu, 24 May 2018 18:45:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/import-csv-or-Access-table-from-Window-environment-to-Unix/m-p/464865#M118545</guid>
      <dc:creator>branden</dc:creator>
      <dc:date>2018-05-24T18:45:09Z</dc:date>
    </item>
  </channel>
</rss>

