ebcdic-to-ascii-converter | program allows to convert some source files | File Utils library
kandi X-RAY | ebcdic-to-ascii-converter Summary
kandi X-RAY | ebcdic-to-ascii-converter Summary
This program allows to convert some source files from an EBCDIC format to an ASCII one. The input of this program is a directory containing the source files to be converted and the output is another directory containing all the converted source files. The input directory can contain a tree of sub-directory and this tree is kept in the output directory.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Main entry point
- Parse the command line options
- Prints usage information
- Convert the source files into an ASCII file
- Converts the given ebic input file into the output file
- Loads the character content from the specified reader
- Resize an array to a new size
- Recursively lists all files in a directory and its subdirectories
- Get charset by name
- List files in a directory
- Print an error message
- Close a Closeable
- Replace non printable characters by whitespace character
- Logs a message and stack trace
- Set the fixed length
- Check option definition
ebcdic-to-ascii-converter Key Features
ebcdic-to-ascii-converter Examples and Code Snippets
Community Discussions
Trending Discussions on ebcdic-to-ascii-converter
QUESTION
I am trying to import a Mainframe EDI File back to SQL Server using .NET and I am having problems unpacking some comp-3 fields.
This file was from one of our clients and I have the Copy Book layout for the following fields:
...ANSWER
Answered 2021-Jan-04 at 16:26First, PIC X
is not Unicode in COBOL.
Quoting myself from here...
It is common for mainframe data to include both text and binary data in a single record, for example a name, a currency amount, and a quantity:
Hopper Grace ar% .
...which would be...
x'C8969797859940404040C799818385404040404081996C004B'
...in hex. This is code page 37, commonly referred to as EBCDIC.
[...]Converting to code page 1250, commonly in use on Microsoft Windows, you would end up with...
x'486F707065722020202047726163652020202020617225002E'
...where the text data is translated but the packed data is destroyed. The packed data no longer has a valid sign in the last nibble (the lower half of the last byte), the currency amount itself has been changed as has the quantity (from decimal 75 to decimal 11,776 due to both code page conversion and mangling of a big endian number as a little endian number).
Likely your data was code page converted on transfer from the mainframe. If you know the original code page and the code page it was converted to, then you might be able to unscramble the packed data.
I say might because, if you're lucky, the hex values you have will have been mapped one-to-one with hex values in the original code page. Note that it is common for both EBCDIC x'15' and x'0D' to be mapped to ASCII x'0D'.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install ebcdic-to-ascii-converter
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page