ebcdic

Dynamically Reading COBOL Redefines with C#

醉酒当歌 提交于 2019-11-27 09:30:47
I'm making a C# program that will be able to dynamically read an IBM HOST Copybook written in COBOL and generate an SQL table off of it. Once the table is generated I can upload a file into my program and it will read, convert from IMB-37 and insert the file into that sql table. So far I can handle almost anything, although I'm running into some issues with REDEFINES. For example: 10 SOME-FIELD PIC 9(3) COMP-3. SCRRB205 4117 10 SOME-OTHER-FIELD REDEFINES 3041-17 4117 SOME-FIELD PIC X(2). 3041-17 I understand that the redefine takes the place of the field above it in this case, although what i

Convert String from ASCII to EBCDIC in Java?

爱⌒轻易说出口 提交于 2019-11-27 01:36:27
I need to write a 'simple' util to convert from ASCII to EBCDIC? The Ascii is coming from Java, Web and going to an AS400. I've had a google around, can't seem to find a easy solution (maybe coz there isn't one :( ). I was hoping for an opensource util or paid for util that has already been written. Like this maybe? Converter.convertToAscii(String textFromAS400) Converter.convertToEBCDIC(String textFromJava) Thanks, Scott JTOpen , IBM's open source version of their Java toolbox has a collection of classes to access AS/400 objects, including a FileReader and FileWriter to access native AS400

How to unpack COMP-3 digits using Java?

左心房为你撑大大i 提交于 2019-11-26 18:25:41
问题 I have huge mainframe file and there are some packed digits in that file. I would like to know how to unpack following digit using java? packed digit : ? I read tutorials for unpacking digits and found the following rule to count the number of bytes required to unpack digits : total_number_of_bytes = (no. of digits + 1) / 2 I wrote the following code to unpack digits : public String unpackData(String packedData, int decimalPointLocation) { String unpackedData = ""; char[] characters =

Dynamically Reading COBOL Redefines with C#

社会主义新天地 提交于 2019-11-26 14:43:33
问题 I'm making a C# program that will be able to dynamically read an IBM HOST Copybook written in COBOL and generate an SQL table off of it. Once the table is generated I can upload a file into my program and it will read, convert from IMB-37 and insert the file into that sql table. So far I can handle almost anything, although I'm running into some issues with REDEFINES. For example: 10 SOME-FIELD PIC 9(3) COMP-3. SCRRB205 4117 10 SOME-OTHER-FIELD REDEFINES 3041-17 4117 SOME-FIELD PIC X(2). 3041

Convert String from ASCII to EBCDIC in Java?

自作多情 提交于 2019-11-26 09:39:52
问题 I need to write a \'simple\' util to convert from ASCII to EBCDIC? The Ascii is coming from Java, Web and going to an AS400. I\'ve had a google around, can\'t seem to find a easy solution (maybe coz there isn\'t one :( ). I was hoping for an opensource util or paid for util that has already been written. Like this maybe? Converter.convertToAscii(String textFromAS400) Converter.convertToEBCDIC(String textFromJava) Thanks, Scott 回答1: JTOpen, IBM's open source version of their Java toolbox has a