IBM Wazi Developer for Red Hat CodeReady Workspaces integration with COBOL Code Harmonizer.
- IBM Wazi Developer workspace
- COBOL Code Harmonizer installed
- Sample COBOL program
# In Wazi terminal
pip install --user cobol-harmonizer
# Verify installation
python -m cobol_harmonizer.cli.commands --version# Open a COBOL file in Wazi editor
# In terminal:
python -m cobol_harmonizer.cli.commands analyze \
${CHE_PROJECTS_ROOT}/your-cobol-project/MYPROG.cbl \
--verbose
# Output appears in Problems panel (via SARIF)- Problems Panel: See all disharmony issues
- Outline View: Color-coded procedures
- Quick Fixes: Accept suggested procedure names
Our VS Code extension works natively in Wazi:
# In Wazi workspace
cd vscode-extension
code --install-extension cobol-harmonizer-0.1.0.vsix
# Reload Wazi window
# Extension will activate for .cbl filesFeatures:
- ✅ Real-time analysis on save
- ✅ Inline diagnostics with severity colors
- ✅ Hover tooltips showing LJPW coordinates
- ✅ Quick fixes for procedure renaming
// In Wazi: .vscode/tasks.json
{
"version": "2.0.0",
"tasks": [
{
"label": "Analyze COBOL Harmony",
"type": "shell",
"command": "python",
"args": [
"-m",
"cobol_harmonizer.cli.commands",
"analyze",
"${file}",
"--verbose"
],
"presentation": {
"reveal": "always",
"panel": "new"
},
"problemMatcher": {
"owner": "cobol-harmonizer",
"fileLocation": ["relative", "${workspaceFolder}"],
"pattern": {
"regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$",
"file": 1,
"line": 2,
"column": 3,
"severity": 4,
"message": 5
}
}
}
]
}Usage: Press Ctrl+Shift+P → "Run Task" → "Analyze COBOL Harmony"
# Add to Wazi devfile.yaml
apiVersion: 1.0.0
metadata:
name: cobol-with-harmonizer
components:
- type: chePlugin
id: redhat/vscode-yaml/latest
- type: dockerimage
alias: cobol-tools
image: quay.io/eclipse/che-python-3.9:latest
memoryLimit: 512Mi
mountSources: true
endpoints:
- name: cobol-harmonizer
port: 8080
commands:
- name: Analyze COBOL
actions:
- type: exec
component: cobol-tools
command: python -m cobol_harmonizer.cli.commands analyze
workdir: ${CHE_PROJECTS_ROOT}Scenario 1: Find Hidden Bugs
* This looks like a calculation procedure, but it's actually I/O
CALCULATE-TOTAL.
OPEN INPUT CUSTOMER-FILE.
READ CUSTOMER-FILE.
* COBOL Harmonizer flags this as HIGH disharmony (0.85)
* Suggests: OPEN-CUSTOMER-FILE or READ-FIRST-CUSTOMERWazi Output:
MYPROG.cbl:42:7: error: Critical semantic disharmony (0.85)
Procedure CALCULATE-TOTAL performs I/O instead of calculation
Suggested names: OPEN-CUSTOMER-FILE, READ-FIRST-CUSTOMER
* Handles credit card data - must be PCI-DSS compliant
PROCESS-DATA.
MOVE CC-NUMBER TO DISPLAY-FIELD.
* COBOL Harmonizer flags PCI-DSS violationWazi Output:
MYPROG.cbl:67:7: warning: PCI-DSS compliance risk
Procedure handles cardholder data without encryption
Add encryption before display or storage
# Generate refactoring report in Wazi
python -m cobol_harmonizer.cli.commands report MYPROG.cbl \
--format json \
--output report.json
# View in Wazi JSON viewer
code report.jsonBeautiful terminal output works in Wazi:
python -m cobol_harmonizer.cli.commands analyze MYPROG.cbl --verboseOutput includes:
- 🎨 Rich color-coded severity levels
- 📊 LJPW coordinate charts
- 📈 Trajectory visualizations
- ✅ Harmony rate summary
# Generate SARIF for Wazi Problems panel
python -m cobol_harmonizer.cli.commands report MYPROG.cbl \
--format sarif \
--output ${CHE_PROJECTS_ROOT}/.harmonizer/results.sarif
# Wazi automatically imports SARIF files# Analyze entire COBOL project
find ${CHE_PROJECTS_ROOT}/cobol -name "*.cbl" -exec \
python -m cobol_harmonizer.cli.commands analyze {} \; \
> analysis.log
# View consolidated results
cat analysis.log | grep -E "CRITICAL|SIGNIFICANT"Use this script to demo COBOL Code Harmonizer in Wazi to IBM prospects:
# 1. Create Wazi workspace
# 2. Clone sample COBOL project
git clone https://github.com/BruinGrowly/COBOL-Code-Harmonizer
cd COBOL-Code-Harmonizer
# 3. Install harmonizer
pip install --user -e .
# 4. Open examples/disharmonious_example.cbl in editorMinute 1: Show the problem
# Open disharmonious_example.cbl
# Point out: "This procedure is called CALCULATE-INTEREST
# but look what it actually does - it opens files!"Minute 2: Run the analyzer
python -m cobol_harmonizer.cli.commands analyze \
examples/disharmonious_example.cbl --verbose
# Watch as it highlights contradictions in real-timeMinute 3: Show the severity levels
🔴 CRITICAL: Procedure name completely contradicts implementation
🟠 SIGNIFICANT: Major semantic shift detected
🟡 CONCERNING: Notable contradiction found
🟢 MINOR: Slight naming drift
Minute 4: Demonstrate quick fixes
# Show suggested procedure names
# Explain LJPW framework (Love, Justice, Power, Wisdom)
# Show trajectory from Intent → ExecutionMinute 5: Integration with IBM tools
# Generate SARIF for ADDI
python -m cobol_harmonizer.cli.commands report MYPROG.cbl \
--format sarif --output analysis.sarif
# Show how it imports into ADDI, SonarQube, Debug for z/OS| Project Size | Analysis Time | Memory Usage |
|---|---|---|
| 10 programs | < 5 seconds | 50 MB |
| 100 programs | < 30 seconds | 200 MB |
| 1,000 programs | < 5 minutes | 500 MB |
Optimization Tips:
- Enable copybook caching (95% faster on subsequent runs)
- Use parallel analysis for large projects
- Configure
.harmonizer-cache/in.gitignore
# Check Wazi logs
cat ${CHE_WORKSPACE_LOGS_ROOT}/cobol-harmonizer.log
# Verify Python path
which python3
python3 -m cobol_harmonizer.cli.commands --version# Validate SARIF
python -m sarif validate analysis.sarif
# Check Wazi settings
code ${CHE_PROJECTS_ROOT}/.vscode/settings.json# Enable caching
mkdir -p .harmonizer-cache
export HARMONIZER_CACHE_DIR=.harmonizer-cache
# Use parallel analysis
python -m cobol_harmonizer.cli.commands analyze \
--parallel --workers 4 MYPROG.cbl- 📦 Install in your Wazi workspace (instructions above)
- 🎯 Try the 5-minute demo
- 📊 Analyze your COBOL codebase
- 🔧 Integrate with IBM ADDI (see
ADDI_PLUGIN.md) - 📚 Read full docs:
../docs/IBM_MAINFRAME_INTEGRATION.md
- Wazi Documentation: https://ibm.com/wazi
- VS Code Extension:
../vscode-extension/ - Sample COBOL:
../examples/ - GitHub: https://github.com/BruinGrowly/COBOL-Code-Harmonizer