Thank you for agreeing to look at this problem. I've been working at it the last month or so and keep ending up at the same road blocks.
Here is the DAT file as exported by our order entry system.
<V1.0>, "WinIG export file"
*, "4648136", "111111", "", "042302", "", ""
001, 00002, 0, "ICL301 ", 00376, 00714,, "1/2 IN AS ", ""
002, 00002, 0, "ICL301 ", 00554, 00816,, "1/2 IN AS ", ""
003, 00001, 0, "ICL301 ", 00511, 01121,, "1/2 IN AS ", ""
004, 00001, 0, "ICL301 ", 00683, 00573,, "1/2 IN AS ", ""
*, "4648137", "111111", "", "042302", "", ""
001, 00004, 0, "ICL301 ", 00590, 01065,, "1/2 IN AS ", ""
002, 00001, 0, "ICL301 ", 00403, 01116,, "1/2 IN AS ", ""
003, 00009, 0, "ISG398 ", 00490, 01395,, "1/2 IN AS ", "ARGON "
004, 00006, 0, "ISG398 ", 00388, 01395,, "1/2 IN AS ", "ARGON "
#
The # tells the next program (a glass cutting optimizer) where the file starts and ends. The * tells the next program that this is an order header line. The lines that start with a number are order lines for the preceeding order number. The fields that are within quote marks are text fields and must remain as text fields. The number fields must remain as number fields. The leading zeros are not required. What I have to do is add a sixteenth field which will be the value of the order number (field after the * mark) and the line number ( the first field of the order line). After doing this operation, save the file as a dat or txt file and close. The above example should look like this;
<V1.0>, "WinIG export file"
*, "4648136", "111111", "", "042302", "", ""
001, 00002, 0, "ICL301 ", 00376, 00714,, "1/2 IN AS ", "",,,,,,,"4648136-1"
002, 00002, 0, "ICL301 ", 00554, 00816,, "1/2 IN AS ", "",,,,,,,"4648136-2"
003, 00001, 0, "ICL301 ", 00511, 01121,, "1/2 IN AS ", "",,,,,,,"4648136-3"
004, 00001, 0, "ICL301 ", 00683, 00573,, "1/2 IN AS ", "",,,,,,,"4648136-4"
*, "4648137", "111111", "", "042302", "", ""
001, 00004, 0, "ICL301 ", 00590, 01065,, "1/2 IN AS ", "",,,,,,,"4648137-1"
002, 00001, 0, "ICL301 ", 00403, 01116,, "1/2 IN AS ", "",,,,,,,"4648137-2"
003, 00009, 0, "ISG398 ", 00490, 01395,, "1/2 IN AS ", "ARGON ",,,,,, "4648137-3"
004, 00006, 0, "ISG398 ", 00388, 01395,, "1/2 IN AS ", "ARGON ",,,,,, "4648137-4"
#
What this allows me to do is print the order number-line number on the spacer (We manufacture glass sealed units) on the spacer so that if we are required to remake a unit (warranty), the service tech needs only to read the printed number, and all the other information about size and configuration can be read from a table I save in Excel using a find. The only spot I'm truly hung up on is the SaveAs. I end up with no quotes or double quotes, neither of which will allow me to import properly. At peak periods, I may be running 700 to 1000 of these lines per day which makes manual correction a nightmare. By rights, the original creater of the optimizer software should have set something like this up, but they didn't, and won't, and have locked their code up so tight that it is impossible correct it within the program itself. Any help you could give would be greatly appreciated.