AppWorx, Dollar Universe and Sysload Community

  • 1.  Conversion of Batch script to Shell script

    Posted Feb 07, 2017 01:32 AM
      |   view attached
    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 

    Attachment(s)

    docx
    Verification_Script.docx   11 KB 1 version


  • 2.  Conversion of Batch script to Shell script

    Posted Feb 07, 2017 03:27 AM
    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?


  • 3.  Conversion of Batch script to Shell script

    Posted Feb 08, 2017 05:33 AM
    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.