<?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: Confusion errors in libname Json in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Confusion-errors-in-libname-Json/m-p/319719#M70302</link>
    <description>&lt;P&gt;What is in the&amp;nbsp;first line of the JSON file?&lt;/P&gt;</description>
    <pubDate>Sat, 17 Dec 2016 12:13:19 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2016-12-17T12:13:19Z</dc:date>
    <item>
      <title>Confusion errors in libname Json</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Confusion-errors-in-libname-Json/m-p/319716#M70300</link>
      <description>&lt;P&gt;I am trying to import an json-file to sas with the new libname statement. I got errors both when I test the submited code in this sas blog: &lt;A href="http://blogs.sas.com/content/sasdummy/#fn" target="_blank"&gt;http://blogs.sas.com/content/sasdummy/#fn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/* Assign a JSON library to the HTTP response */
libname space JSON 'resp';
run;&amp;nbsp;
/* Print result, dropping automatic ordinal metadata */
title "Who is in space right now? (as of &amp;amp;sysdate)";
proc print data=space.people (drop=ordinal:);
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;And got this error: "ERROR: Libref SPACE is not assigned.".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I also test this code:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ibname qlib json "D:\Data\SAS\SCB API\AKU_ALOS_FRAGA.JSON";
run;
proc contents data=qlib._all_;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and got this error:&lt;/P&gt;
&lt;P&gt;(ERROR: Invalid JSON in input near line 1 column 1: Encountered an illegal character.&lt;BR /&gt;ERROR: Error in the LIBNAME statement.)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My system version is;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;NOTE: Copyright (c) 2002-2012 by SAS Institute Inc., Cary, NC, USA.
NOTE: SAS (r) Proprietary Software 9.4 (TS1M4)
      Licensed to , Site .
NOTE: This session is executing on the X64_10PRO  platform.

NOTE: Updated analytical products:
      SAS/STAT 14.2      
      SAS/ETS 14.2

NOTE: Additional host information: X64_10PRO WIN 10.0.14393  Workstation&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I think I have the latest version of SAS. I downloaded it from SAS yesterday and the text indicated it.&lt;/P&gt;
&lt;P&gt;What I do no know is if libname json requiere an additional license. I have try to figured it out, but do not find it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My questions is.&lt;/P&gt;
&lt;P&gt;1. Can I got libname json to work on this computer?&lt;/P&gt;
&lt;P&gt;2. What have got wrong with my programs?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My final goal is to import data from Statistic Sweden, SCB, with there api. (They have the same api at as least Statistic Finland)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;/Anders&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 17 Dec 2016 11:21:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Confusion-errors-in-libname-Json/m-p/319716#M70300</guid>
      <dc:creator>AndersBergquist</dc:creator>
      <dc:date>2016-12-17T11:21:16Z</dc:date>
    </item>
    <item>
      <title>Re: Confusion errors in libname Json</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Confusion-errors-in-libname-Json/m-p/319719#M70302</link>
      <description>&lt;P&gt;What is in the&amp;nbsp;first line of the JSON file?&lt;/P&gt;</description>
      <pubDate>Sat, 17 Dec 2016 12:13:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Confusion-errors-in-libname-Json/m-p/319719#M70302</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-12-17T12:13:19Z</dc:date>
    </item>
    <item>
      <title>Re: Confusion errors in libname Json</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Confusion-errors-in-libname-Json/m-p/319720#M70303</link>
      <description>&lt;P&gt;The first caracter is; {&lt;/P&gt;
&lt;P&gt;I enclose the json file but I have to chance the typer from .json to .txt.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can also find an other file like this at Statistics Swedens description of the API:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.scb.se/en_/About-us/Open-data-API/API-for-the-Statistical-Database-/" target="_blank"&gt;http://www.scb.se/en_/About-us/Open-data-API/API-for-the-Statistical-Database-/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 17 Dec 2016 12:20:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Confusion-errors-in-libname-Json/m-p/319720#M70303</guid>
      <dc:creator>AndersBergquist</dc:creator>
      <dc:date>2016-12-17T12:20:35Z</dc:date>
    </item>
    <item>
      <title>Re: Confusion errors in libname Json</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Confusion-errors-in-libname-Json/m-p/319721#M70304</link>
      <description>&lt;P&gt;I solve the problem!&lt;/P&gt;
&lt;P&gt;There was &amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt; in the first row.&lt;/P&gt;
&lt;P&gt;Using another file without work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for you attention!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;/Anders&lt;/P&gt;</description>
      <pubDate>Sat, 17 Dec 2016 12:29:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Confusion-errors-in-libname-Json/m-p/319721#M70304</guid>
      <dc:creator>AndersBergquist</dc:creator>
      <dc:date>2016-12-17T12:29:09Z</dc:date>
    </item>
    <item>
      <title>Re: Confusion errors in libname Json</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Confusion-errors-in-libname-Json/m-p/319722#M70305</link>
      <description>&lt;P&gt;Try the exact code from Chris blog. If it works it's either the file or code, if it doesn't it's a system/license problem.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;9.4TS1M4 is the latest version.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 17 Dec 2016 12:29:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Confusion-errors-in-libname-Json/m-p/319722#M70305</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-12-17T12:29:39Z</dc:date>
    </item>
    <item>
      <title>Re: Confusion errors in libname Json</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Confusion-errors-in-libname-Json/m-p/319723#M70306</link>
      <description>&lt;P&gt;I think the problem with Chris code is in http. I got the same error with this code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename resp temp;

proc http
	url="http://api.open-notify.org/astros.json"
	method="GET"
	out=resp;
run;

proc contents data=resp._all_;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 17 Dec 2016 12:37:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Confusion-errors-in-libname-Json/m-p/319723#M70306</guid>
      <dc:creator>AndersBergquist</dc:creator>
      <dc:date>2016-12-17T12:37:01Z</dc:date>
    </item>
    <item>
      <title>Re: Confusion errors in libname Json</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Confusion-errors-in-libname-Json/m-p/319738#M70317</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;You might want to take a look at 

https://listserv.uga.edu/cgi-bin/wa?A2=SAS-L;326f83bd.1612c

fro a related solution.

The code can run as is in IML&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 17 Dec 2016 17:39:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Confusion-errors-in-libname-Json/m-p/319738#M70317</guid>
      <dc:creator>rogerjdeangelis</dc:creator>
      <dc:date>2016-12-17T17:39:32Z</dc:date>
    </item>
  </channel>
</rss>

