Skip to Content
avatar image
Former Member

Dynamically change FTP server address

I am building an interface where I am planning to use single FTP communication channel to send files to multiple FTP servers. For this, I wanted to change FTP channel parameters dynamically using variable substituion, Seems we cannot change FTP server IP address using variable substitution. Would that be achievable thorough adapter module or it there any other way which we can use. Thanks

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Feb 18, 2014 at 08:31 AM

    Hi Amol,

    If you want to send to different FTP locations you would need to do an adapter development. You can follow Amit Srivastava's blog Send File to Two Different Locations using Adapter Module for this purpose.


    Regards.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi,

      As above said you can achieve your requirement using Custom module .You can also achieve using unix script.

      For either of the above cases you need to do thorough testing from your end .Otherwise you will end up with unwanted issues in Production environment which is not desirable.In both above cases instead of using standard adapter you are using java code/script to connect to target system ;you are not using standard PI adapter to connect.

      For your requirement i recommend you not to go for either Java code/module as you don't have parameter to set target system host name/IP address dynamically.

      Regards

      Venkat

  • Feb 18, 2014 at 09:15 AM

    Hello,

    If i were u then i would have neither opted AM (just because u want to exchange messages to multiple FTP servers) nor script (becoz of error handling, in addition to that ur E2E call will not be failed in case script throws any error).

    So sometime it's better to keep things simple, but the choice is urs.

    Thanks

    Amit Srivastava

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Amol - AFAIK- No. NFS works because the destination system is fixed and you are just changing the directory using variable substitution / DC

      If the destination connection details are frequently get changed then the only option i see here is writing a script.

      Place the files on NFS and using the script send them to different locations.