hi. i'm writing a music database at work, just to see whether or not it will work. each week there are entries and deletions from the catalogue that come in the form of an update file. the update file has different types of records that will contain different information. the file is fixed length and delimited. the first 2 characters are the record type. a typical update file would look like this...
1-2 3-10 12-18
00 date headernumber
1-2 3-5 5~
01 label artist~title~style etc
the 00 record contains the header number which identifies what cd it is. a 00 record is ALWAYS followed by a different record type who's information would pertain to the preceding 00 record UNLESS the item is to be deleted. if the item is to be deleted it would have a 00 record on its own (which would then be followed by another 00 record which would contain information about a different cd, unless it was being deleted) and so on and so forth.
so what i think i need to do is read 2 lines at a time and if there are 2 00 records in a row, the first one is to be deleted. i'm not really sure how to go about reading in 2 lines at a time. does anyone have any ideas, or a better solution?
thanx in advance
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |