Skip to content

feat(cobol-to-java): CICS TS / TD queues and IBM MQ -> messaging ports and adapters (#3620) - #3705

Merged
squid-protocol merged 1 commit into
mainfrom
feat/messaging-3620
Sep 26, 2026
Merged

squid-protocol merged 1 commit into
mainfrom
feat/messaging-3620

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Closes #3620. Part of #3625.

What each queue becomes, and why

The six reference estates showed that "queue" means three different things, so the verified facts decide the mapping:

COBOL the facts say becomes
TS queue (GENAPP GENACNTL, shared by 4 programs) scratchpad state: numbered items, re-read, rewritten, deleted whole TempStorage port, in-memory, one store per application (as one region shares its TS)
TD CSSL, CSMT, … a CICS-supplied log destination the SLF4J logger cics.td.<queue>
TD JOBS (CardDemo) extrapartition, CSD DDNAME(INREADER): the internal reader a file sink, flagged: the records are JCL, a job submission (#3622)
TD @tdq@ (zECS) an installation symbol, not a name a TODO to set it
other TD intrapartition the message port
MQ (CardDemo COACCT01, CODATE01, COPAUA0C) triggered request/reply services the MessageQueue port and handleMqMessage(request, replyTo)

New config key integration.messaging (in-memory | jms | kafka, default in-memory) picks the MessageQueue adapter and its dependency:

  • in-memory: no new dependency;
  • jms: Spring's Artemis starter, JmsTemplate, and an @JmsListener per triggered program;
  • kafka: spring-kafka, KafkaTemplate, and an @KafkaListener per triggered program.

For a triggered program the listener hands the body and reply-to to the service. JMS takes JMSReplyTo; Kafka uses <request topic>.reply, since Kafka has no reply-to queue. The request queue comes from the trigger message, so it's a property (gitgalaxy.mq.<program>.request-queue), documented as such.

Per site: every EXEC CICS WRITEQ / READQ / DELETEQ and MQ PUT / PUT1 / GET gets a service helper citing:

  • its line and record;
  • its TD route;
  • its producer / consumer peers, from queue_flows / mq_flows (e.g. "Shared through TS GENACNTL: written by lgsetup.cbl, lgtestc1.cbl").

A literal ITEM(1) is baked in, and ITEM(WS-N) becomes a parameter. A data-driven queue name becomes a parameter with a TODO. COACCT01 replies to its MOVEd CARD.DEMO.REPLY.ACCT; COPAUA0C's MQPUT1 goes to the request's replyTo. Payloads are the COBOL record as text.

Evidence

corpus TS / TD / MQ sites TD routes MQ-triggered
CardDemo 0 / 2 / 8 1 log, 1 internal reader 3
GENAPP 30 / 1 / 0 1 log 0
zECS 0 / 5 / 0 1 installation symbol 0
  • Compiles: 51/51 (CardDemo, GENAPP and zECS × 17 configs, including the new messaging-jms and messaging-kafka-plain). Preflight now also compiles CardDemo messaging-jms.
  • Runtime. I ran throwaway tests, not committed, in generated projects:
    • JMS: embedded Artemis, with the whole generated CardDemo app booted on H2. A request sent with a reply-to reaches Coacct01Service.handleMqMessage("…", "CARD.DEMO.REPLY.ACCT"), the port sends and receives, CSSL goes to the log, and JOBS's JCL lands in the file sink.
    • Kafka: an embedded broker in the booted app. A message on the request topic reaches the handler with <topic>.reply, and the port round-trips.
    • TS semantics (GENAPP): items numbered from 1, read-next, read by number, rewrite, ITEMERR, delete.
  • Default config: only a new messaging package plus the services of queue-using programs change (CardDemo 4, GENAPP 6, zECS 3). CBSA, zopeneditor and DSF are unchanged.
  • Tests: full suite 11,796 passed. test_messaging.py runs a real scan covering TS write, rewrite, read-item and delete, a producer/consumer pair, a data-driven name, CSSL, the internal reader (CardDemo's own CSD definition), @tdq@, and a triggered MQ service with MQPUT and MQPUT1-to-reply-to, across all three adapters, plus the config check, manifest and worklist.

Paper trail

🤖 Generated with Claude Code

https://claude.ai/code/session_017ZsVaAkb86P5r5JXDC2Y9g

…s and adapters (#3620)

What the verified skeleton says each queue IS decides what it becomes:
- TS queues (scratchpad state: numbered items, re-read, rewritten, deleted whole) -> a
  TempStorage port, in-memory like one region's TS;
- TD queues, routed by destination: a CICS-supplied log (CSSL, CSMT, ...) -> SLF4J; an
  extrapartition destination the CSD binds to a DD / dataset -> a file sink, flagged when it
  is the internal reader (JCL: a job submission, #3622); an installation symbol (`@tdq@`) ->
  a TODO; else intrapartition -> the message port;
- MQ -> the MessageQueue port: MQPUT / MQPUT1 send, MQGET receives. A program whose MQGET
  reads its trigger message's queue gets handleMqMessage(request, replyTo), and with jms /
  kafka a generated listener; MQPUT1 to MQMD ReplyToQ goes to `replyTo`.

New config integration.messaging (in-memory | jms | kafka; default in-memory) picks the
adapter (JmsTemplate + @JmsListener via the Artemis starter; KafkaTemplate + @KafkaListener
via spring-kafka) and its dependency.

Each EXEC CICS / MQ site gets a service helper citing its line, record, route and
producer / consumer peers (queue_flows / mq_flows). A literal ITEM(n) is fixed; a data-driven
queue name becomes a parameter with a TODO. Everything is in the traceability manifest; a new
worklist category, "Data-driven queue names".

Compiles: 51/51 (CardDemo, GENAPP, zECS x 17 configs incl. messaging-jms /
messaging-kafka-plain). Runtime-tested in generated projects: JMS (embedded Artemis, the full
app booted on H2: triggered request -> handleMqMessage with its reply-to, port round trip,
TD routing to log and file); Kafka (embedded broker: request topic -> handler, port round
trip); TS semantics (GENAPP).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017ZsVaAkb86P5r5JXDC2Y9g
@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-protocol
squid-protocol merged commit 8ea0a77 into main Sep 26, 2026
36 checks passed
@squid-protocol
squid-protocol deleted the feat/messaging-3620 branch September 26, 2026 03:13
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.

Java conversion: TS / TD queues, containers and MQ -> messaging adapters

1 participant