OK, off to a good start but I really didn't explain myself too well before. I have used COPY STRUCTURE EXTENDED already within an application and based some pretty reports off of the data that is generated. Using AFIELDS works, kind of. It will recreate the table but I have to have a way to recreate the table using user input. Example: the original table has the following columns: fullname C (25) company C (50) addr1 C (33) addr2 C (33) state C (2) city C (30) zip5 C (5) zip4 C (4) Our software will take the above format but convert it to it's own format which doesn't always handle some types of data well and has space limitations on other fields. It will try to parse fullname into first name, middle initial, last name, suffix, prefix and truncate company to 36 characters. Because of that, we have to include these fields again at the end of the data to insure that the data will be as the client specified. Our default format remains a constant with the exception of the extra data that the user defines to be placed again at the end of the file. In this example, lets say that we had to include both the fullname and the company at the end of the file. The format will look something like this: (The rest of the format defined in 21 different columns) junk1 C (2) -- the first 'junk' column will always be [,"] include1 C (25) -- fullname column is the first included extra column. junk2 C (3) -- this will always be [","] when it isn't the first or last column include2 C (50) -- company column is the second included extra column. junk3 C (1) -- the last 'junk' column will always be ["] In general, all fields are fixed length format except for the extra included data which would come from the user selections.
In the past, I have done all of the table manipulation by hand, changing table structure and modifying my code to fit the new table structure but now we need to have it be more 'user friendly' so that I can let my co-workers share in the fun and have more of a consistent way of working with the data. Using AFIELDS and COPY STRUCTURE EXTENDED does a great job of copying the structure but not so great about taking into consideration the decisions about what the user wishes to include and what not to include in this type of situation. _______________________________________________ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.