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 COBOL Function Reference

FINIT, FINIT32(3cbl)

Name

FINIT(), FINIT32() - initialize fielded buffer

Synopsis

01 FML-BUFFER.
05
FML-ALIGN PIC S9(9) USAGE IS COMP.
05
FML-DATA PIC X(applen).

01
FML-REC
COPY FMLINFO.

CALL "FINIT" USING
FML-BUFFER FML-REC.

CALL "FINIT32" USING
FML-BUFFER FML-REC.

Description

FINIT() can be called to initialize a fielded buffer. FML-BUFFER is the record to be used for the fielded buffer; it should be aligned on a 4-byte boundary to work with both FML16 and FML32. This can be accomplished by defining two record elements as shown in the synopsis above. FML-LENGTH IN FML-REC is the length of the record. The internal structure is set up for a fielded buffer with no fields; the application program should not interpret the record, other than to pass it to FINIT(), FVFTOS(), or FVSTOF(), or an ATMI call that takes a typed record (in this case, the type is "FML" and there is no subtype).

FINIT32() is used with 32-bit FML.

Return Values

Upon successful completion, FINIT() sets FML-STATUS in FML-REC to FOK.

On error, FML-STATUS is set to a non-zero value.

Errors

Under the following conditions, FINIT() fails and sets FML-STATUS in FML-REC to:

[FALIGNERR]

"fielded buffer not aligned"
The buffer does not begin on the proper boundary.

[FNOSPACE]

"no space in fielded buffer"
The buffer size specified is too small for a fielded buffer.

Example

The correct was to reinitialize a buffer to have no fields is: Finit(frfr, (FLDLEN)Fsizeof(fbfr));

See Also

Introduction to FML Functions