<?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: Converting Json file to read into SAS in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Converting-Json-file-to-read-into-SAS/m-p/514703#M32550</link>
    <description>&lt;P&gt;What is a .sav file?&amp;nbsp; Something for SPSS?&amp;nbsp; Why not just export to CSV and read that into SAS?&lt;/P&gt;
&lt;P&gt;If you JSON file isn't too complicated, you should be able to read it in via datastep - never use proc import for anything other than playing around as it is a guessing procedure -, and you could probably output all four datasets from one datastep.&amp;nbsp; The JSON file is just a plain text file that can be read line by line, so some conditional statements to control which data goes where should be enough.&lt;/P&gt;
&lt;P&gt;Personally I would avoid the whole R step and just read the JSON file into SAS directly.&lt;/P&gt;</description>
    <pubDate>Tue, 20 Nov 2018 10:14:30 GMT</pubDate>
    <dc:creator>RW9</dc:creator>
    <dc:date>2018-11-20T10:14:30Z</dc:date>
    <item>
      <title>Converting Json file to read into SAS</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Converting-Json-file-to-read-into-SAS/m-p/514700#M32549</link>
      <description>&lt;P&gt;Folks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a Json file which I need to create a SAS dataset with.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To begin I've used R to separate the Json file into four different datasets and I have exported them out into a .sav file.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am then reading the .sav file into SAS using the proc import command.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, after the proc import command is run all the variables are being read in as numeric. For example a variable called.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;additionalProp1 has a value called 'string'. In the SAS dataset this is being read as numeric.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone know why SAS is reading all variables in as numeric? Is it something to do with the structure of the .sav file?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any information would be great.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Nov 2018 09:59:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Converting-Json-file-to-read-into-SAS/m-p/514700#M32549</guid>
      <dc:creator>Sean_OConnor</dc:creator>
      <dc:date>2018-11-20T09:59:15Z</dc:date>
    </item>
    <item>
      <title>Re: Converting Json file to read into SAS</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Converting-Json-file-to-read-into-SAS/m-p/514703#M32550</link>
      <description>&lt;P&gt;What is a .sav file?&amp;nbsp; Something for SPSS?&amp;nbsp; Why not just export to CSV and read that into SAS?&lt;/P&gt;
&lt;P&gt;If you JSON file isn't too complicated, you should be able to read it in via datastep - never use proc import for anything other than playing around as it is a guessing procedure -, and you could probably output all four datasets from one datastep.&amp;nbsp; The JSON file is just a plain text file that can be read line by line, so some conditional statements to control which data goes where should be enough.&lt;/P&gt;
&lt;P&gt;Personally I would avoid the whole R step and just read the JSON file into SAS directly.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Nov 2018 10:14:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Converting-Json-file-to-read-into-SAS/m-p/514703#M32550</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-11-20T10:14:30Z</dc:date>
    </item>
    <item>
      <title>Re: Converting Json file to read into SAS</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Converting-Json-file-to-read-into-SAS/m-p/514769#M32554</link>
      <description>&lt;P&gt;If you have SAS 9.4 maintenance 4 (or better), you have access to the &lt;A href="https://go.documentation.sas.com/?docsetId=lestmtsglobal&amp;amp;docsetTarget=n1jfdetszx99ban1rl4zll6tej7j.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en" target="_self"&gt;JSON LIBNAME statement &lt;/A&gt;for reading JSON data into SAS data sets.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Nov 2018 14:54:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Converting-Json-file-to-read-into-SAS/m-p/514769#M32554</guid>
      <dc:creator>BillM_SAS</dc:creator>
      <dc:date>2018-11-20T14:54:42Z</dc:date>
    </item>
  </channel>
</rss>

