Packed Decimal fields - No conversion wanted

Get help with installation and running here.

Moderators: DataMystic Support, Moderators

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

Packed Decimal fields - No conversion wanted

Postby James Schneider » Fri Apr 14, 2006 8:54 am

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: 2164
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Postby DataMystic Support » Wed Apr 19, 2006 8:37 am

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.
Regards,

Simon Carter, http://DataMystic.com/forums/index.php
http://PredictBGL.com - Insulin dose calculator for Type 1 diabetes
http://DownloadPipe.com - 250,000 free software downloads
http://DetachPipe.com - send huge email attachments

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

Postby James Schneider » Thu Apr 27, 2006 6:23 pm

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: 2164
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Postby DataMystic Support » Fri Apr 28, 2006 11:01 am

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>
Regards,

Simon Carter, http://DataMystic.com/forums/index.php
http://PredictBGL.com - Insulin dose calculator for Type 1 diabetes
http://DownloadPipe.com - 250,000 free software downloads
http://DetachPipe.com - send huge email attachments


Return to “TextPipe Tips and Tricks, Questions and Support”

Who is online

Users browsing this forum: No registered users and 7 guests