my dilemma -- hundreds of record types
- Posted by Chris Saik <csaik2002 at yahoo.com> Nov 15, 2002
- 428 views
Hello Eu folks! I am attempting to develop an application that will read records from a daily FTP feed, sort the records according to type, display pertinent information on each record, and send that information to subscribers based on their subscription options. Each record has a corresponding template with variable length fields. The fields are delimited by tags. Some of the fields are optional, and thus even the tags thenselves do not appear in those records that do not use them. Here is a view of one of the smaller templates, with sample information: <PRESOL> <DATE>1114 <YEAR>02 <AGENCY>Department of Justice <OFFICE>Bureau of Prisons <LOCATION>FCI Talladega <ZIP>35160 <CLASSCOD>89 <OFFADD>Department of Justice, Bureau of Prisons, FCI Talladega, 565 East Renfroe Road, Talladega, AL, 35160 <SUBJECT>89 -- Subsistence <SOLNBR>31303-045 <RESPDATE>121703 <ARCHDATE>01012004 <CONTACT>Ricky D, Contract Specialist, Phone (703) 555-4251, Fax (703) 999-4493, Email rwd at bop.gov <DESC>2nd qtr food items <LINK> <URL>http://www.yadayada.gov/spg/DOJ/BPR/31303/31303-045/listing.html <DESC>Link to document. <SETASIDE>Total Small Business <POPCOUNTRY>US <POPZIP>35160 <POPADDRESS>Federal Correctional Institution 565 East Renfroe Road Talladega,AL </PRESOL> There are 9 major template types, but since a lot of the fields are optional it boosts the number of different record variations to hundreds. The only tags that truly remain constant are the first and last (<PRESOL and </PRESOL> in the example above) and a few others strewn throughout the record. What is, in your opinion, the best way to read in all of these record variations so that I can easily work with and manage the data? Thank you for your assistance, Chris