Using coding standards
Learn about the coding standards used in IBM® Bob Premium Package for Z.
Coding standards define how code is written, structured, and formatted across a project. They are critical for ensuring:
- Consistency across large code bases
- Long-term maintainability
- High code quality
- Reliable modernization outcomes
In the Z Code mode, coding standards are optional, but recommended. They are a core part of how Bob works with your code. Every piece of code IBM Bob produces is standards-compliant by design, not by chance. This approach reduces rework, accelerates reviews, and builds confidence that generated code is production-ready for enterprise Z environments.
Let us now understand how the Z Code mode handles coding standards in IBM Bob Premium Package for Z.
Mandatory enforcement
It is important to know that every code-related task automatically enforces coding standards.
While performing code generation, code updates or modifications and refactoring, Bob executes these steps:
- Identifies the target language or languages. This includes both source and target languages for transformation scenarios.
- Updates the internal TODO list, Coding standards execution is explicitly added as a required step.
- Runs the Coding Standards skill before code generation, Ensures Bob fully understands the project rules upfront.
- Validates the generated code after completion. Confirms that the output complies with all enforced standards.
These steps ensure that no code is produced without first aligning to your organization’s conventions.
Coding standards skill
The Z Code mode includes access to a specialized coding standards skill, designed specifically for enterprise Z projects.
What does the coding standard skill provide?
- Guided creation of custom coding standards
- Support for multiple Z-related technologies:
- COBOL
- PL/I
- Assembler
- JCL
- REXX
- Java™
- Creation of reusable, documented standards
- Enforcement of project- and repository-specific conventions
This allows customers to standardize code behavior across teams, applications, and modernization efforts.
Repository-specific rules using AGENTS.md
Before writing or modifying any code, Bob automatically checks the AGENTS.md file for repository-specific rules.
Examples of enforced standards
- COBOL
- Standardized
ERROR-MSGstructure - Mandatory
PROCESS SQLdirective usage PROGRAM-IDnaming consistency
- Standardized
- PL/I
WS_EYECATCHERalignment rules- Sequence number conventions
- Proper definition of
UNIONstructures
- Java
- Use of
JCICSAPIs only - Semantic alignment with the source program
- No custom CICS helper implementations
- Use of
These rules ensure that all generated code fits seamlessly into your existing environment.