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

CFget, CFget32(3fml)


CFget(), CFget32() - get field and convert


#include <stdio.h> 
#include "fml.h"
CFget(FBFR *
fbfr, FLDID fieldid, FLDOCC oc, char *buf, FLDLEN *len,
#include "fml32.h"
FBFR32 *fbfr, FLDID32 fieldid, FLDOCC32 oc, char *buf,
len, int type)


CFget() is the conversion analog of Fget(). The main difference is that it copies a converted value to the user supplied buffer. fbfr is a pointer to a fielded buffer. fieldid is a field identifier. oc is the occurrence number of the field. buf is a pointer to private data area. On input, len is a pointer to the length of the private data area. On return, len is a pointer to the length of the returned value. If the len parameter is NULL on input, it is assumed that the buffer is big enough to contain the field value and the length of the value is not returned. If the buf parameter is NULL, the field value is not returned. type is the data type the user wants the returned value converted to.

This function fails if any of the following field types is used: FLD_PTR, FLD_FML32, or FLD_VIEW32. If one of these field types is encountered when CFget() or CFget32() is being used, Ferror is set to FEBADOP.

CFget32() is used with 32-bit FML.

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


"malloc failed"
Allocation of space dynamically using malloc() failed when converting from a carray to string.


"no space in fielded buffer"
The size of the data area, as specified in len, is not large enough to hold the field value.


"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.


"invalid field type"
An invalid field type (such as FLD_PTR, FLD_FML32, and FLD_VIEW32) is specified.

See Also

Introduction to FML Functions, Fget, Fget32(3fml)