Does anyone have an example of how I can read(LOOP) thru a text file and
write multiple text output files based upon input read out of the text file.

Input:

(1) (2) (3) (4)
Record1>>>>> ABCD,1234,7.00,8/31/03
Record2>>>>> ABCD,5555,9.00,8/3/03
Record3>>>>> TTTT,9999,5.55,7/20/03


I need to match field1(which will variable length up to 18 characters)
from all of my input records. Then write to different ouput file with the
records that match.


Output:

ABCD,1234,7.00,8/31/03
ABCD,5555,9.00,8/3/03

Since these records match write them to \\Server\Path\filename

TTTT,9999,5.55,7/20/03

Goes to a different folder \\Server\DiffPath\filename

Re: Parse Text File by Andy

Andy
Sun Aug 31 17:11:01 CDT 2003


I like the solutions....

I'm new to Vbscript .... What is the syntax to comapre the files and write
to output files....

Can you wildcard the Output files so you don't have to hardcode them.

Like if you read input file and get ABCD then write to its folder then the
next record is DDDD

can you create its output file on the fly ...


Thanks again.


"Andy" <Hoosbruin@Kconline.com> wrote in message
news:eCaQqJAcDHA.1488@TK2MSFTNGP12.phx.gbl...
>
> Does anyone have an example of how I can read(LOOP) thru a text file and
> write multiple text output files based upon input read out of the text
file.
>
> Input:
>
> (1) (2) (3) (4)
> Record1>>>>> ABCD,1234,7.00,8/31/03
> Record2>>>>> ABCD,5555,9.00,8/3/03
> Record3>>>>> TTTT,9999,5.55,7/20/03
>
>
> I need to match field1(which will variable length up to 18 characters)
> from all of my input records. Then write to different ouput file with the
> records that match.
>
>
> Output:
>
> ABCD,1234,7.00,8/31/03
> ABCD,5555,9.00,8/3/03
>
> Since these records match write them to \\Server\Path\filename
>
> TTTT,9999,5.55,7/20/03
>
> Goes to a different folder \\Server\DiffPath\filename
>
>
>
>
>
>
>
>
>
>