AutoSys Workload Automation

  • 1.  CA WA DE Series - Batch Script Issue

    Posted Oct 05, 2016 07:01 PM

    Hi,

     

    We are executing a windows batch script using CA Workload Automation tool. CA WA job is submitting the batch script on windows server, and the batch script is executing and completing successfully. But the status of CA WA job is failed in CA WA tool. Below is the batch script.

     

    d:

    cd D:\Informatica\9.6.1\server\infa_shared\CmdFiles
    pscp -sftp -pw *** D:\Informatica\9.6.1\server\infa_shared\TgtFiles\BASWARE\TMS_POHEADER.dat USER@IP_address:/home/TMS/Outbound/TMS_POHEADER.dat

     

    Has anyone encountered such issues. Any inputs in this regard are highly appreciated.

     

    Kind Regards,

    Sudhir Goel



  • 2.  Re: CA WA DE Series - Batch Script Issue
    Best Answer

    Posted Oct 05, 2016 11:01 PM

    Hi,

    What may be happening is that the pscp command is actually getting a return code.  When the script is run manually the return code is not shown to the screen.  Add the line below after the pscp .. command.

    echo 'The return code from the command is ' %ERRORLEVEL%

     

    Options:

    Best - There may be a log from pscp that shows why the script is getting a return code.

    To make the job end successfully,  either set that return code to 0 inside the script or  in the scheduler make the job end successfully with that return code.