Modernization Hub

Generator

Enhanced Definition

A Generator, in the mainframe context, refers to a specialized software tool or utility designed to automatically create source code (e.g., COBOL, PL/I, Assembler), JCL, data definitions, screen maps, or other system resources based on predefined specifications, templates, or metadata. Its primary purpose is to automate repetitive coding tasks, improve consistency, and accelerate development cycles within the z/OS environment.

Key Characteristics

    • Specification-Driven: Relies on high-level specifications, parameters, or metadata (e.g., screen layouts, database schemas, report formats) as input, rather than requiring manual, line-by-line coding.
    • Code Automation: Produces ready-to-compile source code (e.g., COBOL, PL/I, Assembler) or executable scripts (e.g., JCL, REXX) directly from these specifications.
    • Template-Based: Often utilizes predefined templates, skeletons, or boilerplate structures that are populated with specific details provided by the user or system definitions.
    • Consistency and Standardization: Enforces coding standards, naming conventions, and architectural patterns, leading to more consistent, standardized, and maintainable applications.
    • Reduced Error Rate: Minimizes human error associated with the manual coding of repetitive or complex structures, improving overall code quality.
    • Integration with Development Tools: Many generators are integrated into larger application development frameworks, IDEs (e.g., ISPF-based tools), or build processes.

Use Cases

    • CICS BMS Mapset Generation: Creating CICS Basic Mapping Support (BMS) mapsets (macros and DSECTs) from screen layout definitions, automating the creation of user interface components for CICS transactions.
    • DB2 DCLGEN (Declarations Generator): Automatically generating COBOL or PL/I host variable structures (DCLGENs) and SQL DECLARE TABLE statements directly from DB2 table definitions, ensuring data structure consistency between application programs and the database.
    • Report Program Generation: Creating COBOL or other language programs for standard batch reports based on input file layouts, output report formats, and selection/sorting criteria.
    • JCL Generation: Producing complex JCL streams for batch jobs, utility executions, or system processes based on configuration parameters, often used in automated job scheduling systems or build pipelines.
    • Application Generators: Comprehensive tools (e.g., Telon, Pacbase, ADW/IEF) that generate entire application components (screens, reports, transactions, database access logic) from high-level functional specifications.

Related Concepts

Generators are fundamental to Application Development Life Cycle (ADLC) tools, aiming to enhance developer productivity and code quality. They work in conjunction with Compilers (e.g., COBOL, PL/I, Assembler) by producing the source code that these compilers then translate into executable load modules. They often leverage Metadata stored in system catalogs (e.g., DB2 Catalog, CICS CSD) or specialized repositories to drive their output and ensure consistency with system definitions. Their use contributes significantly to System Automation by reducing manual effort in creating and maintaining system artifacts.

Best Practices:
  • Maintain Clear Specifications: Ensure that the input specifications, parameters, or metadata used by the generator are accurate, complete, and well-documented to produce correct and expected output.
  • Version Control Generated Code: Treat generated code like any other source code; store it in a Source Code Management (SCM) system (e.g., CA Endevor, IBM z/OS SCM) to track changes, enable rollback, and manage configurations.
  • Understand Generated Output: Developers should possess a basic understanding of the code or resources produced by the generator to effectively debug, troubleshoot, or customize when necessary, especially for complex scenarios.
  • Standardize Generator Usage: Establish clear guidelines, naming conventions, and standards for using generators across development teams to ensure consistency and maintainability of generated artifacts.
  • Parameterize and Externalize Configuration: Where possible, externalize configuration parameters for generators (e.g., via PARMLIB members, control cards, or configuration files) to facilitate changes and promote reusability without modifying the generator itself.

Related Vendors

ASE

3 products

Broadcom

235 products

Platinum Technology

4 products

Flynet

2 products

IBM

646 products

Related Categories

CASE/Code Generation

19 products

Tools and Utilities

519 products

Db2

243 products