Packed Decimal fields - No conversion wanted

Get help with installation and running here.

Moderators: DataMystic Support, Moderators, DataMystic Support, Moderators, DataMystic Support, Moderators

Post Reply
James Schneider
Posts: 2
Joined: Fri Apr 14, 2006 8:31 am

Packed Decimal fields - No conversion wanted

Post by James Schneider »

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?
User avatar
DataMystic Support
Site Admin
Posts: 2227
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Post by DataMystic Support »

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.
James Schneider
Posts: 2
Joined: Fri Apr 14, 2006 8:31 am

Post by James Schneider »

Hello Simon,

I made the changes you suggested, but I'm getting the same results. The presence of x'09' in the EBCDIC input file causes extra spaces (x'20') in the output ASCII file.

Any other suggestions?

I will try to send my filter and my EDCDIC file.

Thank you.
User avatar
DataMystic Support
Site Admin
Posts: 2227
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Post by DataMystic Support »

Yes, you have an EBCDIC \x05 in your alpha fields. Just add a perl pattern search/replace filter at the end of the filter list, search for

\t

and replace with

<a space>
Post Reply