FTP file name to metadata

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf FTP file name to metadata

  • Creator
    Topic
  • #47638
    Skip Williams
    Participant

      I am going to try my question a different way.

      How can I store the original name of an input file using the

      FTP protocol in the message metadata?  I am hoping to store it so it can be retrieved later.

      Thank you.

      Skip Williams

      Peacehealth Interface Analyst

      541 686-3710

      skwilliams@peacehealth.org

    Viewing 1 reply thread
    • Author
      Replies
      • #56322
        Anonymous
        Participant

          I haven’t done this but here’s what pours out of my mind at midnight…

          In the directory parse tps you could limit the FTP get to only one file at a time and put that file name into a global variable.  Then in the IB data TPS put the contents of the global variable into either the driver control or userdata metadata fields.

        • #56323
          Nathan Martin
          Participant

            It can be done by making a shared queue of filenames.

            Filenames are put in the queue during directory parse, then they are removed from the queue and put in each respective file-message’s metadata in the inbound proc.  If you really want to, you can even convert your file data into a message format that holds the filename as well and then route that across sites.  (Something like xml, mime, tar, simple prefixed header.)

            I’ve seen this done by using a plain old text file for the queue; for integrity, access to the queue file was synchronized using flock.

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