To use stream files (type=record) with record I/O functions you must cast the FILE pointer to an RFILE pointer.
For more information about data management operations and ILE C/C++ functions available for stream files, see the Database file management section in the Files and file systems category at the i5/OS Information Center Web site:
http://www.ibm.com/systems/i/infocenter