special processing of groups of lines with group header

Get help with installation and running here.

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

Post Reply
godfinger

special processing of groups of lines with group header

Post by godfinger »

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

Post by DataMystic Support »

#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.
Post Reply