Automic Workload Automation

Expand all | Collapse all

Step level condition code checking

Jump to Best Answer
  • 1.  Step level condition code checking

    Posted 10 days ago
    Does anyone use the step level condition code checking? I have this set on a few jobs that occasionally have an empty file causing a RC=16. The jobs  still flag this as an abend instead of passing it as OK. I have checked with support as well, and they say that the setup is correct. It's just baffling as to why it doesn't work the way it should and i was wondering if it's my system or if others have the same issue or a solution for the issue


  • 2.  RE: Step level condition code checking

    Posted 10 days ago
    One solution is to add a post-process script that interrogates the return code, and if it is 16, set it back to 0.  (Considered sloppy, and hides/masks the actual outcome for the task.)

    Another solution is to go into the tasks General/Runtime settings and tell it to consider a 16 to be OK.  But doing so will also mean a RC of 15, 14, etc. would also be considered to be OK, so those types of failures would go unnoticed.  (When we do this, we add Workflow post-condition rules to trap the other bad outcomes.)

    The best solution is to figure out how to tell that the file is empty prior to trying to consume it, and then skip that task when it is empty, thus avoiding the bad RC all together.

    ------------------------------
    Pete
    ------------------------------



  • 3.  RE: Step level condition code checking

    Posted 10 days ago
    Thanks for the suggestions. I will try the post process. It would just be easier if the Step List return codes would work right in the Runtime tab


  • 4.  RE: Step level condition code checking
    Best Answer

    Posted 10 days ago
    :set &MyRC# = get_statistic_detail(,RETURN_CODE)
    :if &MyRC# = 16
    :    MODIFY_STATE RETCODE = '000'
    :    print "RETURN CODE WAS RESET TO 000 FROM 016"
    :endif​


    ------------------------------
    Pete
    ------------------------------