I am trying to convert a mainframe EBCDIC file to ASCII. I want to convert all of the the display fields, but I do not want the packed decimal fields in each record converted. How do I do this?
I used the Mainframe Copybook Wizzard to begin with. I have come closest to what I want by removing the Expand Packed Decimal filters and inserting Convert ASCII to EBCDIC filters under the Restriction filters for every packed field. I also added an ASCII to EBCDIC Map under every Restriction filter that maps every Hex code to the same ASCII code. This works for almost every field, but fields that contain x'09' in the EBCDIC file are causing some extra spaces (x'20') in my output file that I can't figure out how to remove.
Is there some easier way to say that I want certain bytes passed thru (unmodified) from the EBCDIC file to the ASCII file?
Packed Decimal fields - No conversion wanted
Moderators: DataMystic Support, Moderators, DataMystic Support, Moderators, DataMystic Support, Moderators
-
- Posts: 2
- Joined: Fri Apr 14, 2006 8:31 am
- DataMystic Support
- Site Admin
- Posts: 2227
- Joined: Mon Jun 30, 2003 12:32 pm
- Location: Melbourne, Australia
- Contact:
Hi James,
You;re almost there. Use this approach:
1. Remove all restrictions for packed decimal fields
2. Inside each restriction for Alpha fields, insert a Convert EBCDIC to ASCII filter as the last step.
3. Remove the final Convert EBCDIC to ASCII filter that is at the base of the filter list (the one not inside any restrictions).
If you have any trouble with this please send us your filter so far and a small sample file.
You;re almost there. Use this approach:
1. Remove all restrictions for packed decimal fields
2. Inside each restriction for Alpha fields, insert a Convert EBCDIC to ASCII filter as the last step.
3. Remove the final Convert EBCDIC to ASCII filter that is at the base of the filter list (the one not inside any restrictions).
If you have any trouble with this please send us your filter so far and a small sample file.
-
- Posts: 2
- Joined: Fri Apr 14, 2006 8:31 am
- DataMystic Support
- Site Admin
- Posts: 2227
- Joined: Mon Jun 30, 2003 12:32 pm
- Location: Melbourne, Australia
- Contact: