Skipping filters based on field value

Get help with installation and running here.

Moderators: DataMystic Support, Moderators

revilord
Posts: 1
Joined: Fri Mar 18, 2005 4:33 pm

Skipping filters based on field value

Postby revilord » Fri Mar 18, 2005 4:46 pm

I am converting an EBCDIC file complete with packed decimal. Someone thought of the bright idea of putting 2 record types in the outpt file sent to me. The file is fixed with and in field position 54 is equal to 1 its one record type and its not equal to 1 then its the other record type. I have filters set up like so.

restrict to block length 100
....restrict bytes 76-79
.......expand packed decimal
Convert to EBCDIC
...


All I need to do is skip the expand packed decimal if position 54 equals 1 and I am set to go. Any suggections how I might do this.

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

Postby DataMystic Support » Wed Apr 06, 2005 11:20 am

Inside your restrict to block lenght 100, use two pattern matches as a restriction.

The first matches '1' records:
.{53}1.{46}
Inside this put your expand packed decimal expansion.

The other matches not '1' records
.{53}[^1].{46}
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 1 guest