There is a library name starts at 20th position in the input file, so i need only the high level qualifier of that library at end of each record in my output file.
Have a look at PARSE with the option to start from a particular colmn (20), end before your ".", and then use OVERLAY to locate the PARSEd field in the desired position.
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.