A utility that converts IBM DB2 exported IXF to JSON format!
The package ixf2json
contains only one function named convert()
.
def convert(filein, fileout, encoding='utf-8') -> bool
It takes three parameters.
filein
: The relative or absolute path and FULL name of the IXF file as input.fileout
: The relative or absolute path and FULL file name of the JSON file as output.encoding
: A string which specifies the encoding of CHAR and VARCHAR type. It can be omitted and the function will takeutf-8
as the default value.
Warning: This utility will load all the data into memory firstly and then flush them to JSON file. The process may occupy huge memory depending on the size of IXF file. Use it carefully.
import ixf2json
ixf2json.convert('test.ixf', 'test.json', encoding='gbk')
Packed-Decimal Format of IBM System/370
This project is inspir'd by sapenov's IXF converter. Although it's unfinish'd and not operational, I did get some inspiration from it.