BEA Logo BEA Tuxedo Release 7.1

  Corporate Info  |  News  |  Solutions  |  Products  |  Partners  |  Services  |  Events  |  Download  |  How To Buy

 

   Tuxedo Doc Home   |   Programming   |   Topic List   |   Previous   |   Next   |   Contents

   Programming a BEA Tuxedo Application Using FML

Field Identifier Mapping Functions

Several functions allow a programmer to query field tables or field identifiers for information about fields during program execution.

Fldid

Fldid returns the field identifier for a given valid field name and loads the field name/fieldid mapping tables from the field table files, if they do not already exist.

FLDID
Fldid(char *name)

Here name is a valid field name.

The space used by the mapping tables in memory can be freed using the Fnmid_unload, Fnmid_unload32(3fml) function. Note that these tables are separate from the tables loaded and used by the Fname function.

For more information, refer to Fldid, Fldid32(3fml) in the BEA Tuxedo FML Function Reference.

Fname

Fname returns the field name for a given valid field identifier and loads the fieldid/name mapping tables from the field table files, if they do not already exist.

char *
Fname(FLDID fieldid)

Here fieldid is a valid field identifier.

The space used by the mapping tables in memory can be freed using the Fnmid_unload, Fnmid_unload32(3fml) function. Note that these tables are separate from the tables loaded and used by the Fldid function. (Refer to the BEA Tuxedo FML Function Reference for more information.)

For more information, refer to Fname, Fname32(3fml) in the BEA Tuxedo FML Function Reference.

Fldno

Fldno extracts the field number from a given field identifier.

FLDOCC
Fldno(FLDID fieldid)

Here fieldid is a valid field identifier.

For more information, refer to Fldno, Fldno32(3fml) in the BEA Tuxedo FML Function Reference.

Fldtype

Fldtype extracts the field type (an integer, as defined in fml.h) from a given field identifier.

int
Fldtype(FLDID fieldid)

Here fieldid is a valid field identifier.

The following table shows the possible values returned by Fldtype and their meanings.

Field Types Returned by Fldtype

Return Value

Meaning

0

short integer

1

long integer

2

character

3

single-precision float

4

double-precision float

5

null-terminated string

6

character array

9

pointer

10

embedded FML32 buffer

11

embedded VIEW32 buffer

For more information, refer to Fldtype, Fldtype32(3fml) in the BEA Tuxedo FML Function Reference.

Ftype

Ftype returns a pointer to a string containing the name of the type of a field given a field identifier.

char *
Ftype(FLDID fieldid)

Here fieldid is a valid field identifier. For example, the following code returns a pointer to one of the following strings: short, long, char, float, double, string, carray, FLD_PTR, FLD_FML32, or FLD_VIEW32.

char *typename
. . .
typename = Ftype(fieldid);

For more information, refer to Ftype, Ftype32(3fml) in the BEA Tuxedo FML Function Reference.

Fmkfldid

As part of an application generator, or to reconstruct a field identifier, it might be useful to make a field identifier from a type specification and an available field number. Fmkfldid provides this functionality.

FLDID
Fmkfldid(int type, FLDID num)

Here:

For more information, refer to Fmkfldid, Fmkfldid32(3fml) in the BEA Tuxedo FML Function Reference.