Automic Workload Automation

Manually set RA FTP Host field to "Local File System" using Script

  • 1.  Manually set RA FTP Host field to "Local File System" using Script

    Posted 12-30-2016 12:20 PM
    Hi Community!

    Recently we had a user who was attempting to use a single RA FTP Job for all file transfers between servers. In this case a variable was used for the source host and destination host values on the Ftp tab. Script would populate the Host fields within the RA FTP Job with the variable to allow one job to dynamically perform all file transfers.

    One issue that arose from this design was populating either Host A or Host B fields with the value "Local File System". This value is selectable from the RA FTP Job directly using a drop down but just placing the value "Local File System" into either Host attribute would give an error:

    U0052002 Object 'LOCAL' with type 'CONN' does not exist in client 'xxxx'

    As you can see, the RA FTP Job attempts to search for connection type objects with the same value. Below is the solution to this problem. If you intend to set the RA FTP Job Host field to the preset "Local File System" you must change multiple attributes using the following guidelines:

    To change Host A, both "prompt_0_fromConnection" and "targetHostSource" attributes must be set. 
    To change Host B, both "prompt_0_toConnection" and "targetHostDest" must be set.

    If "Local File System" must be set, "targetHostSource"/"targetHostDest" must be set to an empty string, in any other case the attribute must be set to the real connection name. 

    For example, if you wanted the source to be "Local File System" and the destination to be a connection object "CONN_FTP_SERVER" you would use the following script:
    !Set Host A Attribute to "Local File System"
    :PUT_ATT "prompt_0_fromConnection" = "Local File System" 
    :PUT_ATT "targetHostSource" = "" 

    !Set Host B Attribute to connection object "CONN_FTP_SERVER"
    :PUT_ATT "prompt_0_toConnection" = "CONN_FTP_SERVER" 
    :PUT_ATT "targetHostDest" = "CONN_FTP_SERVER" 

    I hope this helps!