ftp a file in it’s entirety

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf ftp a file in it’s entirety

  • Creator
    Topic
  • #55156
    Leisa Canavan
    Participant

      Hi,

      I am trying to ftp a file in it’s entirety to another destination – without reading in the contents of the file.

      I have been trying to use curl but have been unsuccessful 🙁

      – it has to be via cloverleaf

      Advice gratefully received – Thanks

    Viewing 7 reply threads
    • Author
      Replies
      • #84362
        James Cobane
        Participant

          Leisa,

          You should be able to accomplish this using the fileset-ftp protocol on your threads and simply treating each file as a single message (set the Style to single) and a raw route.

          Hope that helps.

          Jim Cobane

          Henry Ford Health

        • #84363
          Leisa Canavan
          Participant

            Thanks for that – The file can be read into one thread but I cant ftp it out using a different thread

            I am getting an error message about unsupported Trixid (101) each time.

            I have different Trix formats but always get the same error message

          • #84364
            Jim Kosloskey
            Participant

              Are you doing hci_static raw routing (shouldn’t give you trxid error if set up properly)?

              It might be if you have a large file it might seem to be a big delay or ,depending on you platform, run into some resource constraint when treating the file as a single message. I am not sure about that though.

              email: jim.kosloskey@jim-kosloskey.com 30+ years Cloverleaf, 60 years IT – old fart.

            • #84365
              Robert Kersemakers
              Participant

                What Jim says: if you just want to send all messages from inbound thread A to outbound thread B (regardless of the content/sort of message), then use static routing.

                Easy to do: create a route from thread A to thread B and hit the ‘Set as Static Route’ when inside the route; this will give you the route ‘_HCI_static_route_’. This now tells the engine to ignore TrxIds and just send all messages towards B.

                Zuyderland Medisch Centrum; Heerlen/Sittard; The Netherlands

              • #84366
                Leisa Canavan
                Participant

                  Thanks for advice. – I have now got it resolved.

                  Initially I tried to develop this on 6.1 for as well as ftping a file I needed it to kick off a stored procedure (developed by another team)

                  So I  recreated the threads on 5.8 and they worked but flagged an error with the stored procedure – I could see the error on 5.8 but not on 6.1.

                  Thanks again

                  Leisa

                • #84367
                  Peter Heggie
                  Participant

                    OK so you now have the FTP working (using the static route) but the stored procedure is not working?

                    If you have the Data Integrator product, then you can execute a stored procedure at almost any part of the FTP interface, in a tcl proc. So using this method, the stored procedure can be called from within the start to finish of the FTP transaction, making it part of the transaction.

                    If not, and you are using the database_outbound protocol to invoke a stored procedure, then:

                    1) the stored procedure portion of the interface would be a second, separate outbound activity (additional route detail). Meaning – that there would be one input thread (FTP) and two output threads (FTP, DB). The implication is that the FTP portion could fail but the stored procedure could succeed or vice versa. This is something to consider.

                    2) you do need to be sending something to that database outbound thread, just to get it to trigger the database call.

                    The database_outbound protocol requires you to configure it by selecting the database and table (or view) that will be the target, even if you are executing a stored procedure that has no arguments, even if you don’t need to send any data at all to the database.

                    So there are different approaches to this situation – here is one suggestion:

                    – have the database admin create a view that holds the minimum columns necessary

                    – use the Cloverleaf Database Schema Configurator to read that view (and build a VRL for that view)

                    – build a simple translator that ignores the input data (file) and just copies literal strings to the output (select your VRL for the output format), just enough to meet the requirements of the stored procedure

                    – configure your outbound thread to reference that view, and then build the stored procedure call. You can use the data items from your translator (by referring to them with the syntax) or by hardcoding literal string values in the stored procedure call.

                    Peter Heggie
                    PeterHeggie@crouse.org

                  • #84368
                    Leisa Canavan
                    Participant

                      Sorry for taking a while to reply  but I have been the advice in posts- Thanks for that !

                      Unfortunately a new error has appeared regarding a failed call to pdjSetClass.

                      I have had a look at it seems that it is to do with set the CLASSPATH variable.

                      We use inhouse written bespoke code to connect to database.

                      It would be great to be able configure this via gui.

                      Thanks again

                    • #84369
                      Peter Heggie
                      Participant

                        ok no problem!

                        Peter Heggie
                        PeterHeggie@crouse.org

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