AI-Assisted Batch Runbooks: Turn Sanitized Job Evidence into a Reviewable Recovery Guide
A batch failure often leaves useful evidence scattered across scheduler notes, JCL, messages, and handover comments. This article shows how to use an AI assistant to draft a recovery runbook from **sanitized** evidence while keeping technical decisions, authorization, and production actions with human reviewers.
A batch failure often leaves useful evidence scattered across scheduler notes, JCL, messages, and handover comments. This article shows how to use an AI assistant to draft a recovery runbook from sanitized evidence while keeping technical decisions, authorization, and production actions with human reviewers.
The system and examples below are fictional. Local security rules, data classifications, scheduler procedures, and restart authority vary. An AI-produced runbook is a draft for review; it is not approval to rerun, restart, alter JCL, change data, or send an interface.
The problem is not a missing document
A support team may have a recurring failure described only as “step B fails after the input is late.” That sentence does not identify the job stream, the condition that makes a restart safe, whether earlier work committed, or who must decide when a control total differs. A generic runbook produced from that sentence would look complete while being operationally dangerous.
The useful role for AI is narrower: organize evidence that approved humans have already collected, point out gaps, and create a consistent draft. It should not infer the missing facts or replace the operator, application owner, scheduler team, database team, or interface owner.
A good input package is small and structured. It contains the recovery question, an approved redacted JCL fragment, selected messages, known dependencies, and explicit unknowns. It excludes spool dumps, credentials, customer records, production connection details, confidential dataset names, and full source code unless site policy explicitly permits their use in the chosen tool.
A controlled input packet
Suppose a fictional job stream creates a daily partner extract. The concern is that the consumer might be started after the producer failed before its output became available. A reviewer can prepare this sanitized packet:
Purpose: Draft a human-reviewed runbook for a missing daily extract.
Known flow:
STEP10 validates the input control record.
STEP20 creates a new GDG output.
STEP30 sends the output only after count validation.
Consumer is released after STEP30 completes.
Observed condition:
STEP20 ended non-zero. STEP30 did not run.
No conclusion yet on whether STEP20 allocated or cataloged output.
Allowed evidence:
- job ID and timestamps, masked where required
- step return codes and relevant allocation messages
- current GDG base listing supplied by catalog support
- scheduler predecessor/successor status
- record-count and trailer-total results when available
Do not include or request:
credentials, customer rows, full spool, production endpoints,
private source, or instructions to alter catalog entries.
```
This packet makes uncertainty visible. “No conclusion yet” is more useful than asking the model to decide whether a dataset exists. The AI can then frame a question for catalog support rather than inventing a catalog result.
Ask for a runbook shape, not a recovery command
A safe prompt asks for a document with evidence gates and decision points. It does not ask, “How do I make tonight’s job green?” The latter invites an ungrounded shortcut.
Using only the supplied fictional, sanitized facts, draft a batch-support
runbook. Separate facts from assumptions. Include: trigger, preconditions,
evidence to capture, decision points, escalation roles, and before-rerun
checks. Mark any missing information as VERIFY WITH OWNER. Do not recommend
rerun, restart, catalog repair, data correction, or transmission. Do not
invent commands, dataset names, return codes, or completed checks.
The wording constrains both the output and the review. A model may still make errors, so constraints are not a substitute for review. They do make unsupported statements easier to spot because each conclusion should trace back to an item in the packet.
Worked example: turn a vague handover into decisions
An AI draft might transform the fictional evidence into this flow:
Trigger: Consumer is waiting; producer STEP20 ended non-zero.
1. Confirm the exact producer job instance and the scheduler cycle.
2. Capture STEP20 messages and determine whether output allocation started.
3. Obtain the approved GDG base listing; identify absolute generations,
not only a relative reference such as (-1).
4. Check whether any output candidate has a complete count/trailer control.
5. Confirm STEP30 did not send an interface.
6. If output state is uncertain, hold the consumer and escalate to the
application and operations owners.
7. If an approved recovery plan exists, have its restart boundary reviewed
against commit, output, and transmission evidence.
```
The flow is valuable because it preserves the distinction between *producer failed* and *no output exists*. A job can fail after allocating a dataset, after a partial write, or after an application checkpoint. Those states lead to different recovery paths.
The runbook should also name decision ownership. For example:
| Decision | Evidence needed | Reviewer or owner |
| --- | --- | --- |
| Is a candidate extract complete? | Count, trailer total, application completion evidence | Application/interface owner |
| Can the consumer be released? | Producer state and interface control status | Operations and application owner |
| Is a restart boundary safe? | Checkpoint, commits, prior outputs, scheduler state | Application owner with operations |
| Is catalog/storage action needed? | Catalog listing and allocation evidence | Storage/catalog support |
AI can format this table, but it cannot grant the authorization shown in the final column.
Human verification gates
Review the output line by line against the evidence packet before storing it as an operational runbook. In particular, remove any statement that claims a job “did not create output” unless the job log and catalog inquiry establish that fact. Check that terms such as restart, rerun, recovery, and resubmit are not used as if they mean the same thing.
A reviewer should also test the runbook against at least two paths: a clean failure before work begins and a failure after partial work or handoff. If the instructions are identical for both cases, the guide is probably too generic. Add the missing decision point rather than relying on an operator to guess.
When a recurring procedure is approved, retain the evidence sources and version date alongside the final runbook. That makes a later reviewer able to see whether a scheduler migration, JCL change, GDG retention change, or interface redesign has invalidated the document.
Change-control checklist
Before using an AI-assisted runbook in support, verify:
- The prompt and source packet contain only information approved for that AI tool and audience.
- Every job, step, file, table, and return-code statement is supported by a reviewed source; unknowns remain labeled as unknowns.
- The guide distinguishes read-only investigation from actions that can update data, create generations, or transmit files.
- Named escalation roles match current local ownership and on-call procedures.
- Restart advice references an approved application recovery design rather than a guessed scheduler option.
- The draft has been exercised in a safe test or tabletop review using fictional or masked evidence.
- A document owner and review date are recorded, with a trigger for re-review after material job-stream changes.
Do not paste raw production spool or sensitive records into a public AI service to make the document more detailed. Better evidence selection produces a safer runbook than more data does.
Practical takeaway
Use AI to expose missing evidence and assemble a reviewable support guide, not to decide a production recovery. Start with a sanitized, bounded packet; require explicit unknowns and owner gates; then validate the final runbook against actual restart, interface, and control-total rules before anyone acts.