SMAT EOF?

  • Creator
    Topic
  • #49008
    Ken Revak
    Participant

      When I try to load some files into SMAT I get:

      Errors where encountered while reading the index and message files.

      EOF encountered while reading message 0.0.75477420 near offset 456897

      641 messages where successfully read.

      Of course the messages I am interested in start at 0.0.75483540.  The .msg file is 458,889 bytes and the idx entry says  {OFFSET 456897} so I think I am hooped.

      What would cause this?  Can anything be done to recover?

      Ken

      The index entry:

      {

             {MID {{DOMAIN 0} {HUB 0} {NUM 75477420}}}

             {SRCMID {{DOMAIN {}} {HUB {}} {NUM {}}}}

             {TYPE DATA}

             {SOURCECONN echr_pacs_orm}

             {ORIGSOURCECONN echr_pacs_orm}

             {DESTCONN {{}}}

             {ORIGDESTCONN {{}}}

             {TIME 1169100284}

             {PRIORITY 5120}

             {DATAFMT {}}

             {SAVECONTEXT inbound}

             {OFFSET 456897}

             {LENGTH 2781}

      }

    Viewing 5 reply threads
    • Author
      Replies
      • #60453
        Russ Ross
        Participant

          I would like to start by discuss my basic understanding of SMAT files.

          The SMAT utility uses 2 files (xxx.idx & xxx.msg).

          My understanding is that the xxx.idx file defines the layout of the xxx.msg file that acutally contains all the messages cramed together one after the other.

          My first impression is that the xxx.msg file was truncated before the message of interest could be written out to the len10 value in the xxx.idx file, thus EOF encoutered before expected.

          If I was faced with such a situation, I would be quick to give up using SMAT sicne the xxx.idx file does not match the xxx.msg file.

          I would first use Ultra-Edit to take a quick look directly at the xxx.msg file.

          I might even use the hex-editor feature.

          I might also do

          hcihd xxx.msg >temp_hd.txt

          vi temp_hd.txt

          to see what is at the end of the file.

          Assuming the messages are HL7, another line of investigation might be to do

          cp xxx.msg temp.msg

          perl -pi -e ‘s/rMSH/rnMSH/g’ temp.msg

          vi temp.msg

          If you prefer to look at one segment per line with a visual blank line between each message then do

          cp xxx.msg temp.msg

          perl -pi -e ‘s/r/rn/g’ temp.msg

          perl -pi -e ‘s/^MSH/nMSH/g’ temp.msg

          vi temp.msg

          I have a hunch that the clue you are looking for is at the end of your xxx.msg file.

          Russ Ross
          RussRoss318@gmail.com

        • #60454
          Ken Revak
          Participant

            Thanks.  I have done similiar things.  I’m a little concerned that the file would get truncated though.

          • #60455
            Michael Hertel
            Participant

              What version of Cloverleaf and what O/S are you on?

              This can happen when processes are killed instead of shut down.

              It can happen if you have a power outage.

              Large SMAT files would panic the engine in past releases.

              Did it only happen this once or has it happened often?

              Make sure you cycle save the files before working on them.

              (use the .old copy)

              -mh

            • #60456

              We are seeing this problem as well on a new install of 5.5. I created a brand new site and generated some fresh .idx and .msg files. When trying to resend the selected messages, this is what we get:

              Command Issued: hcicmd -p exam -c “adt_in resend ib_pre_tps data 5120 /opt/quovadx/qdx5.5/integrator/temp/…. len10”

              Command status: 0

              Command output:

              Respone:

              First read on file failed: non-numeric length encode string.

              Command error:

              Temporary file deleted.

              -- Max Drown (Infor)

            • #60457
              Charlie Bursell
              Participant

                Max:

                This is a feature to see if you were paying attention  ðŸ˜€

                Actually it is a bug which is fixed by Rev 1 now available for download

              • #60458

                OK, thanks.  8)

                -- Max Drown (Infor)

            Viewing 5 reply threads
            • The forum ‘Cloverleaf’ is closed to new topics and replies.