special processing of groups of lines with group header

Get help with installation and running here.

Moderators: DataMystic Support, Moderators

godfinger

special processing of groups of lines with group header

Postby godfinger » Mon Jul 05, 2004 7:44 pm

I have this source:
==========================================
departmet: 1234
sub-department: abcd
name: john smith

date time dest length price
06/04 14:56 1234567 00:01:32 0.12
06/04 15:30 2345678 00:00:20 0.00
06/04 15:34 8745 00:05:02 0.00
06/04 16:00 1234567 00:01:50 0.00

departmet: 1234
sub-department: abcd
name: james brown

date time dest length price
06/04 14:56 1234567 00:01:32 0.12
06/04 15:30 2345678 00:00:20 0.00
06/04 15:34 8745 00:05:02 0.00
06/04 16:00 1234567 00:01:50 0.00
==========================================

I need to take the department and sub-dep identifires and name appearing in the group header and append it to every line (every line is a call originated by the user).

Is that possible with TextPipe pro?

2. I need to process a file in a way that puts some of the source lines in 1 destination file and other lines in a different destination.
Is that possible with textpipe pro using only one pass on the file?

TIA
goldfinger

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

Postby DataMystic Support » Thu Jul 08, 2004 4:55 am

#1 - use a vbscript subfilter to a pattern match to capture a matched pattern into a global variable.

#2 - see the white paper on sub filters and restrictions - it shows how to feed some text to one file, and other text to another. Using a subfilter you can control where some of the text goes.
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: Bing [Bot] and 9 guests