WYSIWYG COBOL Screen Generator
For classic mainframe-style COBOL, the practical targets are generated map and source artifacts such as
CICS BMS maps, IMS MFS maps, and COBOL SCREEN SECTION definitions for workstation or runtime COBOL.
IBM tooling history shows this category is real and useful. A modern implementation can combine a visual
designer, metadata-driven model, multiple code generators, and round-trip import support into one native desktop application.
CICS BMS
IMS MFS
COBOL SCREEN SECTION
wxWidgets C++
Import / Export
Runtime Preview
For classic mainframe-style COBOL, the usual target is not raw screen code directly, but generated
map or source artifacts. The strongest practical targets are:
- CICS BMS maps
- IMS MFS maps
- COBOL SCREEN SECTION for workstation/runtime COBOL
A strong product direction is a COBOL Screen Painter / Map Generator that is copybook-aware,
CICS-aware, able to import and export BMS, and optionally includes a wxWidgets runtime preview.
Classic green-screen form factor that inspires a modern 3270-style visual designer.
Core Visual Design Features
- 24x80, 27x132, or resizable logical terminal grid
- Drag/drop labels, input fields, protected fields, and attributes
- Alignment guides, ruler, and row/column coordinates
- Preview modes for 3270 green-screen, color terminal, and browser emulation
The visual surface should behave like a terminal-aware layout engine rather than a generic form designer.
That makes it possible to build layouts that map cleanly into BMS, MFS, or SCREEN SECTION output.
A terminal-style grid canvas is the heart of the WYSIWYG editor.
Suggested Screen Metadata
- Screen name
- Field positions
- Length
- Datatype
- Protection
- Intensity and color
- Validation rules
- Tab order
- PF-key / AID-key actions
- Mapset / map / copybook linkage
With a strong metadata model, the designer can drive code generation, preview behavior, import/export,
and round-trip regeneration without losing structure.
A structured metadata model makes multi-target generation practical.
Generation Outputs
- CICS/BMS: DFHMSD / DFHMDI / DFHMDF macros
- IMS/MFS: MID/MOD source
- COBOL SCREEN SECTION: 01/03/05 entries with LINE/COLUMN/PIC/USING
- Optional WORKING-STORAGE, commarea layouts, and I/O copybooks
One visual definition should be able to emit several targets cleanly. This gives the user flexibility
across classic green-screen environments and workstation COBOL runtimes.
One AST-backed screen definition can emit BMS, MFS, copybooks, and COBOL stubs.
Round-Trip Workflow
- Import existing BMS, MFS, or SCREEN SECTION artifacts
- Render them visually in the designer
- Edit them visually
- Regenerate source without destroying hand-edited business logic
This is one of the most valuable features because it allows legacy assets to be modernized and maintained
instead of forcing greenfield-only adoption.
Round-trip import and regeneration preserves investment in existing source assets.
High-Value Enhancements
- Field templates for dates, packed-decimal display, and signed numeric input
- 88-level driven validation
- Generated ACCEPT/DISPLAY or SEND/RECEIVE stubs
- CICS cursor positioning support
- Help panels and error-message line reservation
- Export to JSON/XML project format
These extras make the tool more than a painter. They move it toward a real application-generation aid that
reduces repetitive coding around terminal input and output logic.
Frontend / Editor
- wxWidgets C++ for native desktop behavior and strong custom painting
- Grid canvas representing terminal cells
- Property inspector on the right
- Toolbox on the left
- Live preview pane
Backend / Generator
- Internal AST or screen model
- Emit .bms
- Emit .mfs
- Emit .cpy
- Emit .cbl
wxWidgets is a strong fit for a native C++ screen designer with custom drawing.
Suggested Class Structure
- ScreenProject
- ScreenDefinition
- FieldDefinition
- AttributeSet
- GeneratorBMS
- GeneratorMFS
- GeneratorScreenSection
- ImporterBMS
- LayoutEngine
- TerminalPreviewCanvas
If the goal is classic green-screen development, generate BMS and MFS. If the goal is portable COBOL on PC,
generate SCREEN SECTION. If the goal is both, keep one visual model and emit multiple targets.