Conversion of Batch script to Shell script

Windhill2015Windhill2015 UAEPosts: 47 Journeyman ✭✭✭
Hi The attached batch script is used to verify successful completion of a Parent Job. I want to run the same on Linux but I am struggling to either convert the script or create a suitable replacement. Highlighted section I can do myself but can someone assist me with the other section. Thanks 


  • Jean-Yves RobertJean-Yves Robert Professional Services SingaporeTeam Automic Posts: 72 Journeyman ✭✭✭
    Hello. Looks like a very complicated script :neutral:
    Can you tell us more about what you are trying to achieve?
    Would it be possible to set the error checking at the parent level?
  • Windhill2015Windhill2015 UAEPosts: 47 Journeyman ✭✭✭
    Hi - This is verifying a mainframe job(Parent Job). Parent Job can have multiple return codes which are classed as successful. In this scenario we are saying if return = 0 or 4 or 8 or 99 or 00 or 01 then job is successful. Anything else job is a failure. 
    We force the Parent Job to complete allowing the verification script to test for success/failure.
    The attached script lists all execution records of the Parent Job. The job-log from the latest one is read looking for the acceptable return codes. If any of previous mentioned return codes is found verification job completes. If none found verification fails highlighting there was an issue with the Parent Job. 

    Cannot apply this logic in the Parent Job as multiple return code checking does not work when using z/OS Uproc template. 

    In the previously attached script I am struggling with interpreting the "for /f "delims=" & "for /f "tokens=" steps. Any help appreciated.                                                             
Sign In or Register to comment.