use fileset-ftp to access two separate dir on same server?

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf use fileset-ftp to access two separate dir on same server?

  • Creator
    Topic
  • #52688
    Jennifer Hardesty
    Participant

      I have a process using a fileset-ftp that accesses a server using the same login and password twice, reading from two very different directories.  All the files picked up pass through the same tclprocs and are routed to the same thread, but the original designer of the process set it up with two separate threads — one for each directory — to pull the files initially.

      I want to combine the two threads into one because in my mind they are doing the same thing.  Has anyone done this?  Where would I set things up in a single thread to scan the two different dir?  The Parser tcl script?

      Thanks in advance!

    Viewing 3 reply threads
    • Author
      Replies
      • #75125
        Jim Kosloskey
        Participant

          Jennifer,

          You could have one Fileset/FTP thread specify to search one directory, then in the DirParse UPoC have a Tcl proc that searches the other directory but then you would take responsibility for opening and reading the files, etc.

          I think it is best to leave it as is – or -have the host system combine the files into one directory and then use Fileset/FTP to manage that directory.

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

        • #75126
          Charlie Bursell
          Participant

            If this were output it would be asy.  Not as easy with input

            If it were me, and it is not, I would write my own FTP proc to this using either the FTP package or, preferably, TclCurl

          • #75127
            Jennifer Hardesty
            Participant

              Well, yes, output is easy.  I’m sending the picked up files from both locations to 4-6 locations depending on the name or extension.

              And believe me, I’ve requested they dump them all into one directory.  I’ve explained why.  I’ve shown them my code for how I handle their files once I pick them up — because where they came from is never part of my sorting criteria, but because the user thinks that should be my starting criteria, they refuse to change it.

              However, I need to eliminate some threads.  It’s a kind of crisis matter here that will be resolved in beauricratic future, but right now I need to find ways to be creatively thrify.  

              I just know there’s a way to do it.  It’s been ruminating in the back of my mind for a while.  Just like my thought for using the same fileset-ftp process for all the batch billing processes, just pass the login, password, server, and file names in to a tclproc as parameters, if I can figure out how to encrypt them — of course, by the time I figure that out, we won’t be doing batch billing anymore. 😉

            • #75128
              Vince Angulo
              Participant

                Somewhat like Charlie suggests, although I do this outside of Cloverleaf…

                …I have Tcl scripts running on the FTP server that glob through various input directories scheduled throughout the day and then copies or renames the files to the fileset directory for a single input thread.

                Been doing it that way for a couple of years and it’s served me very well.

                Good luck!

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