You can improve performance by not opening the same file more than once in an application. You can allocate the file pointers as global (external) variables, opening the files once, and not closing the file until the end of the application.
(C) Copyright IBM Corporation 1992, 2005. All Rights Reserved.