<?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 LIBNAME and PROC IMPORT problem in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/LIBNAME-and-PROC-IMPORT-problem/m-p/583182#M165996</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/284738"&gt;@MeghnaRoy9&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I ran the following code to import my data and it ran fine:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;PROC IMPORT DATAFILE="/folders/myfolders/SAS Assignment/Cross Sell_Data.csv"&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp;OUT=CSD&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp;DBMS=CSV&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp;REPLACE;&lt;/DIV&gt;
&lt;DIV&gt;RUN;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Post this step I ran this code but just a blank file got created:&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Libname CSD "/folders/myfolders/SAS Assignment";run;&lt;/DIV&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;What is a "blank file"? Do you mean that there are no SAS data sets in the folder /folders/myfolders/SAS Assignment?&amp;nbsp;That would be the expected result. THe only thing that a LIBNAME statement does is that it tells SAS to look in the specified folder for SAS data sets, and if there are no SAS data sets in there, it shows that fact. (Also, you don't need a RUN; statement after a LIBNAME statement)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Perhaps this is what you want? Note the change of order, and the referring to the imported data set by CSD.cross_sell_data, the name beginning with CSD and a period indicating that this data set is to reside in the SAS library named CSD, which was defined by the LIBNAME statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname csd "/folders/myfolder/SAS assignment";

PROC IMPORT DATAFILE="/folders/myfolders/SAS Assignment/Cross Sell_Data.csv"
&amp;nbsp; &amp;nbsp;OUT=CSD.cross_sell_data
&amp;nbsp; &amp;nbsp;DBMS=CSV
&amp;nbsp; &amp;nbsp;REPLACE;
RUN;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Also, please go back to your original post and give a meaningful title to your question, such as "LIBNAME and PROC IMPORT problem".&lt;/P&gt;</description>
    <pubDate>Thu, 22 Aug 2019 13:56:35 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2019-08-22T13:56:35Z</dc:date>
    <item>
      <title>LIBNAME and PROC IMPORT problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/LIBNAME-and-PROC-IMPORT-problem/m-p/583178#M165992</link>
      <description>&lt;P&gt;I ran the following code to import my data and it ran fine:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;PROC IMPORT DATAFILE="/folders/myfolders/SAS Assignment/Cross Sell_Data.csv"&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp;OUT=CSD&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp;DBMS=CSV&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp;REPLACE;&lt;/DIV&gt;&lt;DIV&gt;RUN;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Post this step I ran this code but just a blank file got created:&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Libname CSD "/folders/myfolders/SAS Assignment";run;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I need to further add this code to divide the dataset into Development and Validation dataset which is obviously not working because of a blank data set.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Please help me figure out my mistake. thank you!&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;PRE&gt;DATA CSD.DEV CSD.VAL;&lt;BR /&gt;SET CSD.BITS;&lt;BR /&gt;IF RANUNI (1000)&amp;lt;= 0.7 THEN OUTPUT CSD.DEV;&lt;BR /&gt;ELSE OUTPUT CSD.VAL;&lt;BR /&gt;RUN;&lt;/PRE&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 22 Aug 2019 14:21:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/LIBNAME-and-PROC-IMPORT-problem/m-p/583178#M165992</guid>
      <dc:creator>MeghnaRoy9</dc:creator>
      <dc:date>2019-08-22T14:21:02Z</dc:date>
    </item>
    <item>
      <title>Re: CODING ISSUES</title>
      <link>https://communities.sas.com/t5/SAS-Programming/LIBNAME-and-PROC-IMPORT-problem/m-p/583181#M165995</link>
      <description>&lt;P&gt;If you do not have a file called&lt;/P&gt;
&lt;PRE&gt;bits.sas7bdat&lt;/PRE&gt;
&lt;P&gt;in your directory&lt;/P&gt;
&lt;PRE&gt;/folders/myfolders/SAS Assignment&lt;/PRE&gt;
&lt;P&gt;Then you won't have a dataset&lt;/P&gt;
&lt;PRE&gt;CSD.BITS&lt;/PRE&gt;
&lt;P&gt;I see no code that would have created this dataset, either.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Aug 2019 13:51:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/LIBNAME-and-PROC-IMPORT-problem/m-p/583181#M165995</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-08-22T13:51:33Z</dc:date>
    </item>
    <item>
      <title>LIBNAME and PROC IMPORT problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/LIBNAME-and-PROC-IMPORT-problem/m-p/583182#M165996</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/284738"&gt;@MeghnaRoy9&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I ran the following code to import my data and it ran fine:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;PROC IMPORT DATAFILE="/folders/myfolders/SAS Assignment/Cross Sell_Data.csv"&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp;OUT=CSD&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp;DBMS=CSV&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp; &amp;nbsp;REPLACE;&lt;/DIV&gt;
&lt;DIV&gt;RUN;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Post this step I ran this code but just a blank file got created:&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Libname CSD "/folders/myfolders/SAS Assignment";run;&lt;/DIV&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;What is a "blank file"? Do you mean that there are no SAS data sets in the folder /folders/myfolders/SAS Assignment?&amp;nbsp;That would be the expected result. THe only thing that a LIBNAME statement does is that it tells SAS to look in the specified folder for SAS data sets, and if there are no SAS data sets in there, it shows that fact. (Also, you don't need a RUN; statement after a LIBNAME statement)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Perhaps this is what you want? Note the change of order, and the referring to the imported data set by CSD.cross_sell_data, the name beginning with CSD and a period indicating that this data set is to reside in the SAS library named CSD, which was defined by the LIBNAME statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname csd "/folders/myfolder/SAS assignment";

PROC IMPORT DATAFILE="/folders/myfolders/SAS Assignment/Cross Sell_Data.csv"
&amp;nbsp; &amp;nbsp;OUT=CSD.cross_sell_data
&amp;nbsp; &amp;nbsp;DBMS=CSV
&amp;nbsp; &amp;nbsp;REPLACE;
RUN;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Also, please go back to your original post and give a meaningful title to your question, such as "LIBNAME and PROC IMPORT problem".&lt;/P&gt;</description>
      <pubDate>Thu, 22 Aug 2019 13:56:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/LIBNAME-and-PROC-IMPORT-problem/m-p/583182#M165996</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-08-22T13:56:35Z</dc:date>
    </item>
    <item>
      <title>Re: LIBNAME and PROC IMPORT problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/LIBNAME-and-PROC-IMPORT-problem/m-p/583199#M166006</link>
      <description>Thank You so much! it was really helpful.&lt;BR /&gt;</description>
      <pubDate>Thu, 22 Aug 2019 14:21:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/LIBNAME-and-PROC-IMPORT-problem/m-p/583199#M166006</guid>
      <dc:creator>MeghnaRoy9</dc:creator>
      <dc:date>2019-08-22T14:21:40Z</dc:date>
    </item>
  </channel>
</rss>

