AutoSys Workload Automation

 View Only
  • 1.  SCP job return code if no file was there - ending in success possible ?

    Posted Mar 30, 2016 10:01 AM

    Hello.

     

    I need to end my SCP job type in success even if there were no file at the source of the transfer.

     

    Currently, I got this error in log when no file is available :

    FTPHandler.run[:484] - java.io.IOException: No matching files found

         at cybermation.plugins.ftp.scp.CybSFTPHandler.handleDownload(CybSFTPHandler.java:305)

         at cybermation.plugins.ftp.scp.CybSFTPHandler.run(CybSFTPHandler.java:461)

         at java.lang.Thread.run(Unknown Source)

     

    1) Is it possible to end with Success even if there is not file

    2) Is there any document which explain eash return code of an SCP job type ? With this way, I could try to force a "max_exit_success" by example.

     

    Thank you.

     

    Regards,

    Stephane



  • 2.  Re: SCP job return code if no file was there - ending in success possible ?

    Posted Mar 30, 2016 01:56 PM

    Hi Stephane,

     

    As per my tests on dSeries, I do get a failure if the source file is not available. I also confirmed that a zero completion code is returned on success and a non-zero value on failure.  I am not sure which manger you are using, but I would expect other mangers to relay the same completion code.  If you can share which manger you are using, others can confirm this for you.

     

    SCP_Success.PNG

     

    Hope this helps in finding a solution for your problem.

    Regards,

    Pradeepan Gunabalasingam



  • 3.  Re: SCP job return code if no file was there - ending in success possible ?
    Best Answer

    Posted Mar 30, 2016 02:51 PM

    Hi Stephane,

     

    I have confirmed with our Agent development team and the return codes for SCP/SFTP job types are 0 for success and 1 for failure.  Based on this you will not be able to determine the if the job failed because the file does not exists or for any other reasons.

     

    Please feel free to post an idea requesting an enhancement to the CA Workload Automation System Agent community.

     

    https://communities.ca.com/community/ca-workload-automation/overview

    Click on “Log in” to login with your support online credentials, then

    -> Select Actions

    -> Create an idea.

    Regards,

    Pradeepan Gunabalasingam



  • 4.  Re: SCP job return code if no file was there - ending in success possible ?

    Posted Mar 31, 2016 03:01 AM

    ok, it's not a good news for me but it's the answer ...

     

    Thank you !



  • 5.  Re: SCP job return code if no file was there - ending in success possible ?

    Posted Mar 31, 2016 08:38 AM

    Could you use a FILE_TRIGGER WOB with FILENAME with CREATE to wait until file is created, then RELEASE the SCP?



  • 6.  Re: SCP job return code if no file was there - ending in success possible ?

    Posted Mar 31, 2016 09:44 AM

    Hello.

     

    It’s not easy when the remote server is not in our infrastructure or if it doesn’t have an Autosys Client.

     

    Regards

     

    De : RickR

    Envoyé : jeudi 31 mars 2016 14:39

    À : Stéphane JEAN BAPTISTE <sjeanbaptiste@lacoste.com>

    Objet : Re:  - SCP job return code if no file was there - ending in success possible ?

     

    CA Communities <https://communities.ca.com/?et=watches.email.thread>

     

     

    SCP job return code if no file was there - ending in success possible ?

     

    reply from RickR<https://communities.ca.com/people/RickR?et=watches.email.thread> in CA Workload Automation - View the full discussion<https://communities.ca.com/message/241872780?et=watches.email.thread#comment-241872780>