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

Ftypcvt, Ftypcvt32(3fml)


Ftypcvt(), Ftypcvt32() - convert from one field type to another


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

char *
Ftypcvt(FLDLEN *tolen, int totype, char *fromval, int fromtype,
FLDLEN fromlen)

#include "fml32.h"

char *
Ftypcvt32(FLDLEN32 *tolen, int totype, char *fromval, int fromtype,
FLDLEN32 fromlen)


Ftypcvt() converts the value *fromval, which has type fromtype, and length fromlen (if fromtype is FLD_CARRAY; otherwise, fromlen is inferred from fromtype), to a value of type totype. Ftypcvt() returns a pointer to the converted value, and sets *tolen to the converted length, upon success. Upon failure, Ftypcvt() returns NULL.

Ftypcvt32()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, Ferror is set to FEBADOP.

Ftypcvt32() is used with 32-bit FML.

A thread in a multithreaded application may issue a call to Ftypcvt() or Ftypcvt32() while running in any context state, including TPINVALIDCONTEXT.

Return Values

This function returns NULL on error and sets Ferror to indicate the error condition.


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


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


"invalid argument to function"
One of the arguments to the function invoked was invalid (for example, a NULL tolen or fromval parameter was specified).


"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, CFadd, CFadd32(3fml), CFchg, CFchg32(3fml), CFfind, CFfind32(3fml), CFget, CFget32(3fml), CFgetalloc, CFgetalloc32(3fml)