Complete installation instructions for the COBOL Code Harmonizer VS Code extension.
Linux/z/OS USS:
python3 --version # Should show 3.9 or higherWindows:
python --version # Should show 3.9 or higherSee ../docs/IBM_QUICK_START.md for CLI installation.
Quick verification:
python3 /path/to/cobol_harmonizer.py --versioncd vscode-extension
# Install packaging tool (one-time)
npm install -g vsce
# Install dependencies
npm install
# Create VSIX package
vsce packageThis creates cobol-harmonizer-0.1.0.vsix
GUI Method:
- Open VS Code
- Click Extensions (Ctrl+Shift+X)
- Click "..." menu → "Install from VSIX..."
- Select
cobol-harmonizer-0.1.0.vsix
Command Line:
code --install-extension cobol-harmonizer-0.1.0.vsixFor testing and development:
cd vscode-extension
npm install
# Open VS Code
code .
# Press F5 to launch Extension Development Host- File → Preferences → Settings (Ctrl+,)
- Search for "COBOL Harmonizer"
Option A: Automatic (if installed in standard location)
{
"cobolHarmonizer.pythonPath": "python3"
// harmonizerPath auto-detects
}Option B: Manual Configuration
{
"cobolHarmonizer.pythonPath": "/usr/bin/python3",
"cobolHarmonizer.harmonizerPath": "/u/cobol-harmonizer/cobol_harmonizer.py"
}Option C: IBM z/OS USS
{
"cobolHarmonizer.pythonPath": "/usr/lpp/IBM/cyp/v3r9/pyz/bin/python3",
"cobolHarmonizer.harmonizerPath": "/u/cobol-harmonizer/cobol_harmonizer.py",
"cobolHarmonizer.copybookPaths": [
"/u/prod/cobol/copybook",
"/SYS1.COPYLIB"
]
}- Open a COBOL file (.cbl, .cob, .cobol)
- Right-click → "COBOL Harmonizer: Analyze Current File"
- Should see "Analyzing COBOL file..." notification
- Results appear as inline diagnostics
Create a test file test-disharmony.cbl:
IDENTIFICATION DIVISION.
PROGRAM-ID. TEST-DISHARMONY.
PROCEDURE DIVISION.
VALIDATE-CUSTOMER.
EXEC SQL
UPDATE CUSTOMERS
SET STATUS = 'APPROVED'
WHERE CUST-ID = :WS-CUST-ID
END-EXEC.
STOP RUN.Save the file - should see a warning on VALIDATE-CUSTOMER (name suggests validation, code does update).
Symptom: No "COBOL Harmonizer" commands in Command Palette
Solution:
- Check VS Code version: Help → About (requires 1.60.0+)
- Reload VS Code: Ctrl+Shift+P → "Reload Window"
- Check extension installed: Extensions → Search "COBOL"
Symptom: Error when running analysis
Solution: Set explicit path in settings:
{
"cobolHarmonizer.harmonizerPath": "/full/path/to/cobol_harmonizer.py"
}Verify path:
ls -l /full/path/to/cobol_harmonizer.pySymptom: Error about Python executable
Solution: Find Python path and configure:
Linux/macOS:
which python3
# Use output in settingsWindows:
where python
# Use output in settingsPossible causes:
- Threshold too high - Lower it:
{
"cobolHarmonizer.disharmonyThreshold": 0.3
}- Analyze on save disabled - Enable it:
{
"cobolHarmonizer.analyzeOnSave": true
}-
File not recognized as COBOL - Check extension (.cbl, .cob, .cobol)
-
Code is actually harmonious! - No problems found ✓
Symptom: Warnings about missing copybooks
Solution: Add copybook paths:
{
"cobolHarmonizer.copybookPaths": [
"/u/prod/cobol/copybook",
"./local/copybooks",
"../shared/copybooks"
]
}Symptom: Analysis takes too long
Solutions:
- Increase threshold (analyze fewer procedures):
{
"cobolHarmonizer.disharmonyThreshold": 0.8
}- Disable auto-analyze (manual only):
{
"cobolHarmonizer.analyzeOnSave": false
}- Check cache - First run is slow, subsequent runs are 95% faster
- Extensions → Search "COBOL Harmonizer"
- Click gear icon → Uninstall
code --uninstall-extension cobol-harmonizer.cobol-harmonizerTo update to a new version:
- Uninstall current version
- Install new VSIX file
- Reload VS Code
- Documentation: README.md
- CLI Guide: ../docs/IBM_QUICK_START.md
- Issues: GitHub Issues
Next Steps:
- Read README.md for feature overview
- Try analyzing your COBOL codebase
- Configure copybook paths
- Adjust threshold to your needs