<?xml version="1.0" encoding="windows-1252"?>
<node id="961052" title="Re: Read a bin file and extract data" created="2012-03-22 12:06:13" updated="2012-03-22 12:06:13">
<type id="11">
note</type>
<author id="45414">
jmcnamara</author>
<data>
<field name="doctext">
&lt;p&gt;
What is a gcd file and what data are you trying to extract from it?
&lt;/p&gt;
&lt;p&gt;
As [bulk88] points out the file that you are trying to parse is an OLE compound document (of which Word documents are an example but your file isn't a Word document).&lt;/p&gt;
&lt;p&gt;
The smplls utility that comes with [http://search.cpan.org/~jmcnamara/OLE-Storage_Lite/|OLE::Storage_Lite] shows the following in the file format: 
&lt;/p&gt;

&lt;code&gt;
$ perl sample/smplls.pl ../LaborHoppe_P1_UNK-0010_09.09.2011_1.gcd 
00    1 'Root Entry' (pps 0)                          ROOT 20.09.2011 08:42:10
01      1 'Audit Trail' (pps 1)                       DIR  09.09.2011 17:22:14
02        1 'Audit Trail Property' (pps af)           FILE         50 bytes
03      2 'File Comment' (pps 18)                     FILE          1 bytes
04      3 'File Property' (pps 17)                    FILE        c65 bytes
05      4 'GC Raw Data 1' (pps 5)                     DIR  14.09.2011 11:15:27
06        1 'Status' (pps e3)                         FILE         36 bytes
07        2 'Status Data' (pps e6)                    FILE          0 bytes
08        3 'Intensity Data' (pps e4)                 FILE       9f60 bytes
09        4 'Intensity Data Flag' (pps e5)            FILE       13ec bytes
10      5 'GC Raw Data 2' (pps 6)                     DIR  09.09.2011 17:41:29
...
217        7 'Grouping Results' (pps c9)               FILE         32 bytes
218        8 'Peak Picking Param' (pps ca)             FILE         28 bytes
219        9 'Quantitation Param' (pps cb)             FILE         30 bytes
220       10 'Time Program For Data' (pps cc)          FILE         18 bytes
221       11 'Time Program For Method' (pps cd)        FILE         18 bytes
222       12 'Column Performance Param' (pps ce)       FILE         68 bytes
223       13 'Compound Calib Peak Info' (pps cf)       FILE         d0 bytes
224       14 'Grouping Calib Peak Info' (pps d0)       FILE         d0 bytes
225       15 'Compound Calib Curve Info' (pps d1)      FILE          0 bytes
226       16 'Compound Calib Peak Info2' (pps d2)      FILE         30 bytes
227       17 'Grouping Calib Curve Info' (pps d3)      FILE          0 bytes
228       18 'Grouping Calib Peak Info2' (pps d4)      FILE         30 bytes
229     27 'GC Data Processing Original 2' (pps 11)    DIR  09.09.2011 17:22:14


&lt;/code&gt;
&lt;p&gt;
At first glance this doesn't seem to match the unpack statement in your program. Are you sure it is meant to parse the same file format?
&lt;/p&gt;


&lt;p&gt;
--
&lt;br&gt;
John.
&lt;br&gt;
</field>
<field name="root_node">
961032</field>
<field name="parent_node">
961032</field>
</data>
</node>
