I need some suggestions in how to unravel a text file.
This particular file is output from the Federal Reserve's wire transfer program. Each record is a variable length record (no problem). They use field identifiers that are structured like this {xxxx} where the xxxx is a 4 digit number. This code {XXXX} identifies a particular field depending on what the code is.
\
For example, a record might look something like this--{1000}20090605112243TFY{1500}Tommy Thompson{1510}915 Thompson Road{1520}Springville Tn{1530}38256
{1000}=Unique ID {1500}= Name {1510}= Address and so on.
Obviously, this is a variable length record with variable length fields.
Still no problem. I have been able to successfully parse the record and extract both the code {xxxx} and it's corresponding field. As of right now, I'm outputting a text file that looks like this. unique id,code,fieldname. I drop the brackets so the actual file would look like this.
20090605112243TFY,1500,Tommy Thompson
20090605112243TFY,1510,915 Thompson Road
Etc
There are only a certain number of the codes {xxxx} and I have the documentation from the Fed. There are probably 25 or 30 such unique codes.
Where I could use some help is how to get this info into a table. I would like to do it as efficiently as possible.
I would like to have a table that has fields for the unique ID and each of the possible codes (25-30) and some how post to it. Either from the text file I build, or a dbf table created by an import of the text file.
Any suggestions?
This particular file is output from the Federal Reserve's wire transfer program. Each record is a variable length record (no problem). They use field identifiers that are structured like this {xxxx} where the xxxx is a 4 digit number. This code {XXXX} identifies a particular field depending on what the code is.
\
For example, a record might look something like this--{1000}20090605112243TFY{1500}Tommy Thompson{1510}915 Thompson Road{1520}Springville Tn{1530}38256
{1000}=Unique ID {1500}= Name {1510}= Address and so on.
Obviously, this is a variable length record with variable length fields.
Still no problem. I have been able to successfully parse the record and extract both the code {xxxx} and it's corresponding field. As of right now, I'm outputting a text file that looks like this. unique id,code,fieldname. I drop the brackets so the actual file would look like this.
20090605112243TFY,1500,Tommy Thompson
20090605112243TFY,1510,915 Thompson Road
Etc
There are only a certain number of the codes {xxxx} and I have the documentation from the Fed. There are probably 25 or 30 such unique codes.
Where I could use some help is how to get this info into a table. I would like to do it as efficiently as possible.
I would like to have a table that has fields for the unique ID and each of the possible codes (25-30) and some how post to it. Either from the text file I build, or a dbf table created by an import of the text file.
Any suggestions?
Comment