Page 1 of 1

Evaluation Copy - Need to convert zoned decimal ASCII

Posted: Wed Jan 18, 2006 3:54 am
by huntersglencurlz
I am trying to see if textpipe pro will be a valuable solution for our company. We process a lot of diverse file formats that need to be loaded into datawarehouse tables. This tool looks like it should do exactly what I want, but I'm having trouble testing with one of the files so that I can see if it will work for us.

I have a file that has zoned decimal ascii amount fields. I need to unpack the last byte into a number and the sign, and make the output either tab delimited or csv.

I created a copybook for the file layout and loaded it into the copybook wizard. For each of the unsigned fields, it added a restrict by bytes sub filter, and an add footer sub filter (on the restrict filter).

I removed the add footer [k], since it didn't make any sense to me.
I added expand zoned decimal to each of the amount fields. Do I need to physically change the length of the output fields myself to account for the unpacking? Or is that done for me? There are a couple hundred bytes of filler at the end, the total record length is 900 bytes.

When I try to run, I get an error saying restricts filters require a sub filter.

Thanks in advance.

Posted: Fri Jan 20, 2006 9:55 am
by DataMystic Support
Hi Glen,

Don't delete the Add Footer [k] filter because this adds an EBCDIC comma to each field, which then gets converted to an ASCII comma.

You can certainly replace the Expand Packed Decimal filters with Expand Zoned Decimal filters, but the copybook wizard normally does this correctly. Feel free to send us a file sample and copybook so we can check it out.

The copybook filter calculates the record length from the copybook information, and processes fields from right to left to avoid problems. Please see the mainframe documents at
http://www.datamystic.com/docs
if you'd like to understand exactly what the wizard is doing.

Please also do the 5 minute tutorial - this will explain why the restrict filters require subfilters.