When you use an internal function you keep the code in line in the main program. When you use an external function the program has to make a call the new program, open files, close files, etc. (with some dependcies on how you write the external function). You are always better off using an internal function over an external one.
– – — – – – – – – – – – – – – – – –
An internal function is best regarded as a subroutine, so when generated, your external function will have a (subroutine) which is used for each record. there will then be no question of additional overhead.
Unless the functionality is required for other programs, then you could choose not to embed it within an internal function, just code it, presumably within the RTVOBJ which is reading the file.
You description sounds like a conventional RTVOBJ – why is it different?