AutoSys Workload Automation

  • 1.  Unable to capture the error code in the batch files for autosys

    Posted May 21, 2015 05:53 AM

    Hello All,

     

    This regarding autosys issue, we have scheduled the batch files with autosys and it is triggering as per requirement but it just trigger the batch job shown the success color o the job in the autosys console. we have two conditions in the batch files 1 is success and 2 is failure. the issue is whether the job get success or failure, the autosys is showing only success color on the job in autosys console.

     

    could please tell us how to capture the error code for failure case while running the batch files to capture the failure status(red color) on the autosys console and where do we set the variables for that is it in the batch files or autosys server and how to communicate the failure status to autosys server.

     

    please give your suggestions and appreciate your action on this.

     

    Thanks

    Nag



  • 2.  Re: Unable to capture the error code in the batch files for autosys

    Posted May 21, 2015 09:02 AM

    Hi Nag,

     

    I'm going to move this question to the CA Workload Automation community, where it's more likely that an autosys expert will see it.

     

    Thanks!

    Melanie



  • 3.  Re: Unable to capture the error code in the batch files for autosys

    Posted May 21, 2015 09:19 AM

    Hi Melanie,

     

    Thanks a lot for your quick action on this.

     

    Thanks

    Nag



  • 4.  Re: Unable to capture the error code in the batch files for autosys

    Posted May 21, 2015 09:18 AM

    Nag,

     

    I am confused by your issue. are you sure the job exits failure on failure and success on success. And color is a preference in WCC etc. so lets not talk color.

    Is the job in a failure state when it fails yes or no. if not. does it have max_exit_success set or success_codes?



  • 5.  Re: Unable to capture the error code in the batch files for autosys

    Posted May 21, 2015 09:35 AM

    Hello Steve,

     

    Thanks for your response.

     

    Basically, the batch job will execute based on the if conditions, here if the condition get yes then it will run the whole batch file and ends with success or if the condition get no based on the condition then it should come out from the execution process and ends with failure. thing is the batch file is working fine based on the condition but when we trigger the batch job with Autosys, it just trigger the job and make it success color on console whether it fail or success. But we need to capture the red color to that job for failure cases only.

    please let me know if need more information.

     

    please give your views on this.

     

    Thanks

    Nag



  • 6.  Re: Unable to capture the error code in the batch files for autosys
    Best Answer

    Posted May 21, 2015 09:43 AM

    Nag,

     

    Please forget color at this time. As i said the color is a GUI indicator that is setup in the preferences.

    When you run the autosys job and you look at it .. does it say FAILURE (FA) or does it says SUCCESS (SU)

    also as i indicated look at the JIL and make sure they have not used max_exit_success or success_codes.

     

    is this a *nix job or windows job and inside the command .. when it fails does it actually use the code:

    exit 1

     

    colors are arbitrary... if its going green then 1 of the following is true:

     

    1.) It is NOT failing due to an issue in the code

    2.) It is not failing due to JIL attribute settings

    3.) it is failing but the GUI has fail color set to GREEN



  • 7.  Re: Unable to capture the error code in the batch files for autosys

    Posted May 25, 2015 06:51 AM

    Hello Steve,

     

     

    Thanks for your assist on this issue, I have changed the code in the batch file accordingly now we are getting result as we expected.

     

    Once again thanks a lot for you valuable suggestions.

     

     

    Thanks

    Nag



  • 8.  Re: Unable to capture the error code in the batch files for autosys

    Posted May 26, 2015 07:59 AM

    glad to hear



  • 9.  Re: Unable to capture the error code in the batch files for autosys

    Posted May 27, 2015 08:21 AM

    you should mark this answered...