Skip to content

Migrate COBOL AS400 holiday and logging apps to Java microservices#6

Draft
Copilot wants to merge 5 commits intomasterfrom
copilot/migrate-holiday-logging-apps
Draft

Migrate COBOL AS400 holiday and logging apps to Java microservices#6
Copilot wants to merge 5 commits intomasterfrom
copilot/migrate-holiday-logging-apps

Conversation

Copy link
Copy Markdown

Copilot AI commented Feb 18, 2026

Overview

Migrated two COBOL AS400 programs to Spring Boot 3.2.0 microservices with REST APIs, containerization, and JPA persistence.

Changes

Services Migrated

  • Holiday Calculator (CANDAY01.CBLLE → Java)

    • GET /api/v1/canada-day/{year} - Returns day of week for Canada Day
    • Preserves COBOL date arithmetic and year validation (1600-3000)
    • Port 8080
  • Application Logger (LOG0010CB.cblle → Java)

    • POST /api/v1/logs, GET /api/v1/logs/{filters} - CRUD with filtering
    • Migrates physical file (LOGP0.pf) to JPA entity with H2/PostgreSQL support
    • Preserves COBOL field constraints (message 40 chars, job/user 10 chars)
    • Port 8081

Infrastructure

  • Maven projects with Spring Boot starter parent
  • Dockerfiles with multi-stage builds, non-root users, health checks
  • docker-compose.yml for orchestration
  • Spring Boot Actuator endpoints (health, info only)

Technical Mappings

COBOL Java
FUNCTION INTEGER-OF-DATE LocalDate.of()
ACCEPT FROM DATE/TIME LocalDate.now(), LocalTime.now()
Physical file LOGP0 JPA @Entity + @Repository
Fixed-length fields Validated VARCHAR with length constraints

Documentation

  • java-services/README.md - API docs, quickstart, deployment
  • java-services/SECURITY.md - CodeQL results, production hardening checklist
  • java-services/MIGRATION-COMPLETE.md - Technical mapping, architecture comparison

Security

CodeQL scan completed:

  • No vulnerabilities in dependencies (Spring Boot 3.2.0, H2 2.2.224)
  • Actuator endpoints limited to health/info (acceptable for dev)
  • H2 console enabled (dev only - disable for prod)
  • Production hardening checklist provided in SECURITY.md

Production Readiness

Current: Dev/demo ready
Requires: Auth layer, production database, HTTPS, secrets management (see SECURITY.md checklist)

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • start.spring.io
    • Triggering command: /usr/bin/curl curl REDACTED -d type=maven-project -d language=java -d bootVersion=3.2.0 -d baseDir=holiday-service -d groupId=com.contoso.cobolmigration -d artifactId=canadaday-calculator -d name=CanadaDayCalculator -d description=Canada Day Calculator Service - Migrated from COBOL AS400 -d packageName=com.contoso.holiday (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>[Contoso Redesign] Migrate COBOL AS400 holiday and logging apps to a Java microservices architecture.</issue_title>
<issue_description>## Description
Complete gap - the requirement assumes existence of COBOL AS400 legacy systems (holiday management app, logging apps) that do not exist in this repository. This is a modern corporate website project, not a legacy mainframe migration project. To fulfill this requirement would require: (1) Access to the actual COBOL AS400 source code from an external legacy system, (2) Creating entirely new Java microservices from scratch, (3) Complete greenfield development rather than migration.

Current State

This repository (corporate-website) is a modern web application showcase with NO COBOL or AS400 code. The tech stack is: Frontend (Vanilla HTML/CSS/JavaScript with Vite), Backend (Python with FastAPI in server/contact_handler.py and backend/api/users.py), TypeScript API layer (src/api/contact.ts). No .cbl, .cobol, .java files exist. The 'logging' in this repo refers to modern audit logging for GDPR compliance (Python logging module, console.error in TypeScript) - NOT legacy AS400 logging apps. No 'holiday' application exists in any form.

Acceptance Criteria

  • The gap described above is fully addressed

Technical Details

This requirement cannot be implemented against this repository because: 1) No COBOL source files exist (.cbl, .cobol patterns return no matches), 2) No AS400-related code or configuration exists, 3) No 'holiday' application exists, 4) No Java infrastructure exists (no .java files, no pom.xml, no build.gradle), 5) The 'logging' in this repo is modern Python/TypeScript audit logging, not legacy AS400 logging apps. If the intent is to build Java microservices for holiday management and logging from scratch (not migration), that would require: Spring Boot/Quarkus setup, holiday service (CRUD, calendar integration), logging service (centralized logging, ELK stack), API gateway, service discovery, containerization (Docker/K8s), and complete departure from current tech stack.

Estimated Effort

6-12 months (if legacy code exists elsewhere); N/A if no legacy systems exist | Complexity: Critical

Part of #4</issue_description>

Comments on the Issue (you are @copilot in this section)


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Copilot AI and others added 4 commits February 18, 2026 19:06
Co-authored-by: raykao <860691+raykao@users.noreply.github.com>
Co-authored-by: raykao <860691+raykao@users.noreply.github.com>
Co-authored-by: raykao <860691+raykao@users.noreply.github.com>
Co-authored-by: raykao <860691+raykao@users.noreply.github.com>
Copilot AI changed the title [WIP] Add Java microservices for holiday and logging apps Migrate COBOL AS400 holiday and logging apps to Java microservices Feb 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Contoso Redesign] Migrate COBOL AS400 holiday and logging apps to a Java microservices architecture.

2 participants