January 6th, , AM 6. January 6th, , AM 7. I will manage it now Thanks again DJ. January 6th, , AM 8. NET Framework. How hard would it really be to port to Windows 8? All times are GMT The time now is AM. Copyright TechnologyAdvice. CodeGuru Home. Visual Basic. VB Forums. It's possible that there are other situations besides this one where the conversion maps two bytes to the same character, but I haven't done that test.
I assume you're doing this EBCDIC-to-Unicode conversion because sending the result string to the database does a Unicode-to-EBCDIC conversion automatically for text data, and you're attempting to do the inverse so the end result is the original bytes you packed.
So it's a cheap hack which turns out not to work. I vaguely remember thinking this sort of thing was a good idea several years ago, but I quickly found it wasn't.
It was just a pain in the behind. I found that making the fields on the mainframe NOT be packed decimal but zoned decimal instead was much easier to deal with. Or using JDBC to access well-structured records, that worked well too. Benjamin White. Some of the code fragments look like older version of my code. Glad it is being used. Packed decimal is a way for IBM Z series computers and others to encode numbers, four bits per digit with the last four bits as a sign.
Use original binary files. Don't use converted text files. Make sure there are no special "markers" in the file e. Thank you for the project! I just wanted to say, this project helped me to form the basis of a solution to a big problem. Thank you very much! Purpose of this post is to parse any main frame ebcdic file, via parser engine which coded and described in Max Vagner's articel.
This is just a draft enhancment of Max Vagner's project. By the way thanks for Max Vagner. Enhancment has two main components: 1.
Load xmlTemplatePath ; if doc. FieldDataType, startIndex, tmp. FieldLength, tmp. TryParse tmpAttr. AddRange parentFieldTemplate. ParentHierarchy ; currentFieldTemplateProps. AddRange currentFieldTemplateProps. RepeatCount; if parentFieldTemplate! ParentHierarchy ; childNodeFieldTemplate. Name, node. ToString ; if x! Value; else if tmpAttr. ToString " 00" ; fields. Unpacking Packed field not working Member Nov Not sure what is going on here but I have a 1 byte packed field.
The packed value has , which is 0xC1. The Unpack code is looking at the first nibble for the sign, but it appears to be in the second left hand nibble. It tries to return the C 12 as the value for the byte. Any ideas what is wrong here? Here's my field template: lineTemplate.
Packed, , 1 ; And yes, all my other packed fields are showing the same issue. Thanks for any help here. I think you have a problem with the source packed bytes packed fields are not generated correctly. To confirm it, look at your parsed packed field in HEX Base Here's what you should see: for example, packed number in HEX is "C.
If you remove dashes, you can actually see "" number followed by "C". If you can't fix the source, you might have to write custom parser convert to hex, than do string manipulation. Re: Unpacking Packed field not working Member Nov Actually, it turns out that the fields I thought were packed were not, but just Numeric Strings. However, I did find what appears to be a problem with one byte numeric strings in the ConvertEbcdicNumericString method. In the signed integer section of the switch block, my one byte hex C1 converted to the temp string "A".
However, the Regex. IsMatch did not catch this: else if Regex. I was able to correct it using the following: else if Regex.
Oh, I see Saved me some work, boss. I'm sure if there's a better way, somebody will chime in. Worked for me, though. Thanks again! How do I use this API? How do I actually use this conversion tool, or call this API? I downloaded and unzipped the file, but I have no idea what to do with it at this point. Forgive me for being an idiot! I'm a mainframe dinosaur. To begin with, you need Visual Studio. It will allow you to open a project Ebcdic2Ascii. Inside that project you'll find Program. It's an entry point to your program.
Do you know how to code in C? What are you trying to achieve? Max, thanks for the reply. Yes, I've got a copy of Visual Studio, but I have not really used it before.
0コメント