The file is open with type=record and an attempt was made to get the number of bytes or wide characters pending to be written using __fpending(). Byte I/O is not allowed on files open type=record.
Remove type=record from the fopen() mode argument and use byte I/O functions to write the file if you desire the number of bytes or wide characters pending to be written.
JrEdcFioeErecio01