<?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: How to reuse &amp;quot;in&amp;quot; libname in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-reuse-quot-in-quot-libname/m-p/535077#M146887</link>
    <description>&lt;P&gt;Yes.&lt;/P&gt;
&lt;P&gt;Your error message is complaining about what is actually in the JSON file and has nothing to do with "reusing" the libref.&lt;/P&gt;</description>
    <pubDate>Wed, 13 Feb 2019 03:16:46 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2019-02-13T03:16:46Z</dc:date>
    <item>
      <title>How to reuse "in" libname</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-reuse-quot-in-quot-libname/m-p/535073#M146884</link>
      <description>&lt;P&gt;All,&amp;nbsp;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; I am trying to write multiple api calls using Proc HTTP in the same script. Is it possible to reuse Libname "in" after extracting the data I want from one api call to the next. My code looks like so :&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Filename Test1 "&amp;amp;WorkDir./ApiTest.txt";
Proc HTTP
	URL = &amp;amp;ProdUrlDes.
	Method = "get"
  	Out = Test1 ; 
Run;

* Assign Libname for parsing ; 
Libname in json "&amp;amp;WorkDir./ApiTest.txt";

* Parse JSON Response; 
Data Details;
	set in.root; 
Run; 
Proc Sql NoPrint; 
	Select Var1 Into :GlobalVar1 From Details; 
Quit;
Libname in clear; 

Filename ForResp  "&amp;amp;WorkDir./ApiForTest.txt";
Proc HTTP
	URL = &amp;amp;UrlTest. 
	Method = "get"
	Out = ForResp; 
Run;  

* Assign Libname for parsing ; 
Libname in json "&amp;amp;WorkDir./ApiForTest.txt";

* Parse JSON Response; 
Data SiteData;
	set in.root; 
Run; 

Libname in clear; &lt;/PRE&gt;&lt;P&gt;I get the following errors:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/27109i51D4D8B222B153B6/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Feb 2019 01:32:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-reuse-quot-in-quot-libname/m-p/535073#M146884</guid>
      <dc:creator>UdayGuntupalli</dc:creator>
      <dc:date>2019-02-13T01:32:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to reuse "in" libname</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-reuse-quot-in-quot-libname/m-p/535077#M146887</link>
      <description>&lt;P&gt;Yes.&lt;/P&gt;
&lt;P&gt;Your error message is complaining about what is actually in the JSON file and has nothing to do with "reusing" the libref.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Feb 2019 03:16:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-reuse-quot-in-quot-libname/m-p/535077#M146887</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-02-13T03:16:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to reuse "in" libname</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-reuse-quot-in-quot-libname/m-p/535120#M146908</link>
      <description>&lt;P&gt;Inspect the result of the proc http call ("&amp;amp;WorkDir./ApiForTest.txt") with a text editor. You might find some kind of message that you got back from the website instead of the expected JSON file.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Feb 2019 08:35:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-reuse-quot-in-quot-libname/m-p/535120#M146908</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-02-13T08:35:29Z</dc:date>
    </item>
  </channel>
</rss>

