Automic Workload Automation

Expand all | Collapse all

How to use "move" or "freeform" option after FTP job completion with FTP AGENT

  • 1.  How to use "move" or "freeform" option after FTP job completion with FTP AGENT

    Posted 01-24-2018 10:04 AM
    Hi people I am new to the world of Automic
    We are using  Automic Web Interface version 12.0.1.GA01-353.
    I have created new FTP agent, FTP connection and a new FTP job. This job transfers the multiple files from input locations(Batch Server) (Agent File System) to remote FTP server locations. Now the requirement is on successful completion of this FTP job the files should be moved from PATH1 to PATH2 in my Batch local server.
    Can somebody explain how we can use the "Free Form" FTP JOB job command to achieve the movement of the files for this requirement?

    P.S: I could have created another job post the success of this job to perform this activity through UNIX script but we have lot of FTP jobs and the frequency of all these jobs are different.

    Thanks in Advance!



  • 2.  How to use "move" or "freeform" option after FTP job completion with FTP AGENT



  • 3.  How to use "move" or "freeform" option after FTP job completion with FTP AGENT

    Posted 01-25-2018 02:47 AM
    Hi bobby_tamayo_automic

    Thanks for the response i have referred the shared documentation and  tried to use the "move from to" option but it  does not work for the local file system, below are the logs:

    2018-01-25 14:56:37             Executing command: move from /PATH1/* to /PATH2/ on Local File System
    2018-01-25 14:56:37             pool-1-thread-16: LocalFileSysBrowserImpl: start: sendCommand(): value: move from /PATH1/* to /PATH2/ 
    2018-01-25 14:56:37             pool-1-thread-16: LocalFileSysBrowserImpl: start: skip(): value: move from /PATH1/*  to /PATH2/ 
    2018-01-25 14:56:37             pool-1-thread-16: FtpFacadeCommandImpl: StackTrace: java.lang.UnsupportedOperationException: stat is not supported for local file system.

    Please note that we need this for the local file transfer post successful FTP job on Agent file system.

    Thanks,
    Ashutosh


  • 4.  How to use "move" or "freeform" option after FTP job completion with FTP AGENT

    Posted 01-25-2018 11:38 AM

    Hi @ASHUTOSH KUMAR

    I tried and it worked for me. You have to use SFTP commands if its an SFTP Connection object. so instead of move you would be using - rename. The commands are listed in the linkBobby Tamayo shared.

    This is what I have used and worked.Attaching the screenshot of my job. If you can send a screenshot of yours, I can try the same at my end.

    5xtourp1v6lm.jpg

    Report

    Executing command: rename /var/ftdata/TEST/CommerceBank/FROM_Spire/Archive/TEST.ep1 /var/ftdata/TEST/CommerceBank/FROM_Spire/TEST.ep1 on Local File System


  • 5.  How to use "move" or "freeform" option after FTP job completion with FTP AGENT

    Posted 01-25-2018 01:25 PM
    shravani_vedantham_6826

    Thanks for looking into it, I am using FTP connection agent and object as SFTP is not supported on the remote client FTP server. 

    I have tried using the "rename" command for the same but it does not seem to work for me:

    wmpgev7exbkv.pnghttps://us.v-cdn.net/5019921/uploads/editor/dr/wmpgev7exbkv.png" width="734">

    Logs:
    2018-01-26 01:37:32             Executing command: rename /u01/batch/dev/retail/data/out/souq/ /u01/batch/dev/retail/data/archive/out/souq/ on Local File System 2018-01-26 01:37:32             pool-1-thread-33: LocalFileSysBrowserImpl: start: rename(): oldName: /u01/batch/dev/retail/data/out/souq/ newName: /u01/batch/dev/retail/data/archive/out/souq/ 2018-01-26 01:37:32             pool-1-thread-33: FtpFacadeCommandImpl: StackTrace: com.uc4.ftpjob.DataTransferException: Unable to rename file/folder from /u01/batch/dev/retail/data/out/souq/ to /u01/batch/dev/retail/data/archive/out/souq/.      at com.uc4.ftpjob.commands.LocalFileSysBrowserImpl.rename(LocalFileSysBrowserImpl.java:140)      at com.uc4.ftpjob.commands.FtpFacadeCommandImpl.rename(FtpFacadeCommandImpl.java:359)


  • 6.  How to use "move" or "freeform" option after FTP job completion with FTP AGENT

    Posted 01-25-2018 03:15 PM
    Hi AshutoshKumar612331

    That's interesting. I suggest that you open an incident and send us the following:

    -The agent log.
    -The export file of RA FTP Connection.
    -The  export file of the FTP job.


    Thanks
    Bob


  • 7.  How to use "move" or "freeform" option after FTP job completion with FTP AGENT

    Posted 01-25-2018 03:50 PM
    Is that folder on the local file system and is that also the server where the ftp agent is installed?


  • 8.  How to use "move" or "freeform" option after FTP job completion with FTP AGENT

    Posted 01-28-2018 02:06 PM
    Hello there,
    Sorry for interrupting but from you command I am unable to see the filename.
    On both source and destination only paths are given.
    There are certain limitations of commands like "mv", "cp", "rename" and "move".


  • 9.  How to use "move" or "freeform" option after FTP job completion with FTP AGENT

    Posted 01-29-2018 03:20 AM
    Alexander_Trenker_120
    Thanks for your response.

    The folder/path is on the local file system and the agent is installed on the same server.


  • 10.  How to use "move" or "freeform" option after FTP job completion with FTP AGENT

    Posted 01-29-2018 04:17 AM
    Hi Krum_Ganev

    I did tried with full qualified path and file name but that also didn't seemed to work either:

    2018-01-29 16:30:56             Executing command: rename /u01/batch/dev/retail/data/out/souq/souq-Master_test_2018-01-24_14.06.07.223.xlsx /u01/batch/dev/retail/data/archive/out/souq/souq-Master_test_2018-01-24_14.06.07.223.xlsx 2018-01-29 16:30:56             on Local File System 2018-01-29 16:30:56             pool-1-thread-53: LocalFileSysBrowserImpl: start: rename(): oldName: /u01/batch/dev/retail/data/out/souq/souq-Master_test_2018-01-24_14.06.07.223.xlsx newName: /u01/batch/dev/retail/data/archive/out/souq/souq-Master_test_2018-01-24_14.06.07.223.xlsx 2018-01-29 16:30:56             pool-1-thread-53: FtpFacadeCommandImpl: StackTrace: com.uc4.ftpjob.DataTransferException: Unable to rename file/folder from /u01/batch/dev/retail/data/out/souq/souq-Master_test_2018-01-24_14.06.07.223.xlsx to /u01/batch/dev/retail/data/archive/out/souq/souq-Master_test_2018-01-24_14.06.07.223.xlsx.      at com.uc4.ftpjob.commands.LocalFileSysBrowserImpl.rename(LocalFileSysBrowserImpl.java:140)      at com.uc4.ftpjob.commands.FtpFacadeCommandImpl.rename(FtpFacadeCommandImpl.java:359)      at com.uc4.ftpjob.commands.impl.RenameCommand.execute(RenameCommand.java:44)      at com.uc4.ftpjob.commands.CommandProcessor.execCommand(CommandProcessor.java:257)      at com.uc4.ftpjob.commands.CommandProcessor.executeIfBoolean(CommandProcessor.java:333)      at com.uc4.ftpjob.commands.CommandProcessor.processCommands(CommandProcessor.java:150)      at com.uc4.ftpjob.commands.CommandProcessor$processCommands.call(Unknown Source)      at FtpJob.runJob(FtpAgent.groovy:304)      at com.uc4.extensibility.types.CITAgent.dispatchJob(CITAgent.java:258)      at com.uc4.ex.cit.CITJob.execute(CITJob.java:194)      at com.uc4.ex.Job.run(Job.java:469)      at com.uc4.ex.ThreadPool$RunnableDecorator.run(ThreadPool.java:53)      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)      at java.util.concurrent.FutureTask.run(FutureTask.java:266)      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)      at java.lang.Thread.run(Thread.java:745) 2018-01-29 16:30:56             pool-1-thread-53: LocalFileSysBrowserImpl: start: doesFileExist(): file: /u01/batch/dev/retail/data/out/souq/souq-Master_test_2018-01-24_14.06.07.223.xlsx 2018-01-29 16:30:56             pool-1-thread-53: LocalFileSysBrowserImpl: return: doesFileExist(): true 2018-01-29 16:30:56             pool-1-thread-53: LocalFileSysBrowserImpl: start: doesFileExist(): file: /u01/batch/dev/retail/data/archive/out/souq/souq-Master_test_2018-01-24_14.06.07.223.xlsx 2018-01-29 16:30:56             pool-1-thread-53: LocalFileSysBrowserImpl: return: doesFileExist(): false com.uc4.ftpjob.DataTransferException: Unable to rename file/folder from /u01/batch/dev/retail/data/out/souq/souq-Master_test_2018-01-24_14.06.07.223.xlsx to /u01/batch/dev/retail/data/archive/out/souq/souq-Master_test_2018-01-24_14.06.07.223.xlsx.      at com.uc4.ftpjob.commands.LocalFileSysBrowserImpl.rename(LocalFileSysBrowserImpl.java:140)      at com.uc4.ftpjob.commands.FtpFacadeCommandImpl.rename(FtpFacadeCommandImpl.java:359)      at com.uc4.ftpjob.commands.impl.RenameCommand.execute(RenameCommand.java:44)      at com.uc4.ftpjob.commands.CommandProcessor.execCommand(CommandProcessor.java:257)      at com.uc4.ftpjob.commands.CommandProcessor.executeIfBoolean(CommandProcessor.java:333)      at com.uc4.ftpjob.commands.CommandProcessor.processCommands(CommandProcessor.java:150)      at com.uc4.ftpjob.commands.CommandProcessor$processCommands.call(Unknown Source)      at FtpJob.runJob(FtpAgent.groovy:304)      at com.uc4.extensibility.types.CITAgent.dispatchJob(CITAgent.java:258)      at com.uc4.ex.cit.CITJob.execute(CITJob.java:194)      at com.uc4.ex.Job.run(Job.java:469)      at com.uc4.ex.ThreadPool$RunnableDecorator.run(ThreadPool.java:53)      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)      at java.util.concurrent.FutureTask.run(FutureTask.java:266)      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)      at java.lang.Thread.run(Thread.java:745) 2018-01-29 16:31:01             pool-1-thread-53: LocalFileSysBrowserImpl: start: disconnect(): no args 2018-01-29 16:31:01             pool-1-thread-53: FtpCommandImpl: start: disconnect(): no args




  • 11.  How to use "move" or "freeform" option after FTP job completion with FTP AGENT

    Posted 01-29-2018 04:32 AM
    AshutoshKumar612331

    Please refer to below article
    https://www.computerhope.com/renamehl.htm

    Note: You cannot specify a new drive or path for the destination of the renamed file.
    As i said - there are certain limitation of the commands. 
    If you want to change the path you shall use "move" and not "rename"

    As per your command -
    command: rename /u01/batch/dev/retail/data/out/souq/souq-Master_test_2018-01-24_14.06.07.223.xlsx /u01/batch/dev/retail/data/archive/out/souq/souq-Master_test_2018-01-24_14.06.07.223.xlsx
     you are changing only the directory (folder/path) and not the filename. Hence you are not using the correct command.
    Please try with move.
    Please refer to below article 
    https://www.computerhope.com/movehlp.htm


  • 12.  How to use "move" or "freeform" option after FTP job completion with FTP AGENT

    Posted 01-29-2018 04:43 AM


  • 13.  How to use "move" or "freeform" option after FTP job completion with FTP AGENT

    Posted 01-31-2018 03:08 AM
    bobby_tamayo_automic
    Hi thanks for the response. 
    I believe that we need to have some kind of service contract with Automic in-order to raise an incident with you guys. I am not sure if our client has procured it, I will check with them and get back to you with the requested information in incident.

    Thanks,
    Ashutosh Kumar


  • 14.  How to use "move" or "freeform" option after FTP job completion with FTP AGENT

    Posted 01-31-2018 12:04 PM
    AshutoshKumar612331

    Hi, 

    Yes, I can see your name in our database. Please try open an incident if necessary.


    Thanks
    Bob



  • 15.  How to use "move" or "freeform" option after FTP job completion with FTP AGENT

    Posted 02-01-2018 03:45 AM
    bobby_tamayo_automic

    Hi Bob,

    I have created an incident INC00219440 for the issue.
    Expecting swift response on the same. 
    Thanks for your response and help.

    Regards,
    Ashutosh Kumar