End of message

  • Creator
    Topic
  • #55851
    Gene Millard
    Participant

    I am reading in a file using fileset-local and I am unable to tell cloverleaf where the end of the file is so I can send it.  There is only one message per file but they are different sizes.

    Other files I have read in have had a BTS segment at the end but these do not.

    Is there something in tcl that I can use to tell when I have reached the end of file?

    The Guthrie Clinic
    Sayre, PA

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

      So do you have multiple files in the directory with one message per file?

      If so you want to know when the last file is read?

      Or is it one file but you want to know when that file has been read by Fileset Local?

      If the latter, place a proc in the delete UPoC on the protocol. When that point is reached (and your proc is executed), the file will have been read and be ready to be deleted so you can do whatever you want at that point (within reason) – just make sure you pass the information you receive at that UPoC back to the engine so the file gets deleted.

      If it is the former there is one trick I have used in the past. I had a file placed in the directory which would sort last and never be created by whatever system is placing files in that directory (might need some negotiation). That file was created such that it could not be deleted easily. I still used a Delete UPoC proc but now I checked to see if the known file name is presented for deletion. If it is, because it is sorted last, I know I have processed all the files. I do not pass that file name back to the engine so that it won’t get deleted or throw an error if the engine does not match the permissions for deletion.

      I am sure there are other tricks for that situation as well.

      email: jim.kosloskey@jim-kosloskey.com

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

Forum Statistics

Registered Users
5,053
Forums
28
Topics
9,236
Replies
34,175
Topic Tags
273