Hi all! Thanks for all your help with resolving other issues I have encountered. I have a new one now.
We receive huge, variable length, tab delimited data files from a client several times a week. They often contain 1 to 2 million records each time, and their default layout "expands" each record to about 3200 bytes each - which is WELL over the 2GB limt for a .dbf file. There are a lot of blank spaces in most of the fields (sometimes fields come in completely blank but still have to be accounted for).
We have been chopping the file down into segments, importing each segment into the existing structure, and processing each segment separately, but that is very clumsy and time-consuming.
A recent change to the client's program requirements now mandates that all records be processed together (for proper postal discounts, reporting, etc.)
Is there a way to open the variable length, tab delimited file and - without importing it into a .dbf structure - determine the longest value for each data field, throughout the entire file??
I can do that now with a smaller .dbf by using a len(alltrim(fieldname)) command for each field as I scan through the file, but I would like to be able to perform that same function with the tab delimited file, and from the results of that process create an "efficient" .dbf structure, and then import the tab delimited file into that "efficient" structure, hopefully staying under the 2GB limit.
There are currently 92 fields in each record. However, the client periodically adds fields to the end of the records as needed.
If the counter names for the fields are (for example - FLD01CNT, FLD02CNT, FLD03CNT, etc.) I would to be able to match them up with the corresponding .dbf field names (Name1, Address1, Address2, etc.) somehow. Maybe use the existing .dbf structure to capture the actual field names, perhaps using a copy structure extended sort of process??
Each record has a CR/LF "end of record" sequence. Also known in Hex as 0D/0A or in Decimal 13/10.
Completely blank fields would need to have a field length of 1.
There are always 2 "header records" in each file which I would like to skip (they would make the actual data field lengths calculations incorrect).
Thanks for any help!
John
We receive huge, variable length, tab delimited data files from a client several times a week. They often contain 1 to 2 million records each time, and their default layout "expands" each record to about 3200 bytes each - which is WELL over the 2GB limt for a .dbf file. There are a lot of blank spaces in most of the fields (sometimes fields come in completely blank but still have to be accounted for).
We have been chopping the file down into segments, importing each segment into the existing structure, and processing each segment separately, but that is very clumsy and time-consuming.
A recent change to the client's program requirements now mandates that all records be processed together (for proper postal discounts, reporting, etc.)
Is there a way to open the variable length, tab delimited file and - without importing it into a .dbf structure - determine the longest value for each data field, throughout the entire file??
I can do that now with a smaller .dbf by using a len(alltrim(fieldname)) command for each field as I scan through the file, but I would like to be able to perform that same function with the tab delimited file, and from the results of that process create an "efficient" .dbf structure, and then import the tab delimited file into that "efficient" structure, hopefully staying under the 2GB limit.
There are currently 92 fields in each record. However, the client periodically adds fields to the end of the records as needed.
If the counter names for the fields are (for example - FLD01CNT, FLD02CNT, FLD03CNT, etc.) I would to be able to match them up with the corresponding .dbf field names (Name1, Address1, Address2, etc.) somehow. Maybe use the existing .dbf structure to capture the actual field names, perhaps using a copy structure extended sort of process??
Each record has a CR/LF "end of record" sequence. Also known in Hex as 0D/0A or in Decimal 13/10.
Completely blank fields would need to have a field length of 1.
There are always 2 "header records" in each file which I would like to skip (they would make the actual data field lengths calculations incorrect).
Thanks for any help!
John