Skip to content

Commit e5fa9a2

Browse files
authored
Merge pull request #5 from andrew890/omp-master
Version 5: Add support for binary variable length records
2 parents c4b93e4 + 5b0701f commit e5fa9a2

File tree

17 files changed

+1274
-1147
lines changed

17 files changed

+1274
-1147
lines changed

.gitignore

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,77 @@
1+
2+
# Created by https://www.gitignore.io/api/java,maven,eclipse
3+
# Edit at https://www.gitignore.io/?templates=java,maven,eclipse
4+
5+
### Eclipse ###
6+
.metadata
7+
bin/
8+
tmp/
9+
*.tmp
10+
*.bak
11+
*.swp
12+
*~.nib
13+
local.properties
14+
.settings/
15+
.loadpath
16+
.recommenders
17+
18+
# External tool builders
19+
.externalToolBuilders/
20+
21+
# Locally stored "Eclipse launch configurations"
22+
*.launch
23+
24+
# PyDev specific (Python IDE for Eclipse)
25+
*.pydevproject
26+
27+
# CDT-specific (C/C++ Development Tooling)
28+
.cproject
29+
30+
# CDT- autotools
31+
.autotools
32+
33+
# Java annotation processor (APT)
34+
.factorypath
35+
36+
# PDT-specific (PHP Development Tools)
37+
.buildpath
38+
39+
# sbteclipse plugin
40+
.target
41+
42+
# Tern plugin
43+
.tern-project
44+
45+
# TeXlipse plugin
46+
.texlipse
47+
48+
# STS (Spring Tool Suite)
49+
.springBeans
50+
51+
# Code Recommenders
52+
.recommenders/
53+
54+
# Annotation Processing
55+
.apt_generated/
56+
57+
# Scala IDE specific (Scala & Java development for Eclipse)
58+
.cache-main
59+
.scala_dependencies
60+
.worksheet
61+
62+
### Eclipse Patch ###
63+
# Eclipse Core
64+
.project
65+
66+
# JDT-specific (Eclipse Java Development Tools)
67+
.classpath
68+
69+
# Annotation Processing
70+
.apt_generated
71+
72+
.sts4-cache/
73+
74+
### Java ###
175
# Compiled class file
276
*.class
377

@@ -21,3 +95,18 @@
2195

2296
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
2397
hs_err_pid*
98+
99+
### Maven ###
100+
target/
101+
pom.xml.tag
102+
pom.xml.releaseBackup
103+
pom.xml.versionsBackup
104+
pom.xml.next
105+
release.properties
106+
dependency-reduced-pom.xml
107+
buildNumber.properties
108+
.mvn/timing.properties
109+
.mvn/wrapper/maven-wrapper.jar
110+
.flattened-pom.xml
111+
112+
# End of https://www.gitignore.io/api/java,maven,eclipse

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "test-data"]
2+
path = test-data
3+
url = [email protected]:openmainframeproject/tersedecompress-testdata.git

README.md

Lines changed: 38 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,69 @@
11
# tersedecompress
2-
TerseDecompress is a java program that can be used to decompress files which have been previously compressed on an IBM Mainframe using the TERSE / AMATERSE program (on IBM z/OS or IBM z/VM).
3-
4-
5-
6-
Description:
7-
8-
============
92

103
TerseDecompress is a java program that can be used to decompress files
11-
124
which have been previously compressed on an IBM Mainframe
13-
145
using the TERSE / AMATERSE program (on IBM z/OS or IBM z/VM).
156

16-
Purpose & benefit:
17-
18-
==================
7+
## Purpose & benefit ##
198

209
As java programs can virtually run on any platform / operating system
21-
2210
with a JVM, this java decompression program can be very useful if you
23-
2411
don't have access to an IBM mainframe but need to analyze or process a
25-
2612
file which had been compressed on a IBM mainframe using TERSE on IBM z/OS.
27-
2813
With this java version of TerseDecompress, you can decompress those tersed
29-
3014
IBM Mainframe files on any workstation or laptop etc. that supports Java.
3115

32-
How to run it:
16+
## Updates ##
3317

34-
==============
18+
**Version 5: March 2021**
3519

36-
TerseDecompress will uncompress a file that was compressed using the TERSE
20+
- Support for variable length binary records. Variable length records processed in binary mode will be prefixed with a 4 byte field in the same format as the IBM RDW i.e. 2 byte record length field (including RDW length, big-endian) followed by 2 bytes of zeros.
3721

38-
program on IBM z/OS.
22+
## How to run it ##
3923

40-
For execution, TerseDecompress needs a JVM runtime environment
24+
For execution, TerseDecompress needs a JVM runtime environment.
4125

42-
Usage: "TerseDecompress [-b]"
26+
Usage:
4327

44-
Default mode is text mode, which will attempt ebcdic -> ASCII conversion
28+
```java -jar tersedecompress-5.0.0.jar [-b] tersed-file output-file```
4529

46-
The -b flag turns on binary mode, no conversion will be attempted
30+
Default mode is text mode, which will attempt EBCDIC -> ASCII conversion.
4731

48-
How to build it:
32+
The **-b** flag turns on binary mode, no conversion will be attempted.
4933

50-
================
34+
**Recommendation:** Use binary mode if possible. EBCDIC->ASCII conversion is not a lossless process, unless the data strictly contains only characters that are common to both code pages used for the translation, **and** the original data does not contain line ending characters.
5135

52-
For compiling the java source code, a JDK is required
36+
## How to build it ##
5337

54-
Build command: "javac TerseDecompress.java"
38+
To build tersedecompress you need the Java JDK and Apache Maven.
5539

56-
How to report problems and get support/help:
40+
In the project directory (the directory containing **pom.xml**):
5741

58-
============================================
42+
```mvn clean package```
5943

60-
If you have a problem / need help with TerseDecompress.java, please create a GitHub issue.
44+
## Unit Tests ##
45+
46+
The project contains unit tests to verify that the decompression is correct.
47+
48+
Due to the size of the test data, it is stored in a separate git repository and referenced via a submodule. The test data is not required to build tersedecompress, unless you want to run the unit tests.
49+
50+
The test data can be found here:
51+
[https://github.com/openmainframeproject/tersedecompress-testdata](https://github.com/openmainframeproject/tersedecompress-testdata)
52+
53+
Descriptions of the data are here:
54+
[https://github.com/openmainframeproject/tersedecompress-testdata/tree/master/tests](https://github.com/openmainframeproject/tersedecompress-testdata/tree/master/tests)
6155

62-
You can also send an email to: [email protected] or contact us on Slack at https://slack.openmainframeproject.org channel #tersedecompress
6356

64-
Please do not send code changes, but explain in a mail
57+
### Building with Unit Tests ###
58+
59+
1. Initialize (download) the submodule containing the test data:
60+
```git submodule update --init```
61+
2. Build with unit tests:
62+
```mvn -DskipTests=false clean package```
63+
64+
## How to report problems and get support/help ##
65+
66+
If you have a problem / need help with TerseDecompress.java, please create a GitHub issue.
67+
68+
There is also a Slack channel: [https://slack.openmainframeproject.org](https://slack.openmainframeproject.org) channel #tersedecompress
6569

66-
what you want TerseDecompress to do.

0 commit comments

Comments
 (0)