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)

Name

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

Synopsis

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

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

#include "fml32.h"

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

Description

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.

Errors

Under the following conditions, Fvftos() 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().

[FEINVAL]

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

[FBADACM]

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

[FBADVIEW]

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