Skip to content

A utility that converts IBM DB2 exported IXF to JSON format

License

Notifications You must be signed in to change notification settings

spadeq/ixf2json

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IXF to JSON converter

A utility that converts IBM DB2 exported IXF to JSON format!

Usage

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 take utf-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.

Example

import ixf2json

ixf2json.convert('test.ixf', 'test.json', encoding='gbk')

References

PC/IXF record types

PC/IXF data types

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.

About

A utility that converts IBM DB2 exported IXF to JSON format

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages