Skip to content
aztekmqPublic

About

Python tool to compare two MQSC files generated from dmpmqcfg.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

90 Commits

Folders and files

Repository files navigation

Error in user YAML: (<unknown>): did not find expected whitespace or line break while scanning a tag at line 3 column 2
---

# MQSC File Comparison Tool

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

## Overview

`mqDiff.py` is a Python script designed to compare two MQSC files generated from the `dmpmqcfg` command in one-liner format. The script analyzes the differences between two IBM MQ Queue Manager dumps and generates a professional HTML report that highlights unique objects, properties, and mismatches.

## Features

- **Compare MQSC Files**: Identifies objects and properties that are unique to either the left or right MQSC file.
- **Highlight Mismatches**: Displays differences between matching objects with distinct colors for easy identification.
- **Generate Professional HTML Report**: Outputs a clean, professional-looking HTML report with clear distinctions between unique and mismatched items.

## Installation

Ensure you have Python 3.6.8 installed on your system. Clone the repository and navigate to the directory:

```bash
git clone https://github.com/yourusername/mqsc-comparison-tool.git
cd mqsc-comparison-tool
```

## Usage

To compare two MQSC files, use the following command:

```bash
./mqDiff.py -l LEFT-MQSC-FILE -r RIGHT-MQSC-FILE
```

### Optional Output Filename

By default, the script generates an HTML report named `mqsc_comparison_report.html`. You can specify a custom output filename with the `-o` or `--out` option:

```bash
./mqDiff.py -l LEFT-MQSC-FILE -r RIGHT-MQSC-FILE -o custom_output.html
```

### Example Command

```bash
./mqDiff.py -l left_qmgr.mqsc -r right_qmgr.mqsc
```

## Output

The output is a neatly formatted HTML file that displays the differences between the two MQSC files in three columns:

- **Left Only**: Items unique to the left MQSC file.
- **Mismatched**: Items present in both files but with differing properties, highlighted with distinct background colors.
- **Right Only**: Items unique to the right MQSC file.

### Sample Output

![Sample Output](images/sample_output.png)

## Future Enhancements

- **Golang JSON Output**: Implement output conversion from Golang to JSON.
  - Reference: [json-to-go](https://mholt.github.io/json-to-go/)
- **YAML Support**: Explore writing output to YAML, which can be converted back to JSON.

## Change History

| Date       | Author               | Comment                          |
|------------|----------------------|----------------------------------|
| 2023-07-04 | rob@aztekmq.net       | Initial Release                  |

## License

This project is licensed under the MIT License. See the `LICENSE` file for more details.
---

About

Python tool to compare two MQSC files generated from dmpmqcfg.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages