PROBLEM When a batch job fails on z/OS, the developer gets hundreds of lines of JES output with codes like S0C7, U4038, IGZ0035S, FILE STATUS 35 or SQLCODE -811. To fix it, you must find the failing step, decode the message, work out which program and which statement failed, get its source, check the JCL and the input data, and only then understand the cause. For a beginner this takes 30 to 90 minutes per failure. The senior mainframe engineers who "just know" these codes are retiring, and new developers learn this the hard way. I am learning mainframe development myself on IBM Z Xplore, and this was my daily pain. SOLUTION: ABEND DOCTOR Abend Doctor turns IBM Bob into a mainframe production-support expert. When any job fails, I simply ask Bob "what happened with my last job?" and within about a minute I get, in plain words: what the error means, which program and which line caused it, why it happened, and how to fix it and prevent it next time. It works for any program on the system, not a single demo, and everything comes directly from the mainframe: 1. A lightweight Python engine uses Zowe CLI to find the newest failed job, reads its spool and detects the failure type: abend, JCL error, file status, SQLCODE or an error reported by the program itself. 2. It finds the source library in the job's own JCL, downloads the program source from z/OS, and ranks suspect statements using the Language Environment location, the last DISPLAY that printed, and patterns specific to each failure type. 3. A knowledge base of abend codes, file statuses, SQLCODEs and system messages translates cryptic codes into simple language. 4. IBM Bob, in a custom "Abend Doctor" mode, follows the evidence into the source, JCL and input data, explains the root cause and proposes a concrete fix and prevention, such as adding FILE STATUS checks or numeric validation. TARGET USERS AND INTERACTION Mainframe students, junior COBOL developers and production-support teams. They stay where they already work: in IBM Bob they switch to the Abend Doctor mode and ask in plain language. No new UI, no copying spool output by hand. WHAT MAKES IT UNIQUE Most AI coding assistants stop at the code in your editor. Abend Doctor connects Bob to the live mainframe: it starts from a real failed job and pulls the evidence and the source directly from z/OS. It is read-only by design, so it is safe on shared systems: the engine can only run Zowe list and view commands, anything else is refused in code, and the Bob mode forbids submitting, cancelling or deleting anything. It also teaches: every answer explains why the error happened, which is how a beginner becomes an expert. IMPACT Tested on a real IBM Z Xplore system: a job that abended with U4038 was diagnosed end to end. The engine found the job, downloaded the source from z/OS, identified FILE STATUS 35 on file EMPFILE and pointed to the exact OPEN statement, and Bob explained the missing DD and the fix. Time to diagnosis dropped from tens of minutes of reading spool output to about one minute.
Category tags: