<?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: Read HDF5 in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Read-HDF5/m-p/217853#M267764</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is an export tool in the HDF5 application that will output csv files.&amp;nbsp; And R has a package that reads HDF5.&amp;nbsp; But we still use SAS for data management and I was hoping to avoid the intermediary steps.&amp;nbsp; Jaap is right, though, I could use XCMD to call a Python or R routine.&amp;nbsp; Thank you for your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 09 Apr 2015 15:01:16 GMT</pubDate>
    <dc:creator>JI9</dc:creator>
    <dc:date>2015-04-09T15:01:16Z</dc:date>
    <item>
      <title>Read HDF5</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Read-HDF5/m-p/217850#M267761</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there any way for SAS to read HDF5 files?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Apr 2015 21:54:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Read-HDF5/m-p/217850#M267761</guid>
      <dc:creator>JI9</dc:creator>
      <dc:date>2015-04-08T21:54:21Z</dc:date>
    </item>
    <item>
      <title>Re: Read HDF5</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Read-HDF5/m-p/217851#M267762</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;By looking at the file specification, I would advise to look for an alternative way rather then trying to import it using something like INFILE.&lt;/P&gt;&lt;P&gt;What system/SW produced the file?&lt;/P&gt;&lt;P&gt;Perhaps they offer an API, like a JDBC driver.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Apr 2015 05:52:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Read-HDF5/m-p/217851#M267762</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2015-04-09T05:52:37Z</dc:date>
    </item>
    <item>
      <title>Re: Read HDF5</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Read-HDF5/m-p/217852#M267763</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Agree with Linus, when you find a program (phyton?) there could be a way to integrated using Xcmd.&amp;nbsp;&amp;nbsp; XCMd is available?&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Apr 2015 09:34:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Read-HDF5/m-p/217852#M267763</guid>
      <dc:creator>jakarman</dc:creator>
      <dc:date>2015-04-09T09:34:27Z</dc:date>
    </item>
    <item>
      <title>Re: Read HDF5</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Read-HDF5/m-p/217853#M267764</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is an export tool in the HDF5 application that will output csv files.&amp;nbsp; And R has a package that reads HDF5.&amp;nbsp; But we still use SAS for data management and I was hoping to avoid the intermediary steps.&amp;nbsp; Jaap is right, though, I could use XCMD to call a Python or R routine.&amp;nbsp; Thank you for your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Apr 2015 15:01:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Read-HDF5/m-p/217853#M267764</guid>
      <dc:creator>JI9</dc:creator>
      <dc:date>2015-04-09T15:01:16Z</dc:date>
    </item>
    <item>
      <title>Re: Read HDF5</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Read-HDF5/m-p/217854#M267765</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is a dump tool which will export the file to XML/ASCII if that helps:&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.hdfgroup.org/HDF5/doc/RM/Tools.html#Tools-Dump" title="http://www.hdfgroup.org/HDF5/doc/RM/Tools.html#Tools-Dump"&gt;HDF5/Tools API Specification&lt;/A&gt;&lt;/P&gt;&lt;P&gt;From: &lt;A href="http://www.hdfgroup.org/HDF5/XML/" title="http://www.hdfgroup.org/HDF5/XML/"&gt;http://www.hdfgroup.org/HDF5/XML/&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Apr 2015 15:13:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Read-HDF5/m-p/217854#M267765</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2015-04-09T15:13:52Z</dc:date>
    </item>
    <item>
      <title>Re: Read HDF5</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Read-HDF5/m-p/217855#M267766</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yup, I believe that is the program R calls as part of the R package rhdf5.&amp;nbsp; The solution I've settled on is calling the h5dump function in R (which in turn calls the h5dump tool you linked to, I think) from Proc IML.&amp;nbsp; The bit64 package is also used because, at least in my case as I'm running 32-bit SAS 9.4, integer64 data types are created in R from the HDF5 files.&amp;nbsp; SAS does not recognize the integer64 data type on SAS 9.4 32-bit, maybe 64-bit would work.&amp;nbsp; Since I am getting integer counts from instruments, I was able to safely convert the integer64 data to regular integers before importing into SAS. Anyway, here is the code I've used and it appears to work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc iml;&lt;/P&gt;&lt;P&gt; submit / R;&lt;/P&gt;&lt;P&gt; library(rhdf5)&lt;/P&gt;&lt;P&gt; x &amp;lt;- h5dump("c:\\data\\Counts.h5",bit64conversion='bit64')&lt;/P&gt;&lt;P&gt; s &amp;lt;- do.call(cbind,x$Hist)&lt;/P&gt;&lt;P&gt; ss &amp;lt;- as.integer.integer64(s)&lt;/P&gt;&lt;P&gt;endsubmit;&lt;/P&gt;&lt;P&gt;run ImportMatrixFromR(ss,"ss");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;*** Create data set work1 from the IML matrix ss. ***;&lt;/P&gt;&lt;P&gt;create work1 from ss;&lt;/P&gt;&lt;P&gt;append from ss;&lt;/P&gt;&lt;P&gt;close work1;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Apr 2015 21:58:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Read-HDF5/m-p/217855#M267766</guid>
      <dc:creator>JI9</dc:creator>
      <dc:date>2015-04-09T21:58:33Z</dc:date>
    </item>
  </channel>
</rss>

