BEA Logo BEA Tuxedo Release 7.1

  Corporate Info  |  News  |  Solutions  |  Products  |  Partners  |  Services  |  Events  |  Download  |  How To Buy


   Tuxedo Doc Home   |   Reference   |   Topic List   |   Previous   |   Next   |   Contents

   BEA Tuxedo FML Function Reference

Fread, Fread32(3fml)


Fread(), Fread32() - read fielded buffer


#include <stdio.h> 
#include "fml.h"

Fread(FBFR *fbfr, FILE *iop)

#include "fml32.h"

Fread32(FBFR32 *fbfr, FILE32 *iop)


Fielded buffers may be read from file streams using Fread(). fbfr is a pointer to a fielded buffer. iop is a pointer of type FILE to the input stream. (See stdio(3S) in a UNIX System reference manual for a discussion of streams). Fread() reads the fielded buffer from the stream into fbfr, clearing any data previously stored in the buffer, and recreates the buffer's index. Fread32() ignores the FLD_PTR field type. No error is returned if a value of type FLD_PTR is supplied to the function.

Fread32() is used with 32-bit FML.

A thread in a multithreaded application may issue a call to Fread() or Fread32() while running in any context state, including TPINVALIDCONTEXT.

Return Values

This function returns -1 on error and sets Ferror to indicate the error condition.


Under the following conditions, Fread() fails and sets Ferror to:


"fielded buffer not aligned"
The buffer does not begin on the proper boundary.


"buffer not fielded"
The buffer is not a fielded buffer or has not been initialized by Finit(). This error is also returned if the data that is read is not a fielded buffer.


"no space in fielded buffer"
There is not enough space in the buffer to hold the fielded buffer being read from the stream.


"UNIX system call error"
The read() system call failed. The external integer errno should have been set to indicate the error by the system call.


This function is not supported using the BEA Tuxedo System Workstation DLL for OS/2 and Microsoft Windows.

See Also

Introduction to FML Functions, Findex, Findex32(3fml), Fwrite, Fwrite32(3fml)

stdio(3S) in a UNIX system reference manual