English | 日本語
This program is a Java application that analyzes fixed-length COBOL data and converts it based on a calculation mask. It parses text data, generates formulas from numeric and symbolic combinations, and converts them into output formats such as CSV.
- Java 11 or later
- Windows / Linux / MacOS
-
Navigate to the directory
cd /path/to/src/app
※ Move to the directory where the program is located.
-
Compile Java files
javac Main.java CPMData.java CPMEntry.java
-
Move to the execution directory
cd ..
※ Move to the directory containing the input data (
input.txt
). -
Run the program
java csvoutput.Main
- Change input file
try (BufferedReader br = new BufferedReader(new FileReader("input.txt")))
- Change output file
try (BufferedWriter writer = new BufferedWriter(new FileWriter("output.csv")))
- Modify output items
- You can customize the data written to
output.csv
inMain.java
(lines 134-144).
- You can customize the data written to
- The input data (
input.txt
) must follow a fixed-length format. - You may need to modify the paths depending on the execution environment.
- Since the output depends on the input data, please perform error checks and validate the data format in advance.
- Last Updated: 2024/06/25