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)

Name

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

Synopsis

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

Description

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.

Errors

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

[FALIGNERR]

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

[FNOTFLD]

"buffer not fielded"
The buffer is not a fielded buffer or has not been initialized by Finit().

[FMALLOC]

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

[FNOSPACE]

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

[FNOTPRES]

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

[FBADFLD]

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

[FTYPERR]

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

[FEBADOP]

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