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

Fgets, Fgets32(3fml)


Fgets(), Fgets32() - get value converted to string


#include <stdio.h> 
#include "fml.h"
Fgets(FBFR *fbfr, FLDID fieldid, FLDOCC oc, char *buf)
#include "fml32.h"
Fgets32(FBFR32 *fbfr, FLDID32 fieldid, FLDOCC32 oc, char *buf)


Fgets() retrieves a field occurrence from the fielded buffer first converting the value to a user type of FLD_STRING. fbfr is a pointer to a fielded buffer. fieldid is a field identifier. oc is the occurrence number of the field. The caller of Fgets() provides buf, a pointer to a private buffer, which is used for the retrieved field value. It is assumed that buf is large enough to hold the value. Basically, Fgets() calls CFget() with an assumed utype of FLD_STRING, and a ulen of 0.

Fgets32() is used with 32-bit FML.

A thread in a multithreaded application may issue a call to Fgets() or Fgets32() 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, Fgets() 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().


"field not present"
A field occurrence is requested but the specified field and/or occurrence was not found in the fielded buffer.


"unknown field number or type"
A field identifier is specified which is not valid.


"invalid field type"
A field identifier is specified which is not valid.


"malloc failed"
Allocation of space dynamically using malloc() failed.

See Also

Introduction to FML Functions, CFget, CFget32(3fml), Fget, Fget32(3fml), Fgetalloc, Fgetalloc32(3fml), Fgetlast, Fgetlast32(3fml), Fgetsa, Fgetsa32(3fml)