Package: ebcdic-parser
Mainframe EBCDIC Data Converter to ASCIIDescriptionA Python application is aimed to convert mainframe EBCDIC data into Unicode ASCII delimited text files.FeaturesSupported layoutsSingle schemaOriginalCOBOL layoutand correspondingconversion rulesfileMulti-schema fixed record lengthOriginalCOBOL layoutand correspondingconversion rulesfileMulti-schema variable record lengthSingle schema variable record lengthOriginalCOBOL layoutand correspondingconversion rulesfileFixing anomalies in EBCDIC filesSkip headerSkip footerRemove invalid charactersAdding relationship keysparent-childparent-child-grandchildApplicable encodingsPythonJavaDebug mode to troubleshoot layoutsRun the toolPip packageCommand promptpython -m ebcdic_parserPip UsageInstallationpipinstallebcdic_parserSamplefromebcdic_parser.convertimportrunreturnCode=run(r"D:\Projects\ebcdic-parser\tests\test_data\311_calls_for_service_requests_all_strings\311_calls_for_service_requests_sample.dat",r"D:\Projects\test_project",r"D:\Projects\ebcdic-parser\tests\layout_repository\311_calls_for_service_requests_all_strings.json",outputDelimiter=',',logfolder=r'D:\Projects\test_project\log')print(returnCode)Run FunctionreturnCode=run(inputFile, 
               outputFolder,
               layoutFile,
               logfolder='',
               pythonEncoding=True,
               encodingName='cp037',
               outputDelimiter=`\t`,
               outputFileExtension=`.txt`,
               ignoreConversionErrors=False,
               groupRecords=False,
               groupRecordsLevel2=False,
               verbose=True,
               debug=False,
               cliMode=False)inputfile- input EBCDIC file path. Mandatory parameter. Absolute and relative paths are acceptable.outputfolder- output folder to store delimited files. Mandatory parameter. Absolute and relative paths are acceptable.layoutfile- layout file path. Mandatory parameter. Absolute and relative paths are acceptable.outputdelimiter- output text file delimiter. Optional parameter. Default value is\t.outputfileextension- output text file extension. Optional parameter. Default value is.txt.ignoreconversionerrors- ignore any conversion error. Optional parameter. Default value isFalse.logfolder- output folder to store log file. Optional parameter. Default value is the current folder. Absolute and relative paths are acceptable.pythonencoding- use Python encoding rather than Java. Optional parameter. Default value isTrue.encodingname- code page name to encode characters (Python or Java). Optional parameter. Default value iscp037.grouprecords- create relationships between records. Optional parameter. Default value isFalse.grouprecordslevel2- create relationships between records for level 2. Optional parameter. Default value isFalse.verbose- show extended information on screen. Optional parameter. Default value isTrue.debug- show debug information. Optional parameter. Default value isFalse.cliMode- a flag how it run in command prompt or Pip installation.returnCode- exit codes: 0 - successful completion, 1 - completion with any errorpython -m ebcdic_parser Usagepython-mebcdic_parser--inputfile"D:\Projects\ebcdic-parser\tests\test_data\311_calls_for_service_requests_all_strings\311_calls_for_service_requests_sample.dat"--outputfolder"D:\Projects\test_project"--layoutfile"D:\Projects\ebcdic-parser\tests\layout_repository\311_calls_for_service_requests_all_strings.json"--outputdelimiter","--logfolder"D:\Projects\test_project\log"echo%ERRORLEVEL%Arguments[-h] 
--inputfile "input file path" 
--outputfolder "output folder" 
--layoutfile "layout file"
[--outputdelimiter [delimiter]]
[--outputfileextension [extension]]
[--ignoreconversionerrors [yes/no]]
[--logfolder [log folder]] [--pythonencoding [yes/no]]
[--encodingname [encoding name]]
[--grouprecords [yes/no]]
[--grouprecordslevel2 [yes/no]] [--verbose [yes/no]]
[--debug [yes/no]]

Arguments:
  -h, --help            show this help message and exit
  --inputfile "input file path"
                        Input EBCDIC file path
  --outputfolder "output folder"
                        Output folder to store delimited files
  --layoutfile "layout file"
                        Layout file path
  --outputdelimiter [delimiter]
                        output text file delimiter
  --outputfileextension [extension]
                        output text file extension
  --ignoreconversionerrors [yes/no]
                        ignore any conversion error
  --logfolder [log folder]
                        Output folder to store log file
  --pythonencoding [yes/no]
                        use Python encoding rather than Java
  --encodingname [encoding name]
                        Code page name to encode characters (Python or Java)
  --grouprecords [yes/no]
                        create relationships between records
  --grouprecordslevel2 [yes/no]
                        create relationships between records for level 2
  --verbose [yes/no]    show information on screen
  --debug [yes/no]      show debug information

Exit codes: 0 - successful completion, 1 - completion with any errorJava EncodingsIt doesn't request any special installation if you are planning to use only Python encodings.In case of using Java encodings, it has to be installedjavabridgePython library. There is a constant in the code for including the javabridge library.Release NotesRelease 3.3.0Return output to default device after completion.Modified run() to pass returnCode to main() and as the final exit code.Release 3.2.2Automate version management.Add CHANGES.md documentation.Release 3.2.1Added dedicated PyPI README file.Refined documentation.Release 3.2.0Provide a command-line interface for ebcdic_parser package running via python -m ebcdic_parser.Release 3.1.0Fixed relative path parameters in command prompt mode.Refined documentation.Release 3.0.0Added to PyPI.Release 2.4.1Fixed issue with "Multi-schema fixed record length" layout type.Release 2.4.0Added "Single schema variable record length" layout type.Release 2.3.0Implemented debug mode.Release 2.1.1Improved sign parsing in packedDecimal data type.Added sign parsing to decimal data type.Developed functional tests.Release 2.1.0The first public available release.