File selection order of Fileset-Local protocol?

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf File selection order of Fileset-Local protocol?

  • Creator
    Topic
  • #48604
    David Gordon
    Participant

      Working on an EMPI interface, and we are receiving flat files via FTP from a source.  They need to be processed in order, by date, which is in the filename (i.e. MBCRX20060622 after MBCRX20060621).  

      The protocol seems to grab MBCRX20060622 first, however.  Does anyone know what the protocol does to determine which files to process first?  I thought I would be able to use a directory parse TPS, but I’m not sure how to do this…

      Thanks in advance.

    Viewing 4 reply threads
    • Author
      Replies
      • #59125
        James Cobane
        Participant

          David,

          Under your ‘FTP Options’ tab for the thread, what ‘Dir List’ command do you have specified? I believe the ‘nlst’ command is the default, and would normally list the files in lexicographical (dictionary) order.  To double-check the order the list of files is being returned in, you should be able to turn up the EO on the thread and see the information in the log.

          Hope this helps.

          Jim Cobane

          Henry Ford Health

        • #59126
          David Gordon
          Participant

            It’s a local fileset, not an FTP fileset, I should have been clearer.  The source system is pushing the files to and FTP accessible folder on our AIX box.

            This is required due to some business restrictions.

          • #59127
            Ga
            Participant

              Hi David,

              Maybe I can help you with a TCL proc. I use that proc to parse a dir as I want, i.e. descending or descending order.

              Just write me to gaetan.michaud.chum@ssss.gouv.qc.ca

              Ga

            • #59128
              Robert Kersemakers
              Participant

                Hi David,

                I think you need to take a look at the ‘Directory Parse’ option under the FileSet/FTP Local Protocol Properties and make your own tcl-proc for it.

                When using the ‘Directory Parse’, the incoming message is a list (ofcourse!!) of all the files found during the ‘scan’ of the specified directory. You can then sort this list and send it on into the engine, so the files will be read in the sorted order.

                Hope this helps!

                Zuyderland Medisch Centrum; Heerlen/Sittard; The Netherlands

              • #59129
                David Gordon
                Participant

                  Robert Kersemakers wrote:

                  Hi David,

                  When using the ‘Directory Parse’, the incoming message is a list (ofcourse!!) of all the files found during the ‘scan’ of the specified directory. You can then sort this list and send it on into the engine, so the files will be read in the sorted order.

                  That’s the exact information I needed.  Thanks!

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