Using Advanced Scheduling with Outbound Fileset-FTP?

Clovertech Forums Cloverleaf Using Advanced Scheduling with Outbound Fileset-FTP?

  • Creator
    Topic
  • #116266
    Lonnie Davis
    Participant

      Hello all!

      I’m attempting to use the fileset-ftp protocol with Advanced Scheduling to SFTP a file containing a week’s worth of messages, but Cloverleaf seems to want to SFTP each message as its own file no matter what settings I use in the Outbound pane of the Fileset Options tab.

      The SFTP process works just fine, but how do I configure an outbound protocol thread to save messages to a file, SFTP the whole file on a specific day and time, and create a new file after the file is SFTP’d?

      I’m hoping to avoid writing a TPS proc to perform this process, but it seems like Cloverleaf doesn’t have functionality built in to do so.

      This is an example workflow I am trying to achieve.

      1. In an outbound protocol thread, write messages to a file $HCISITEDIR/exec/processes/proc1/file.dat
      2. On Mondays at 7:30 AM CST, SFTP the file $HCISITEDIR/exec/processes/proc1/file.dat with the name ‘TESTFILE1.HL7’ on the remote FTP server.
      3. Remove $HCISITEDIR/exec/processes/proc1/file.dat after successful SFTP and recreate the file anew.
      4. Repeat process every week on Monday at 7:30 AM CST.  Each file that is SFTP’d will have a week’s worth of messages.

      Cloverleaf version 6.2.2 on AIX 7.1

    Viewing 3 reply threads
    • Author
      Replies
      • #116267
        Charlie Bursell
        Participant

          I know you said you did not want Tcl but this would best be done in UPoC protocol.

        • #116269
          Ab Lugtenburg
          Participant

            This is how a should try it.

            1. one process with filetolocal thread with append file for your messages
            2. one porcess with inbound filetolocal thread that picks up your file and send it to stftp thread where on the inbound you create a schedule on monday 7:30
              1. on the sftp thread there you need on dir parse a a tcl script and instead of delete you can send it to a backup dir
              2. you create a second thread beside your sftp thread and send the file to your backup  dir

            Still in al the solutions you need a little tcl   , but most of the scripts are available on the standard cloverleaf roll out (i believe ;->>>)

          • #116284
            Jim Kosloskey
            Participant

              No Tcl needed if you don’t need/want a backup. Cloverleaf will delete the file after it is picked up automatically. The next time there is something to write to the file it will be created (the .dat file).

              However, you need to consider how to protect yourself against the situation where you are picking up the .dat file and it is being written to. If the file is constantly being written to the chances are good such a collision will occur.

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

            • #116410
              Lonnie Davis
              Participant

                Thanks everyone for your input.  Since Cloverleaf doesn’t have built-in functionality to use Advanced Scheduling for outbound direction, I decided to go with a pure TCL approach using the UPoC protocol as Charlie suggested.  I already have an interface doing this; I just wanted to know for sure if it was possible using Advanced Scheduling.

            Viewing 3 reply threads
            • You must be logged in to reply to this topic.