<?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: ERROR: Libname LIBNAME is not assigned in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/ERROR-Libname-LIBNAME-is-not-assigned/m-p/252143#M56800</link>
    <description>That's amazing, thank you so much!</description>
    <pubDate>Wed, 24 Feb 2016 18:44:25 GMT</pubDate>
    <dc:creator>Mel120585</dc:creator>
    <dc:date>2016-02-24T18:44:25Z</dc:date>
    <item>
      <title>ERROR: Libname LIBNAME is not assigned</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/ERROR-Libname-LIBNAME-is-not-assigned/m-p/252130#M56798</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am new to SAS and have managed to download SAS 9.0 to try and run a code I have been provided to analyse some data. However, it is getting stuck at the following point:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data libname.pampermin;&lt;BR /&gt;set sets;&lt;BR /&gt;ProbSleep = 7.601 - (0.065*MeanW5) - (1.08*sumind) - (0.056*STDpre5) -&lt;BR /&gt;(0.703*logact);&lt;BR /&gt;if probsleep = . THEN DO; PROBSLEEP = 1; END;&lt;BR /&gt;if probsleep &amp;lt; 0 and probsleep ne . then SleepIncOff = 0; if (probsleep ge 0) or&lt;BR /&gt;inclinometer = 0 then SleepIncOff = 1;&lt;BR /&gt;drop lastpax time;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When it gets to this section, it comes up with "ERROR: Libname LIBNAME is not assigned." This is the first time in the code that Libname is referred to. I have tried to read other threads on this to do with assigning a pathway but can't make any progress. Could anyone give me some suggestions as to how I resolve this issue please?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Many thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Mel&lt;/P&gt;</description>
      <pubDate>Wed, 24 Feb 2016 18:28:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/ERROR-Libname-LIBNAME-is-not-assigned/m-p/252130#M56798</guid>
      <dc:creator>Mel120585</dc:creator>
      <dc:date>2016-02-24T18:28:14Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Libname LIBNAME is not assigned</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/ERROR-Libname-LIBNAME-is-not-assigned/m-p/252135#M56799</link>
      <description>&lt;P&gt;You need to have a statement that maps the LIBNAME to the path where your data resides.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Ex:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;libname libname&amp;nbsp;"C:\projects\mydata";&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BTW, I suggest you don't use&amp;nbsp;&lt;STRONG&gt;libname&lt;/STRONG&gt; as the name of the library - will confuse you more.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname mydata "C:\projects\mydata";

data mydata.pampermin;
set sets;  /* this is going to be in your WORK library.  Does the data exist? */
ProbSleep = 7.601 - (0.065*MeanW5) - (1.08*sumind) - (0.056*STDpre5) -
(0.703*logact);
if probsleep = . THEN DO; PROBSLEEP = 1; END;
if probsleep &amp;lt; 0 and probsleep ne . then SleepIncOff = 0; if (probsleep ge 0) or
inclinometer = 0 then SleepIncOff = 1;
drop lastpax time;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 24 Feb 2016 18:34:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/ERROR-Libname-LIBNAME-is-not-assigned/m-p/252135#M56799</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2016-02-24T18:34:38Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Libname LIBNAME is not assigned</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/ERROR-Libname-LIBNAME-is-not-assigned/m-p/252143#M56800</link>
      <description>That's amazing, thank you so much!</description>
      <pubDate>Wed, 24 Feb 2016 18:44:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/ERROR-Libname-LIBNAME-is-not-assigned/m-p/252143#M56800</guid>
      <dc:creator>Mel120585</dc:creator>
      <dc:date>2016-02-24T18:44:25Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Libname LIBNAME is not assigned</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/ERROR-Libname-LIBNAME-is-not-assigned/m-p/252154#M56803</link>
      <description>&lt;P&gt;I'm sorry to ask yet another question but it is now saying that there is a syntax error in the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if wake1 &amp;lt; bed1 then; SleepNWmins = ((wake1 + ('24:00:00't bed1))+'00:01:00't)/60;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to find the missing syntax but is it obvious to everyone else?!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Mel&lt;/P&gt;</description>
      <pubDate>Wed, 24 Feb 2016 19:19:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/ERROR-Libname-LIBNAME-is-not-assigned/m-p/252154#M56803</guid>
      <dc:creator>Mel120585</dc:creator>
      <dc:date>2016-02-24T19:19:40Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: Libname LIBNAME is not assigned</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/ERROR-Libname-LIBNAME-is-not-assigned/m-p/252250#M56804</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/74812"&gt;@Mel120585﻿&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;No problem. This forum is a great place for asking questions. Best practice is to open a new thread for a new question.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think, there are two errors in your code:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;The syntax error that there is no operator between&amp;nbsp;&lt;SPAN&gt;&lt;FONT face="courier new,courier"&gt;'24:00:00't&lt;/FONT&gt; and &lt;FONT face="courier new,courier"&gt;bed1&lt;/FONT&gt;. I guess a minus sign could make sense here (if I interpret the formula correctly).&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;A logical error: I guess (again) that you want to execute&amp;nbsp;the assignment statement &lt;FONT face="courier new,courier"&gt;SleepNWmins =&lt;/FONT&gt; ... if the condition &lt;FONT face="courier new,courier"&gt;wake1 &amp;lt; bed1&lt;/FONT&gt; is met. Due to the semicolon after &lt;FONT face="courier new,courier"&gt;then&lt;/FONT&gt;, however, you instructed SAS to do &lt;EM&gt;nothing&lt;/EM&gt; if the condition is met and then execute the assignment statement &lt;EM&gt;regardless whether&lt;/EM&gt; the condition is met (it appears as a completely separate statement). So, almost certainly you will want to delete that semicolon in the middle.&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/OL&gt;</description>
      <pubDate>Wed, 24 Feb 2016 22:58:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/ERROR-Libname-LIBNAME-is-not-assigned/m-p/252250#M56804</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2016-02-24T22:58:44Z</dc:date>
    </item>
  </channel>
</rss>

