Suppose you have two or more system documents (files) that you wish to combine into one, larger document - you can do so with the help of BLOBs. The basic idea is to load the content of the second and subsequent documents into a BLOB one at a time, then convert the BLOB contents into a text variable that can then be passed to SEND PACKET. Once we have the contents of a document stored in a text variable ($str), we can append it onto the initial document repeating as necessary for each additional file.
The follow codes illustrate how to append DocumentA.txt onto DocumentB.txt (concatenating B and A). Note that this code can only handle documents up to 32K in size due to the limitation of text variables in 4D. Larger documents would need to be handled in chunks of 32K or smaller.
Copy and paste the following code into your 4D project:
DOCUMENT TO BLOB("DocumentA.txt";blb)
$str:=BLOB to text(blb;0;vOffSet)