Timothy,
change this line;
repl scanfile->noun with 'UNKNOWN'
to
repl noun with 'UNKNOWN' IN Scanfile
The reason you are getting no replace is that replace is a scoped command. That is its work depends on the records in the currently selected work area. IN your code the currently selected work area is at EOF and so no replace takes place. By using the IN Alais option you overcome this scope and set the scope for the replace command to the work area you are replacing in. It is a good idea to never use an alias on a replace command so you will get errors if you make a mistake and can fix them before they drive you nuts.