Exporting and combining two ASCII files

K

Ken Ivins

I have a database with a table for Groups and one for Subscribers in those
groups (one to many). I need to create 2 ASCII files the merge them to email
to another location.

The first table is fixed width with my sender ID in it followed by a
continuous string of up to 30 GroupIDs (9 character ID numbers). Then
multiple lines of GroupIDs (34/line) until all the GroupIds are listed. The
table is has a total of 5 basic fields and one long GroupID field for a
total of 351 characters.

The second fixed width table has subscriber information in it. It has about
50 fields of various lengths for a total of 351 characters.

My final export must combine these two tables. The first table at the top
then the information of the second table.

I am comfortable in sending this by email through code. I am also fine in
creating the second table.

I am not sure how to create the second table that automatically wraps the
Group IDs. I assume I start with a pivot table to get all the GroupIDs but
where to go from there is my problem.

Lastly how to combine these two into one ASCII file really is beyond my
knowledge.

This set of newsgroups have been very helpful in the past and I really
appreciate your time and effort. I hope some day to learn enough to repay
my dept by helping others as well.

Thanks,
Ken
 
N

Nikos Yannacopoulos

Ken,

I'm not sure what you mean or how it can be done as far as
your first question goes, but I can offer some help on the
second... oldtimers like myself can still think of a thing
or two we did with DOS, that's not quite as easy with
Windows! What you have to do is to copy the two files to
one - this will put one at the end of the other in the
same file. How to do this:
1. name your original files something like source1.txt and
source2.txt, so they can be referred to as a group with
wildcards
2. open a command prompt window (Start > Run > cmd), type
command CD C:\PathToMyFolder to get to the right folder
(you'll know this worked if you see the folder path at the
prompt), and finally the colpo grosso:
copy source*.txt target.txt
File target.txt will contain files source1.txt and
source2.txt collated (in that order).

Good luck,

Nikos
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top