How to detect EOF with Fileset Local protocol

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf How to detect EOF with Fileset Local protocol

  • Creator
    Topic
  • #49525
    Steve Robertson
    Participant

      Is there an easy (relatively) way to detect EOF within a tcl proc on an inbound thread using the Fileset Local protocol? There is no trailer record in the inbound file and I need to use NL for the “style”. I’m using Cloverleaf 5.4.1 on Windoze.

      I don’t see anything in the message metadata that might help. Maybe there’s some way to use msiGetStatSample, but it’s not obvious how.

      I believe I could do this rather easily if I wanted to write all my own I/O routines. But I don’t.

      Thanks in advance for any light you may be able to shed on this!

    Viewing 0 reply threads
    • Author
      Replies
      • #62327
        Jim Kosloskey
        Participant

          Steve,

          One way I have accomplished this is to have a dummy file which by name will always sort last in the inbound directory.

          I have an ‘end-of-file’ message in the file.

          I have a delete file proc which makes sure the dummy file does not get deleted so it is always there.

          Then since the file name is always retrieved last, the ‘end-of-file’ message is the last message I receive.

          You can then test for that message and do what you want when ‘end-of-file’ is reached.

          I am sure there are other ways to resolve the challenge.

          Jim Kosloskey

          email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

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