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

Fupdate, Fupdate32(3fml)

Name

Fupdate(), Fupdate32() - update destination buffer with source

Synopsis

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

int
Fupdate(FBFR *dest, FBFR *src)

#include "fml32.h"

int
Fupdate32(FBFR32 *dest, FBFR32 *src)

Description

Fupdate() updates the destination buffer with the field values in the source buffer. dest and src are pointers to fielded buffers. For fields that match on fieldid/occurrence, the field value is updated in the destination buffer with the value in the source buffer. Fields in the destination buffer that have no corresponding field in the source buffer are left untouched. Fields in the source buffer that have no corresponding field in the destination buffer are added to the destination buffer.

For values of type FLD_PTR, Fupdate32() stores the pointer value. The buffer pointed to by a FLD_PTR field must be allocated using the tpalloc() call. For values of type FLD_FML32, Fupdate32() stores the entire FLD_FML32 field value, except the index. For values of type FLD_VIEW32, Fupdate32() stores a pointer to a structure of type FVIEWFLD, that contains vflags (a flags field, currently unused and set to 0), vname (a character array containing the view name), and data (a pointer to the view data stored as a C structure). The application provides the vname and data to Fupdate32().

Fupdate32() is used with 32-bit FML.

A thread in a multithreaded application may issue a call to Fupdate() or Fupdate32() 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, Fupdate() fails and sets Ferror to:

[FALIGNERR]

"fielded buffer not aligned"
Either the source buffer or the destination buffer does not begin on the proper boundary.

[FNOTFLD]

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

[FNOSPACE]

"no space in fielded buffer"
A field value is to be added or changed in the destination buffer but there is not enough space remaining in the buffer.

See Also

Introduction to FML Functions, Fjoin, Fjoin32(3fml), Fojoin, Fojoin32(3fml), Fproj, Fproj32(3fml), Fprojcpy, Fprojcpy32(3fml)