I'll give you an idea of how you can do it using Access. The concept should be similar for Foxpro or another DB.
I'm going to assume that you want to take each record's information in the text file and place it into a record in a table in your database.
I'm also going to assume that the text file will look something like this:
1 2 3
nm Max Joe Sally
ad Here There Everythere
One important point is that (I'm assuming) the start of every different name, address, company, city, etc. starts at the same character position in each line.
First, import the text file into a table (I'll call it TextTable) that has only one (text) field, long enough to hold each line of the text file.
Next you have to write some code (VBA with Access or something similar with FoxPro) that will go though all of the records in TextTable one at a time (in the order they were imported).
Set up some variables (or a recordset) to hold the name, address,company, etc., data for each record. You must have enough variables to hold the number of records that one line of the text file holds. So if you use a separate variable for each item and the text file was for 3 across mailing labels, so might have name1, name2, and name3 (and so on).
You look for the following:
1. What code are the first two letters that indicate whether it's names, city, company, etc.
2. Extract (mid$(textstring,startloc,length)) the text for each of the label positions, making the appropriate variable (or field in the recordset) equal to the text extracted. For example: name1 = mid$(textstring,4,10), name2 = mid$(textstring,18,10) and so on.
Once you complete one full set across of mailing labels, append them values to the appropriate number of records (3 if the mailing labels are 3 across) to your destination table.