# Review a COBOL Pull Request with Atlas in 2026

> Atlas reviews COBOL pull requests by analyzing `PIC` clauses, running `COBOL Check` tests, and verifying fixed-format column rules before approval.

Atlas helps COBOL developers in 2026 review pull requests by fetching diffs, reading full files, checking `COPY` members, and running `COBOL Check` tests, ensuring changes integrate correctly with existing `IDENTIFICATION`, `DATA`, and `PROCEDURE` divisions. It provides the surrounding context needed to catch bugs a line-by-line read would miss, specifically for COBOL's unique structure and fixed-format rules.

## Key takeaways

- Atlas understands COBOL `IDENTIFICATION`, `DATA`, and `PROCEDURE` divisions, plus `COPY` members.
- Verify Atlas's understanding of `PIC` clauses before it modifies COBOL code.
- Atlas runs `GnuCOBOL cobc` and `COBOL Check` behind permission prompts.
- Review COBOL fixed-format column rules with Atlas's unified diff.
- `lsp findReferences` catches COBOL signature breakages outside the diff.
- Atlas uses `grep` to find missed COBOL patterns like old `PIC` clause names.

## How Atlas Reviews COBOL Pull Requests for Context

Atlas reviews COBOL pull requests by first fetching the branch and producing the diff, then immediately leaving the diff to read full files, ensuring comprehensive context. This approach, vital for COBOL's interconnected `PROCEDURE DIVISION` paragraphs and `COPY` members, helps catch issues that a line-by-line review of just 10 changed lines might miss.

When you initiate a pull request review, Atlas's VCS layer fetches the specific branch and generates the raw patch, just as a human developer would. Crucially, Atlas then uses its `read` tool to pull the complete COBOL files, not merely the hunks presented in the diff. This full-file context is indispensable for COBOL, where a small change in a `DATA DIVISION` `PIC` clause or a `PROCEDURE DIVISION` paragraph can have far-reaching implications across the codebase, including within `COPY` members. By providing the entire file, Atlas ensures you can see how a proposed change interacts with surrounding logic and data definitions, preventing subtle bugs that might otherwise go unnoticed.

## Understanding COBOL Code with Atlas's AI

Atlas understands COBOL code by indexing it with AST declarations using tree-sitter, allowing it to parse `IDENTIFICATION`, `DATA`, and `PROCEDURE` divisions, plus `COPY` members. Before any modification, Atlas can explain a COBOL paragraph in plain English, letting you verify its interpretation of complex `PIC` clauses and 40 years of batch logic.

Atlas's core strength in COBOL review lies in its deep understanding of the language's structure. Unlike tools that rely on blind line windows, Atlas builds its code index using AST declarations via tree-sitter. This enables it to accurately parse and comprehend the distinct `IDENTIFICATION`, `DATA`, and `PROCEDURE` divisions, as well as every `COPY` member pulled into your `.cbl` programs. Before Atlas proposes any changes, you can ask it to explain a specific COBOL paragraph. This crucial step allows you to verify Atlas's reading of `PIC` clauses, data structures, and intricate batch logic, ensuring its understanding aligns with your existing mainframe codebase and preventing misinterpretations that could lead to errors.

## Checking COBOL Signature Changes and Missed Patterns

For every changed COBOL function signature, such as a `PERFORM` paragraph name or `CALL` interface, Atlas runs the `lsp` tool's `findReferences` operation. This critical step identifies callers that the diff never touched, preventing silent breakages across your COBOL programs and `COPY` members, a common issue in large, interconnected systems with 100s of modules.

COBOL applications often feature tightly coupled components, where a change to a `PERFORM` paragraph name or a `CALL` interface can break numerous other programs or `COPY` members not visible in the immediate diff. Atlas addresses this by automatically running the `lsp` tool's `findReferences` operation for every detected signature change. This proactively identifies all affected callers, allowing you to see the full impact of a modification. Furthermore, Atlas uses `grep` to search for patterns that should have been updated but were missed, such as old constant names, stale copies of `PIC` clause definitions, or feature flags that were not consistently applied across the codebase. This dual approach ensures comprehensive verification beyond the visible changes.

## Compiling and Testing COBOL with `GnuCOBOL cobc` and `COBOL Check`

Atlas can compile your COBOL programs using `cobc` under `GnuCOBOL` and run `COBOL Check` test cases, providing immediate feedback on proposed changes. These operations are permission-gated, ensuring you maintain full control over execution, with findings reported as a `todowrite` list ordered by severity, helping you prioritize fixes within 2 minutes.

A robust review process for COBOL demands compilation and testing. Atlas integrates directly with your COBOL toolchain, allowing it to execute `cobc` under `GnuCOBOL` for compilation and `COBOL Check` for running tests. These powerful operations are always permission-gated, meaning Atlas will ask for your explicit approval before running any `bash` commands that compile or test your code. Once executed, Atlas reports all findings as a `todowrite` list, ordered by severity. This clear, prioritized list helps you quickly identify and address any compilation errors or test failures introduced by the pull request, ensuring the integrity of your COBOL application before it's merged.

## Ensuring COBOL Fixed-Format Compliance and Approval

Before you approve any COBOL pull request, Atlas reviews the diff against the strict fixed-format column rules, a critical aspect of COBOL development for over 40 years. Atlas computes a unified diff for every file edit and surfaces it for your approval, ensuring that proposed changes adhere to these precise formatting requirements.

COBOL's fixed-format column rules are a fundamental part of its syntax and structure, dictating where sequence numbers, indicators, and statements must reside. Atlas understands the importance of these rules and incorporates them into its review process. Before you finalize your approval of a pull request, Atlas presents a unified diff for every file edit. This diff is not just about content changes but also implicitly helps you verify adherence to fixed-format column rules. Atlas's ability to snapshot file changes as git patches means edits can be precisely diffed and rolled back, giving you confidence that the approved changes maintain the necessary COBOL formatting standards and overall code quality.

## Steps

1. Fetch the COBOL branch and generate the diff: Use Atlas's VCS layer to fetch the pull request branch and produce the raw patch for your `.cbl` programs and `COPY` members.
2. Read full COBOL files for context: Atlas uses the `read` tool to pull the complete `.cbl` files, not just diff hunks, ensuring you see surrounding `DATA DIVISION` and `PROCEDURE DIVISION` context.
3. Check COBOL signature references: For any changed `PERFORM` paragraph or `CALL` interface, Atlas runs `lsp findReferences` to identify all affected COBOL callers, even those outside the diff.
4. Grep for missed COBOL patterns: Atlas uses `grep` to search for old `PIC` clause names, stale `COPY` members, or feature flags that should have been updated but were not.
5. Compile COBOL with `cobc` and run `COBOL Check` tests: Behind a permission prompt, Atlas executes `bash -c "cobc -x program.cbl"` and `bash -c "COBOL Check program_test.cbl"`, reporting findings as a `todowrite` list.
6. Review COBOL fixed-format compliance: Atlas presents a unified diff, allowing you to verify that all proposed changes adhere to COBOL's strict fixed-format column rules before approval.

## FAQ

### How does Atlas understand COBOL `PIC` clauses?

Atlas indexes COBOL code using tree-sitter, allowing it to parse and understand `IDENTIFICATION`, `DATA`, and `PROCEDURE` divisions, including the specific `PIC` clauses within your `DATA DIVISION`. You can ask Atlas to explain a paragraph to verify its interpretation of these crucial data definitions.

### Can Atlas run `COBOL Check` tests for my pull request?

Yes, Atlas can execute `COBOL Check` test cases using the `bash` tool, behind a permission prompt. It reports the findings as a `todowrite` list, ordered by severity, to help you address issues quickly and ensure the quality of your COBOL changes.

### Does Atlas enforce COBOL fixed-format rules?

Atlas reviews the diff against fixed-format column rules before you approve it. It computes a unified diff for every file edit and surfaces it for your approval, ensuring compliance with COBOL's strict formatting requirements, which are vital for compilation and readability.

### How does Atlas find COBOL breaking changes outside the diff?

For every changed COBOL function signature (e.g., a `PERFORM` paragraph or `CALL` interface), Atlas uses the `lsp` tool's `findReferences` operation to check all callers. This identifies affected COBOL programs or `COPY` members even if they are not directly included in the pull request diff, preventing silent breakages.

### Can Atlas compile my COBOL code with `GnuCOBOL cobc`?

Yes, Atlas can compile your COBOL programs using `cobc` under `GnuCOBOL` via the `bash` tool. This operation is permission-gated, requiring your explicit approval before execution, giving you full control over the build process during a review.

### How does Atlas handle COBOL `COPY` members during a review?

Atlas reads your `.cbl` programs and every `COPY` member they pull in. Its indexing by AST declarations ensures it understands the full context, including how changes in a `COPY` member might affect multiple programs, providing a comprehensive view for your review.

### What if Atlas misinterprets a COBOL `PROCEDURE DIVISION` paragraph?

Atlas allows you to ask it to explain a `PROCEDURE DIVISION` paragraph in plain English before it touches it. This step is designed for you to verify its understanding of the COBOL logic, ensuring that its interpretation aligns with your intent and the existing codebase.

---

Canonical HTML: https://runatlas.sh/resources/stacks/review-a-pull-request-in-cobol
Source of truth: aeo_pages row `/resources/stacks/review-a-pull-request-in-cobol` (segment: Stacks) (this file is generated from it, never hand-edited).
Licence: Atlas is proprietary with a free core. It is not open source and there is no public source repository.
