# z390development/z390 architecture

> Architecture diagram of the GitHub repository z390development/z390, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-01-15). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/z390development/z390
- Repository: https://github.com/z390development/z390

## Overview

##### Main Components

a. Core Components:
- HLASM Compatible Assembler (mz390)
- Linkage Editor (lz390)
- Runtime Emulator (ez390)
- zCobol Compiler
- File System Components (QSAM, zVSAM)
- zCICS Interactive System
- Testing Framework

b. Supporting Components:
- Java Runtime Environment
- Configuration System
- Macro Libraries
- Test Suites

**Top Layer: User Interface Components**
- Command-line interfaces (bat/, bash/ directories)
- Development Tools
- Testing Framework (z390test/)

**Middle Layer: Processing Components**
- Assembler (mz390)
- Compiler (zcobol/)
- Linkage Editor
- CICS System (cics/)

**Bottom Layer: Runtime & Storage**
- Runtime Emulator
- File Systems (QSAM, VSAM)
- Memory Management

##### Key Relationships

- Source code → Assembler/Compiler → Object Code → Linkage Editor → Executable
- Runtime Emulator ↔ File Systems
- CICS ↔ Runtime Emulator
- Testing Framework → All Components

##### Component Details

For each major component, include:
- Input/Output formats
- Key configuration files
- Dependencies on other components
- File extensions handled (.MLC, .CBL, etc.)

##### Notes

- Version compatibility information
- Extension points for custom components
- Error handling paths

- Export to standard formats

Remember to maintain clarity while showing the complexity of the system, focusing on the interaction between components rather than internal implementation details.

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph "User Interface Layer"
        CLI["Command Line Interface"]
        DevTools["Development Tools"]
        TestFW["Testing Framework"]:::testing
    end

    subgraph "Processing Layer"
        HLASM["HLASM Assembler (mz390)"]:::core
        ZCOBOL["zCobol Compiler"]:::core
        LINKER["Linkage Editor (lz390)"]:::core
        CICS["zCICS System"]:::interactive
    end

    subgraph "Runtime Layer"
        RT["Runtime Emulator (ez390)"]:::core
        subgraph "File Systems"
            QSAM["QSAM"]:::filesystem
            VSAM["VSAM"]:::filesystem
        end
        MEM["Memory Management"]:::core
    end

    subgraph "Support Components"
        CONF["Configuration System"]:::support
        MACRO["Macro Libraries"]:::support
        TESTS["Test Suites"]:::testing
        DOC["Documentation"]:::support
        DEMO["Demo Programs"]:::support
    end

    %% Relationships
    CLI --> HLASM
    CLI --> ZCOBOL
    TestFW --> HLASM
    TestFW --> ZCOBOL
    TestFW --> RT
    
    HLASM --> LINKER
    ZCOBOL --> LINKER
    LINKER --> RT
    
    RT --> QSAM
    RT --> VSAM
    RT --> MEM
    
    CICS <--> RT
    
    CONF --> RT
    CONF --> HLASM
    MACRO --> HLASM
    
    %% Click Events
    click HLASM "https://github.com/z390development/z390/blob/main/src/mz390.java"
    click LINKER "https://github.com/z390development/z390/blob/main/src/lz390.java"
    click RT "https://github.com/z390development/z390/blob/main/src/ez390.java"
    click ZCOBOL "https://github.com/z390development/z390/tree/main/zcobol/"
    click QSAM "https://github.com/z390development/z390/tree/main/qsam/"
    click VSAM "https://github.com/z390development/z390/tree/main/vsam1/"
    click CICS "https://github.com/z390development/z390/tree/main/cics/"
    click TestFW "https://github.com/z390development/z390/tree/main/z390test/"
    click MACRO "https://github.com/z390development/z390/tree/main/mac/"
    click CLI "https://github.com/z390development/z390/tree/main/bat/"
    click CONF "https://github.com/z390development/z390/blob/main/src/z390.java"
    click DOC "https://github.com/z390development/z390/tree/main/doc/"
    click DEMO "https://github.com/z390development/z390/tree/main/demo/"
    click TESTS "https://github.com/z390development/z390/tree/main/rt/"

    %% Styling
    classDef core fill:#2374f7,stroke:#fff,stroke-width:2px,color:#fff
    classDef filesystem fill:#47d147,stroke:#fff,stroke-width:2px,color:#fff
    classDef interactive fill:#ff8533,stroke:#fff,stroke-width:2px,color:#fff
    classDef testing fill:#b366ff,stroke:#fff,stroke-width:2px,color:#fff
    classDef support fill:#808080,stroke:#fff,stroke-width:2px,color:#fff

    %% Legend
    subgraph Legend
        L1["Core Components"]:::core
        L2["File Systems"]:::filesystem
        L3["Interactive Systems"]:::interactive
        L4["Testing Components"]:::testing
        L5["Support Components"]:::support
    end
```
