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

Fgetsa, Fgetsa32(3fml)


Fgetsa(), Fgetsa32() - use malloc() to allocate space and get converted value


#include <stdio.h> 
#include "fml.h"
char *
Fgetsa(FBFR *fbfr, FLDID fieldid, FLDOCC oc, FLDLEN *extra)
#include "fml32.h"
char *
Fgetsa32(FBFR32 *fbfr, FLDID32 fieldid, FLDOCC32 oc, FLDLEN32


Fgetsa() is a macro that calls CFgetalloc(). fbfr is a pointer to a fielded buffer. fieldid is a field identifier. oc is the occurrence number of the field. The function uses malloc() (in UNIX System programmer's reference manuals) to allocate space for the retireved field value that has been converted to a string. If extra is not NULL, it specifies the extra space to allocate in addition to the field value size; the total size is returned in extra.

It is the responsibility of the user to free() (in UNIX System reference manuals) the space malloc()'d.

Fgetsa32() is used with 32-bit FML.

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

Return Values

On success, the function returns a pointer to the allocated buffer.

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


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


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


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


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


"malloc failed"
Allocation of space dynamically using malloc() failed.

See Also

Introduction to FML Functions, CFget, CFget32(3fml), Fget, Fget32(3fml), Fgetlast, Fgetlast32(3fml), Fgets, Fgets32(3fml)

free(3), malloc(3) in a UNIX system reference manual