AutoSys Workload Automation

 View Only
  • 1.  APPL Variable for FTP Downloaded File?

    Posted Oct 04, 2016 12:03 PM

    CA (DE)

    Version 11.3

    Area:   File Transfer - (FTP Download)

     

    I am downloading a file from an FTP site.

    I specify in the Remote File Name field I specify MEMO* meaning I want to pick up a file that has the PREFIX of MEMO

     

    In the Local File Name field I specify just the path where I want the file to be written.

     

    However, in a subsequent job I wish to notify users that a file has arrived and I wish to reference an APPL variable to obtain the downloaded file name, much like the File Trigger mechanism which has [%APP._ftfile and %APPL._filename] variables to work with.

     

    I would also like to use it in a UNIX job to copy the file from the downloaded location to a backup directory.

     

    I would hope CA (DE) has a variable that hold the downloaded file name in?

     

    Thanks.



  • 2.  Re: APPL Variable for FTP Downloaded File?
    Best Answer

    Posted Oct 06, 2016 06:41 PM

    Hi David,

     

    Currently we do not have this functionality.  I believe this would be a very useful functionality to have and others in the DE community would benefit as well.  Please go ahead and submit an idea for this enhancement.

     

    Regards,

    Pradeep



  • 3.  Re: APPL Variable for FTP Downloaded File?

    Posted Oct 13, 2016 12:53 PM

    lockey,

     

    You can place a file trigger job to look for MEMO* in your Local field name location.  Since you just ftp'd a file to this location you know the file will be there and the file trigger will immediately set the APPL._ftfile value, you can then run the following type of javascript in a link or on your notification job to set an application level variable.

    if (APPL._loadmode == 'false') {
    var temp = APPL._ftfile;
    var start = temp.lastIndexOf('/');
    APPL.filename = temp.substr(start + 1);
    }

    The value of the filename will be in APPL.filename variable.

     

    Hope this helps,

    Dewey