Hi Ken and Alexander,

I didn't get a chance to examine your responses today, as I was spent most of the day implementing the suggestions from one of the other respondents. I eventually got it to work correctly. The biggest problem I had was extracting the elements out of the hash to write them out to the final output file. I eventually got there.

I will examine your suggestions on Monday

In the meantime, I have appended a couple of fields to the datasets you sent me to show you basically what I have.

The hash should contain:

Date, Time, all 5 remaining fields from gravity, all 4 remaining fields from magnetics, and three remaining fields from bathymetry.

Whilst the navigation should be the same in all three files, by putting them into the hash I can check that they are. If they are not essentially the same, then I know that a problem exists.

No further processing of the fields is done (ie addition, etc). They are just read from the hash and written in a specific format (MGD77) to an output file. With the work I did today, I think I can manage that. Where there are multiple navigations (most times),I have a hierarchy and select what I believe is the best for output (usually bathymetry).

Here is the updated file structure you sent me ( can't see how to make the attachment you did)

$ cat gravity

2010-10-01 00:00:03 lat1 long1 grav1 g_anom1 eotvos1

2010-10-02 00:00:05 lat2 long2 grav2 g_anom2 eotvos2

2010-10-03 00:00:07 lat3 long3 grav3 g_anom3 eotvos3

$ cat magnetics

2010-10-02 00:00:05 lat2 long2 mag1 m_anom1

2010-10-03 00:00:07 lat3 long3 mag2 m_anom2

2010-10-04 00:00:09 lat4 long4 mag3 m_anom3

$ cat bathymetry

2010-10-03 00:00:07 lat3 long3 bath1

2010-10-04 00:00:09 lat4 long4 bath2

2010-10-05 00:00:01 lat3 long3 bath3

Thanks once again

Mike


In reply to Re^4: Joining separate data files to make one. by msexton
in thread Joining separate data files to make one. by msexton

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.