Modernization Hub

Compile Time

Enhanced Definition

Compile time refers to the phase in the software development lifecycle where a program's source code is translated by a compiler into an executable form, typically object code, on an IBM z/OS system. This process involves syntax checking, semantic analysis, and code generation, occurring before the program can be linked or executed. Compile time refers to the phase in the software development lifecycle on z/OS where source code, written in languages like COBOL, PL/I, Assembler, or C, is translated by a compiler into an object module. During this phase, the compiler checks for syntax errors, performs optimizations, and generates machine-readable instructions. It is distinct from link-edit time and run time, focusing solely on the translation of human-readable code.

Key Characteristics

    • Translation Process: Converts human-readable source code (e.g., COBOL, PL/I, Assembler) into machine-understandable object code, which is a collection of machine instructions and data.
    • Error Detection: Identifies and reports syntax errors, undeclared variables, and other programmatic issues that violate the language's rules, preventing the creation of a valid object module.
    • Compiler Options: Behavior can be controlled by various compiler options (e.g., LIST, MAP, XREF, OPTIMIZE) specified via JCL parameters or compiler directives, influencing output and performance.
    • Output Generation: Produces an object module (often stored in a PDS/PDSE member), a compiler listing (containing source code, diagnostics, and generated machine code), and sometimes cross-reference tables.
    • Preprocessing Integration: Can involve preprocessors (e.g., for CICS commands, DB2 SQL statements) that modify the source code before the main compilation phase, translating specialized statements into standard language constructs.

Use Cases

    • Application Development: The primary step for transforming newly written or modified COBOL, PL/I, or Assembler source code into an object module ready for linking into a load module.
    • Syntax Validation: Used to verify the correctness of program logic and syntax, catching errors early in the development cycle before testing or deployment.
    • CICS Command Translation: CICS programs undergo a pre-compilation step during compile time where EXEC CICS commands are translated into standard COBOL CALL statements for the CICS API.
    • DB2 SQL Preprocessing: Programs embedding SQL statements are first processed by a DB2 precompiler, which replaces SQL with host language calls and generates a Database Request Module (DBRM) for later binding.

Related Concepts

Compile time is a distinct phase from link-edit time and run time. During compile time, source code becomes object code; link-edit time then combines one or more object modules with necessary library routines (e.g., language runtime libraries, application subroutines) to create a load module (an executable program). Run time is when this load module is loaded into memory and executed. The JCL EXEC PGM= statement for a compiler (e.g., IGYCRCTL for COBOL) orchestrates the compile-time process, reading source from SYSIN or a DD statement and writing object code to SYSLIN.

Best Practices:
  • Review Compiler Listings: Always examine the compiler listing for warning messages, even if no errors are reported, as warnings can indicate potential issues, inefficiencies, or non-standard code.
  • Use Appropriate Compiler Options: Select compiler options that align with development goals (e.g., TEST for debugging, OPTIMIZE for production, XREF for cross-referencing variables) to control output and behavior.
  • Manage Copybooks/Includes: Ensure that all referenced copybooks or include files are correctly located, version-controlled, and consistently applied across compilation environments to prevent unexpected behavior.
  • Version Control Source Code: Maintain all source code under a robust Source Code Management (SCM) system (e.g., Endevor, CA-Librarian) to track changes, facilitate rollbacks, and ensure consistent builds.
  • Automate Builds: Integrate compile-time steps into automated build processes using JCL or specialized build tools to ensure consistency, repeatability, and efficiency in the development pipeline.

Related Vendors

ASE

3 products

IBM

646 products

Broadcom

235 products

Trax Softworks

3 products

Related Categories