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

Fvftos, Fvftos32(3fml)


Fvftos(), Fvftos32() - copy from fielded buffer to C structure


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

Fvftos(FBFR *fbfr, char *cstruct, char *view)

#include "fml32.h"

Fvftos32(FBFR32 *fbfr, char *cstruct, char *view)


The Fvftos() function transfers data from a fielded buffer to a C structure. fbfr is a pointer to a fielded buffer. cstruct is a pointer to a C structure. view is a pointer to the name of a compiled view description.

Fields are copied from the fielded buffer into the structure based on the member descriptions in the view. If a field in the fielded buffer has no corresponding member in the C structure, it is ignored. If a member specified in the C structure has no corresponding field in the fielded buffer, a null value is copied into the member. The null value used is definable for each member in the view description.

To store multiple occurrences in the C structure, the structure member should be an array (for example, int zip[4] can store 4 occurrences of zip). If the buffer has fewer occurrences of the field than there are elements in the array, the extra element slots are assigned null values. On the other hand, if the buffer has more occurrences of the field than there are elements in the array, the surplus occurrences are ignored.

There are view description options that inhibit mappings even though a mapping entry exists for a fldid and a member. These options are initially specified in the view file, but can be changed at runtime using Fvopt().

Fvftos32() is used with 32-bit FML.

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


"invalid argument to function"
One of the arguments to the function invoked was invalid, (for example, specifying a NULL cstruct parameter to Fvftos)


"ACM contains negative value"
An Associated Count Member should not be a negative value while transferring data from a structure to a fielded buffer.


"cannot find or get view"
The view description specified was NULL or was not found in the files specified by VIEWDIR or VIEWFILES.

See Also

Introduction to FML Functions, Fvopt, Fvopt32(3fml), viewfile(5)