Not as easy as it sounds. Here are two options.
1. Program writes or updates the DSPF code for the new fields
compiles the DSPF
uses the subfile
2. Subfile has a long string field
Program builds the sting from the data fields and writes the string to the Subfile