Repository navigation
feat(cobol-to-java): JCL job flow -> Spring Batch jobs (#3622) - #3711
Merged
Merged
Conversation
Most JCL is not application work. Each job is classified from its steps (PROCs expanded): - application: runs an estate program -> a Spring Batch job; - runner (IKJEFT01 / DFSRRC00, program in SYSTSIN / PARM, #3710), utility (IDCAMS / IEBGENER / SORT / IEFBR14 only) and build (compilers, linkers, CSD, tooling): listed in resources/batch/jcl-jobs.json with the reason, not generated. An application job becomes <Job>JobConfig: one Job, steps in JCL order, a PROC's steps as STEP.PROCSTEP, each step's DDs as constants. Over a runtime in the batch package: - Dd / DatasetResolver: datasets as files, GDG generations as G####V00; - JclConditions: COND= (step and job) bypasses as JCL does; IF (RC, step.RC, AND/OR/NOT); - JclSteps: - a program step calls its service's runBatch(dds) and records RETURN-CODE; - IEFBR14 creates / deletes per DISP; - IEBGENER copies SYSUT1 -> SYSUT2; - other utilities fail the job unless gitgalaxy.batch.skip-unimplemented -- never a silent success; - JclJobLauncher + BatchJobController run a job by JCL name. A program that submits a JCL job through the internal reader (job_submissions) launches it. Engine: - GalaxyIR.job_dds: each step's DDs, by step order (DD rows carry no ordinal), PROC DDs expanded, GDG split; a new estate join; - job_flow records DISP's normal-end disposition (disp_normal: presence-keyed column, healed, rehydrated, old DBs load): IEFBR14's DISP=(MOD,DELETE) deletes, not creates. Compiles 85/85 (5 corpora x 17 configs). Runtime in the generated CardDemo app on H2: READACCT deletes its old output (IEFBR14) then runs CBACT01C's entry, RC=0; CREASTMT fails at its unported IDCAMS without running STEP040; REST runs POSTTRAN; COND / IF / GDG checks. 0/48 IR joins move; ledger clean. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ZsVaAkb86P5r5JXDC2Y9g
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #3622. Part of #3625.
The key finding: most JCL isn't application work
Across the reference estates, most jobs compile (
IGYCRCTL), link (HEWL/IEWL), assemble, translate, update the CSD or drive a workload simulator. Turning those into Spring Batch jobs would be wrong, so every job is classified from its steps (PROCs expanded):EXEC PGM=or through a PROC)JobIKJEFT01/DFSRRC00, whose program is in SYSTSIN / PARM (not resolved yet: #3710)The listing ships as
resources/batch/jcl-jobs.json.What an application job becomes
Each becomes
<Job>JobConfig: one@Bean Jobwith its steps in JCL order and a PROC's steps asSTEP.PROCSTEP. Repeated step names get#ordinal. Each step's DDs are constants from the verified facts. The job runs on a small runtime in thebatchpackage:Dd/DatasetResolver: datasets as files undergitgalaxy.datasets.directory. A GDG is a directory of generations (G0001V00…):(+1)is the next,(0)the current.JclConditions:COND=at step and job level bypasses the step exactly as JCL does. The step is skipped when any testcode op RCholds, e.g.(0,NE)or((4,LT),(8,GT,STEP1)).IF (…) THENevaluatesRC,STEP.RC, AND / OR / NOT and the relational operators.JclSteps:runBatch(dds)and records the RETURN-CODE (exit statusRC=norBYPASSED);gitgalaxy.batch.skip-unimplementedis set. It is never a silent success.JclJobLauncher+BatchJobController:GET /api/v1/batch/jobslists jobs andPOST /api/v1/batch/jobs/{name}runs one.Each program run by a job gets a documented
runBatch(List<Dd>)entry listing each DD's mode and dataset (dataset_lineage). A program that submits a job through the internal reader gets a submit helper that launches the generated job. When the submitted JCL runs a PROC with no generated job (CardDemo CORPT00C → PROC TRANREPT), it gets a precise TODO instead.Engine changes (both additive)
GalaxyIR.job_dds, a new estate join: each step's DDs. DD rows carry no step ordinal, so they're associated by step order; this matters because CardDemo's TRANREPT has two steps namedSTEP05R. PROC DDs are expanded and GDG generations split off.job_flowrecords DISP's normal-end disposition (disp_normal): a presence-keyed column, healed into old tables, restored by the rehydrator, with old databases still loading.DISP=(MOD,DELETE,DELETE)("delete if it exists") looked like "create".Evidence
runBatchruns:COMPLETED,RC=0;POST /api/v1/batch/jobs/POSTTRANreturnsCOMPLETED;ir_join_diff --rescan), and the ground-truth ledger is unchanged and clean.--javaall PASS.test_batch_jobs.py: a real scan covering IEFBR14 with the delete idiom, SORT with in-stream cards, a program step withCOND=(4,LT)reading a GDG(+1), a cataloged PROC with IEBGENER, and build / runner / utility jobs. It also coversjob_dds, the listing, the job config,runBatch, the manifest, the worklist and the audit.Also
IBM+ZPLI) is split in the forge, because the full name contains the DOS executable signature, which the inspector flags in a file's first 8 KB.runBatch's TODO counts as business logic.🤖 Generated with Claude Code
https://claude.ai/code/session_017ZsVaAkb86P5r5JXDC2Y9g