<?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: libref not assigned error in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/libref-not-assigned-error/m-p/676504#M203998</link>
    <description>You have a typo&lt;BR /&gt;&lt;BR /&gt; FROM NBBO2.SAMPLE_FILINGS_2005 AS A &amp;lt;&amp;lt; This line is the letter O (NBBO2)&lt;BR /&gt;JOIN NBB02.SORTED_NBBO2005 AS B &amp;lt;&amp;lt; This line is the number 0 (NBB&amp;lt;zero&amp;gt;2)&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Thu, 13 Aug 2020 14:48:17 GMT</pubDate>
    <dc:creator>AMSAS</dc:creator>
    <dc:date>2020-08-13T14:48:17Z</dc:date>
    <item>
      <title>libref not assigned error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/libref-not-assigned-error/m-p/676503#M203997</link>
      <description>&lt;P&gt;I have a "libref is not assigned" error that I can't figure out. I have tried looking at other questions but so far I haven't seen anything like this. It all comes down to me trying to join two tables using proc sql. This step fails and I receive the libref not assigned error. I was confused so I explicitly assigned the library reference in my code, and selected the top 10 records from each table that I want to use in the join to make sure that the library reference was working and it does. But then when I try to do the join it fails. The libref not assigned error doesn't make sense to me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname NBBO2 '/the/file/path';
proc sql inobs = 10; select * from NBBO2.SAMPLE_FILINGS_2005; QUIT;
proc sql inobs = 10; select * from NBBO2.SORTED_NBBO2005; QUIT;	

	/*STEP AA1 - ADD THE PRICE AT FILING TIME TO EACH FILING RECORD*/
	PROC SQL;
	CREATE TABLE STEP_AA1 AS 
	SELECT
	A.*
	,(B.BB + B.BO)/2 AS Price_at_filing
	FROM NBBO2.SAMPLE_FILINGS_2005 AS A
	JOIN NBB02.SORTED_NBBO2005 AS B
	ON A.TICKER = B.SYMBOL
	AND A.file_date = B.DATE
	AND B.TIME &amp;lt;= A.file_time &amp;lt; B.TIME_end
	;
	QUIT;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;And here is the log containing the error:&lt;/P&gt;&lt;PRE&gt;NOTE: SAS initialization used:
      real time           11.08 seconds
      cpu time            0.32 seconds

1    libname NBBO2 '/the/file/path';
NOTE: Libref NBBO2 was successfully assigned as follows:
      Engine:        V9
      Physical Name: /the/file/path;
2    proc sql inobs = 10;
2  !                      select * from NBBO2.SAMPLE_FILINGS_2005;
NOTE: Data file NBBO2.SAMPLE_FILINGS_2005.DATA is in a format that is native to another host, or the file encoding does not match the session
      encoding. Cross Environment Data Access will be used, which might require additional CPU resources and might reduce performance.
WARNING: Only 10 records were read from NBBO2.SAMPLE_FILINGS_2005 due to INOBS= option.
2  !                                                               QUIT;
NOTE: PROCEDURE SQL used (Total process time):
      real time           0.29 seconds
      cpu time            0.05 seconds


3    proc sql inobs = 10;
3  !                      select * from NBBO2.SORTED_NBBO2005;
WARNING: Only 10 records were read from NBBO2.SORTED_NBBO2005 due to INOBS= option.
3  !                                                           QUIT;
NOTE: PROCEDURE SQL used (Total process time):
      real time           0.13 seconds
      cpu time            0.00 seconds


4
5            /*STEP AA1 - ADD THE PRICE AT FILING TIME TO EACH FILING RECORD*/
6            PROC SQL;
7            CREATE TABLE STEP_AA1 AS
8            SELECT
9            A.*
10           ,(B.BB + B.BO)/2 AS Price_at_filing
11           FROM NBBO2.SAMPLE_FILINGS_2005 AS A
12           JOIN NBB02.SORTED_NBBO2005 AS B
13           ON A.TICKER = B.SYMBOL
14           AND A.file_date = B.DATE
15           AND B.TIME &amp;lt;= A.file_time &amp;lt; B.TIME_end
16           ;
NOTE: Data file NBBO2.SAMPLE_FILINGS_2005.DATA is in a format that is native to another host, or the file encoding does not match the session
      encoding. Cross Environment Data Access will be used, which might require additional CPU resources and might reduce performance.
ERROR: Libref NBB02 is not assigned.
17           QUIT;
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE SQL used (Total process time):
      real time           0.29 seconds
      cpu time            0.01 seconds

&lt;/PRE&gt;&lt;P&gt;I can't figure it out. Is it really a problem with the table formats?&lt;/P&gt;&lt;P&gt;Thanks in advance for any help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Aug 2020 14:44:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/libref-not-assigned-error/m-p/676503#M203997</guid>
      <dc:creator>eb175</dc:creator>
      <dc:date>2020-08-13T14:44:05Z</dc:date>
    </item>
    <item>
      <title>Re: libref not assigned error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/libref-not-assigned-error/m-p/676504#M203998</link>
      <description>You have a typo&lt;BR /&gt;&lt;BR /&gt; FROM NBBO2.SAMPLE_FILINGS_2005 AS A &amp;lt;&amp;lt; This line is the letter O (NBBO2)&lt;BR /&gt;JOIN NBB02.SORTED_NBBO2005 AS B &amp;lt;&amp;lt; This line is the number 0 (NBB&amp;lt;zero&amp;gt;2)&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 13 Aug 2020 14:48:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/libref-not-assigned-error/m-p/676504#M203998</guid>
      <dc:creator>AMSAS</dc:creator>
      <dc:date>2020-08-13T14:48:17Z</dc:date>
    </item>
    <item>
      <title>Re: libref not assigned error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/libref-not-assigned-error/m-p/676506#M204000</link>
      <description>Oh my goodness - I don't know if I ever would have noticed that. Thank you so much! I will hang my head in shame now.</description>
      <pubDate>Thu, 13 Aug 2020 14:50:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/libref-not-assigned-error/m-p/676506#M204000</guid>
      <dc:creator>eb175</dc:creator>
      <dc:date>2020-08-13T14:50:45Z</dc:date>
    </item>
    <item>
      <title>Re: libref not assigned error</title>
      <link>https://communities.sas.com/t5/SAS-Programming/libref-not-assigned-error/m-p/676509#M204002</link>
      <description>Hey we've all been there - It's like looking for your glasses only to be told they are on top of your head</description>
      <pubDate>Thu, 13 Aug 2020 14:53:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/libref-not-assigned-error/m-p/676509#M204002</guid>
      <dc:creator>AMSAS</dc:creator>
      <dc:date>2020-08-13T14:53:26Z</dc:date>
    </item>
  </channel>
</rss>

