<?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 How do you import a sas7bdat file? in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/How-do-you-import-a-sas7bdat-file/m-p/537146#M6741</link>
    <description>&lt;P&gt;I am trying to access data from a sas7bdat file to do some analysis on it.&amp;nbsp; This is the data file:&amp;nbsp;&amp;nbsp;&lt;A href="https://github.com/JackStat/6003Data/blob/master/detroit.sas7bdat" target="_blank"&gt;https://github.com/JackStat/6003Data/blob/master/detroit.sas7bdat&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have searched this board for other .sas7bdat file questions and tried to copy their code, but it does not work for me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the code I have:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;libname detData "\\csbs-cfs1.csbs.utah.edu\home_i\u1052325\Downloads\detroit.sas7bdat";&lt;BR /&gt;data inventory;&lt;BR /&gt;set detData.inventory;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The log says this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;134 libname detData "\\csbs-cfs1.csbs.utah.edu\home_i\u1052325\Downloads\detroit.sas7bdat";&lt;BR /&gt;ERROR: Library DETDATA is not in a valid format for access method RANDOM.&lt;BR /&gt;ERROR: Error in the LIBNAME statement.&lt;BR /&gt;135 data inventory;&lt;BR /&gt;136 set detData.inventory;&lt;BR /&gt;ERROR: Libref DETDATA is not assigned.&lt;BR /&gt;137 run;&lt;/P&gt;&lt;P&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;WARNING: The data set WORK.INVENTORY may be incomplete. When this step was stopped there were 0&lt;BR /&gt;observations and 0 variables.&lt;BR /&gt;WARNING: Data set WORK.INVENTORY was not replaced because this step was stopped.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;real time 0.00 seconds&lt;BR /&gt;cpu time 0.00 seconds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 20 Feb 2019 18:21:23 GMT</pubDate>
    <dc:creator>lemon1</dc:creator>
    <dc:date>2019-02-20T18:21:23Z</dc:date>
    <item>
      <title>How do you import a sas7bdat file?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-do-you-import-a-sas7bdat-file/m-p/537146#M6741</link>
      <description>&lt;P&gt;I am trying to access data from a sas7bdat file to do some analysis on it.&amp;nbsp; This is the data file:&amp;nbsp;&amp;nbsp;&lt;A href="https://github.com/JackStat/6003Data/blob/master/detroit.sas7bdat" target="_blank"&gt;https://github.com/JackStat/6003Data/blob/master/detroit.sas7bdat&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have searched this board for other .sas7bdat file questions and tried to copy their code, but it does not work for me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the code I have:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;libname detData "\\csbs-cfs1.csbs.utah.edu\home_i\u1052325\Downloads\detroit.sas7bdat";&lt;BR /&gt;data inventory;&lt;BR /&gt;set detData.inventory;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The log says this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;134 libname detData "\\csbs-cfs1.csbs.utah.edu\home_i\u1052325\Downloads\detroit.sas7bdat";&lt;BR /&gt;ERROR: Library DETDATA is not in a valid format for access method RANDOM.&lt;BR /&gt;ERROR: Error in the LIBNAME statement.&lt;BR /&gt;135 data inventory;&lt;BR /&gt;136 set detData.inventory;&lt;BR /&gt;ERROR: Libref DETDATA is not assigned.&lt;BR /&gt;137 run;&lt;/P&gt;&lt;P&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;WARNING: The data set WORK.INVENTORY may be incomplete. When this step was stopped there were 0&lt;BR /&gt;observations and 0 variables.&lt;BR /&gt;WARNING: Data set WORK.INVENTORY was not replaced because this step was stopped.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;real time 0.00 seconds&lt;BR /&gt;cpu time 0.00 seconds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Feb 2019 18:21:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-do-you-import-a-sas7bdat-file/m-p/537146#M6741</guid>
      <dc:creator>lemon1</dc:creator>
      <dc:date>2019-02-20T18:21:23Z</dc:date>
    </item>
    <item>
      <title>Re: How do you import a sas7bdat file?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-do-you-import-a-sas7bdat-file/m-p/537155#M6744</link>
      <description>&lt;P&gt;You do not import a .sas7bdat file, as it already is a SAS dataset. You only need to define a libname to the&amp;nbsp;&lt;EM&gt;directory&lt;/EM&gt; where the file is located in order to access it.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Feb 2019 19:00:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-do-you-import-a-sas7bdat-file/m-p/537155#M6744</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-02-20T19:00:14Z</dc:date>
    </item>
    <item>
      <title>Re: How do you import a sas7bdat file?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-do-you-import-a-sas7bdat-file/m-p/537166#M6747</link>
      <description>&lt;P&gt;The LIBNAME statement should reference a folder, not a file.&amp;nbsp; Your LIBNAME statement provides too much information:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;libname detData "\\csbs-cfs1.csbs.utah.edu\home_i\u1052325\Downloads\detroit.sas7bdat";&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Instead, cut it down to the path to the folder that holds the data:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;libname detData "\\csbs-cfs1.csbs.utah.edu\home_i\u1052325\Downloads";&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;After that,&amp;nbsp; you would refer to the SAS data set as:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;detData.detroit&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So it's a two-part name, that references both the LIBNAME and the name of the .sas7bdat file.&amp;nbsp; In context, perhaps:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data inventory;&lt;/P&gt;
&lt;P&gt;set detData.detroit;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Feb 2019 19:47:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-do-you-import-a-sas7bdat-file/m-p/537166#M6747</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2019-02-20T19:47:39Z</dc:date>
    </item>
  </channel>
</rss>

