Joined: 09 Mar 2011 Posts: 7310 Location: Inside the Matrix
Whenever BUILD executes it makes a new copy of the current data record, which contains only the fields specified on the BUILD.
Whenever OVERLAY within the length of the existing record executes, it only amends data at the column positions specified in the OVERLAY, all other data remains the same one the same current record.
OVERLAY is a better "fit" to describe what you are doing. OVERLAY will generally require fewer resources.
Where OVERLAY extends an existing record, a new copy of the current data record is created, exactly as with BUILD, but there is no danger of "losing" any of the original input, as you don't have to type the fields, DFSORT is doing it.
When selecting fields from a record, use BUILD. When changing some data in the same position(s)/length(s) on a record or adding a field(s) as an extension to a fixed-length record, use OVERLAY. If OVERLAY wasn't useful, it wouldn't be there.
These are my Rules of Opposable Digits. So as I don't make a ROD for my own back, I can change them if I feel like it.