<?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: Exchanging data between SAS and ROOT. in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Exchanging-data-between-SAS-and-ROOT/m-p/585832#M14385</link>
    <description>&lt;P&gt;Maybe some context can help. Now, I have a ~100GB compressed ROOT archive which contains a lot of observation (event in root terms) and 50 variables (branch in root terms) per observation from an physics experiment. And from experience and rough math, I'm expecting a 1TB JSON or a 400GB CSV file if I de-compress my root archive. And my college, the statistician's job is to go through these few hundred million observations and find the outliers, then append statistics to each observation so I can find malfunctions in the equipments.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, here's the problem. As he primarily uses SAS, he needs a way to import all my data in ROOT into SAS. But JSON is obviously nonviable and CSV doesn't scale (I need to generate the CSV then compress it). The opposite problem of sending data from SAS to ROOT is also a big one.&lt;/P&gt;</description>
    <pubDate>Tue, 03 Sep 2019 14:18:03 GMT</pubDate>
    <dc:creator>marty1885</dc:creator>
    <dc:date>2019-09-03T14:18:03Z</dc:date>
    <item>
      <title>Exchanging data between SAS and ROOT.</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Exchanging-data-between-SAS-and-ROOT/m-p/585703#M14370</link>
      <description>&lt;P&gt;Hi all.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm new to SAS but have been using other analysis tools for a while.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have been analysing data using &lt;A href="https://root.cern.ch" target="_self"&gt;ROOT&lt;/A&gt; and all of my data is stored in ROOT's &lt;A href="https://root.cern.ch/doc/master/classTTree.html" target="_self"&gt;TTree format&lt;/A&gt;. Recently I'm tasked to export some of my data for statisticians whom use SAS primarily. Are there better way to exchange data between the two frameworks? CSV and JSON&amp;nbsp;are not a viable option as they are huge and clunky. Also, what would be a good way to get data from SAS back into ROOT?&lt;/P&gt;</description>
      <pubDate>Tue, 03 Sep 2019 05:34:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Exchanging-data-between-SAS-and-ROOT/m-p/585703#M14370</guid>
      <dc:creator>marty1885</dc:creator>
      <dc:date>2019-09-03T05:34:33Z</dc:date>
    </item>
    <item>
      <title>Re: Exchanging data between SAS and ROOT.</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Exchanging-data-between-SAS-and-ROOT/m-p/585729#M14378</link>
      <description>&lt;P&gt;I can't think of anything more compact than a gzip'ed csv file for data transfer. Supply a documentation of the structure along with the file, so that the recipients can exactly recreate the data.&lt;/P&gt;
&lt;P&gt;SAS can read a gzip'ed csv file in one action like this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename ziptest zip 'class.csv.zip'; /* insert the path where you stored the file */

data class;
infile ziptest dlm=',' dsd;
input
  name :$8.
  sex :$1.
  age
  height
  weight
;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The file was created with&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
file ziptest dlm=',' dsd;
set sashelp.class;
put name sex age height weight;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and the end result of the first piece of code will be an exact replica of the SAS demo dataset SASHELP.CLASS.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PS I used zip as a file format as the forum software does not allow uploading a .gz file.&lt;/P&gt;
&lt;P&gt;The zip compression results in 348 bytes, the gzip gives you 248. Change the filename statement to&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename ziptest zip '$HOME/sascommunity/class.csv.gz' gzip;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;to use gzip compression.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Sep 2019 09:15:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Exchanging-data-between-SAS-and-ROOT/m-p/585729#M14378</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-09-03T09:15:25Z</dc:date>
    </item>
    <item>
      <title>Re: Exchanging data between SAS and ROOT.</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Exchanging-data-between-SAS-and-ROOT/m-p/585800#M14382</link>
      <description>&lt;P&gt;&lt;STRONG&gt;&lt;A href="https://root.cern.ch/access-data" target="_blank"&gt;Access data&lt;/A&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp; ?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Sep 2019 12:57:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Exchanging-data-between-SAS-and-ROOT/m-p/585800#M14382</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2019-09-03T12:57:45Z</dc:date>
    </item>
    <item>
      <title>Re: Exchanging data between SAS and ROOT.</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Exchanging-data-between-SAS-and-ROOT/m-p/585832#M14385</link>
      <description>&lt;P&gt;Maybe some context can help. Now, I have a ~100GB compressed ROOT archive which contains a lot of observation (event in root terms) and 50 variables (branch in root terms) per observation from an physics experiment. And from experience and rough math, I'm expecting a 1TB JSON or a 400GB CSV file if I de-compress my root archive. And my college, the statistician's job is to go through these few hundred million observations and find the outliers, then append statistics to each observation so I can find malfunctions in the equipments.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, here's the problem. As he primarily uses SAS, he needs a way to import all my data in ROOT into SAS. But JSON is obviously nonviable and CSV doesn't scale (I need to generate the CSV then compress it). The opposite problem of sending data from SAS to ROOT is also a big one.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Sep 2019 14:18:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Exchanging-data-between-SAS-and-ROOT/m-p/585832#M14385</guid>
      <dc:creator>marty1885</dc:creator>
      <dc:date>2019-09-03T14:18:03Z</dc:date>
    </item>
    <item>
      <title>Re: Exchanging data between SAS and ROOT.</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Exchanging-data-between-SAS-and-ROOT/m-p/585864#M14391</link>
      <description>&lt;P&gt;A quick google search found at least one example of a program to convert Root TTree file into CSV file.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://root-forum.cern.ch/t/root-tree-to-csv-file-format/27633/3" target="_blank"&gt;https://root-forum.cern.ch/t/root-tree-to-csv-file-format/27633/3&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you can get that to run then in SAS you can just use the PIPE engine to run it on the fly.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
  infile 'root2csv -f myrootfile' pipe dsd truncover ;
  ...
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 03 Sep 2019 15:40:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Exchanging-data-between-SAS-and-ROOT/m-p/585864#M14391</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-09-03T15:40:29Z</dc:date>
    </item>
    <item>
      <title>Re: Exchanging data between SAS and ROOT.</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Exchanging-data-between-SAS-and-ROOT/m-p/586052#M14428</link>
      <description>&lt;P&gt;100G is too big for ACCESS file. Using CSV as Tom suggested.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Sep 2019 11:22:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Exchanging-data-between-SAS-and-ROOT/m-p/586052#M14428</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2019-09-04T11:22:38Z</dc:date>
    </item>
    <item>
      <title>Re: Exchanging data between SAS and ROOT.</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Exchanging-data-between-SAS-and-ROOT/m-p/586611#M14531</link>
      <description>Thank you! This looks like the solution I need.&lt;BR /&gt;&lt;BR /&gt;Is communication in the opposite direction possible? Can SAS output it's data into stdout?</description>
      <pubDate>Fri, 06 Sep 2019 03:49:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Exchanging-data-between-SAS-and-ROOT/m-p/586611#M14531</guid>
      <dc:creator>marty1885</dc:creator>
      <dc:date>2019-09-06T03:49:50Z</dc:date>
    </item>
    <item>
      <title>Re: Exchanging data between SAS and ROOT.</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Exchanging-data-between-SAS-and-ROOT/m-p/586615#M14532</link>
      <description>&lt;P&gt;I think the document is referring to Accessing Data not &lt;A href="https://products.office.com/en-us/access" target="_self"&gt;Microsoft Access&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;Data saved into one or several ROOT files can be accessed from your PC, from the web and from large-scale file delivery systems used, for example in the GRID.&lt;/P&gt;&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Fri, 06 Sep 2019 03:52:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Exchanging-data-between-SAS-and-ROOT/m-p/586615#M14532</guid>
      <dc:creator>marty1885</dc:creator>
      <dc:date>2019-09-06T03:52:10Z</dc:date>
    </item>
  </channel>
</rss>

