Page 1 of 1

special processing of groups of lines with group header

Posted: Mon Jul 05, 2004 7:44 pm
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

Posted: Thu Jul 08, 2004 4:55 am
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.