A different mailing

Two data files per letter, one with a matrix of data, one for the mailing itself. Right now I’m dumping the matrix into the”repository” and then pulling the individual lines back out and using a couple of character replacements to table them. 2300 records ran fine, though slow, but 4100 a week later choked. Hard. Something like 20gb of dead temp files…

Now then, right now, I’m making each record separately, and concatenating then as they come out, then mapping that file, and then imposing them. This isn’t working.

Then again, when I first found out I needed this solution, it was the afternoon before the first live order. So I’m not too sad.

How to fix this?

  1. Get a data file
  2. Branch out to grab the matrix
  3. Map the matrix into XML
  4. Map the data file to XML
  5. Trim the head and foot, respectively
  6. Combine them
  7. Transform them with an XSLT sorted by the key
  8. Sort by the sequence number
  9. Map the XML
  10. Sort the mapped data with what was a matrix as a detail table

This might have it’s own down sides, but nothing as bad as what I have right now.