I have the need to write a simple application to read data from an external source and pump it into an AS400 database.
I've done this before successfully but I've always used Excel and CSV as input formats.
Excel is a pain because users always screw up the data format somewhere.
CSV works quite well but I have two record formats ( header and multiple detail lines ) that I need to import this time.
I want to possibly use the program to import from other sources ion the future.
So I figure these are my options:-
1) CSV With Redundant Header Data
I could have one row per detail line and have redundant header data appear on each row.
2) Header.CSV and Detail.CSV
Two CSV files that would have to be read in tandom which makes coding more difficult and more likely the source will be wrong.
3) Two Record Format CSV
Have a row with 'Header' as the first record field before multiple rows with 'Detail'as the first field.
Both types have a different record format.
4) XML
The proper way of doing 3) but a bit more difficult for all possible sources to produce.
Curious to know what is the best option - if there really is one.
I'm tending to think 1) or 4) would be the best options.
Opinions anybody?
Dazed and confused.
Remember.. 'Depression is just anger without enthusiasum'.
I've done this before successfully but I've always used Excel and CSV as input formats.
Excel is a pain because users always screw up the data format somewhere.
CSV works quite well but I have two record formats ( header and multiple detail lines ) that I need to import this time.
I want to possibly use the program to import from other sources ion the future.
So I figure these are my options:-
1) CSV With Redundant Header Data
I could have one row per detail line and have redundant header data appear on each row.
2) Header.CSV and Detail.CSV
Two CSV files that would have to be read in tandom which makes coding more difficult and more likely the source will be wrong.
3) Two Record Format CSV
Have a row with 'Header' as the first record field before multiple rows with 'Detail'as the first field.
Both types have a different record format.
4) XML
The proper way of doing 3) but a bit more difficult for all possible sources to produce.
Curious to know what is the best option - if there really is one.
I'm tending to think 1) or 4) would be the best options.
Opinions anybody?
Dazed and confused.
Remember.. 'Depression is just anger without enthusiasum'.