![]() |
![]() |
e-docs > Tuxedo > ATMI COBOL Function Reference > Section 3(cbl) - COBOL Functions |
ATMI COBOL Function Reference
|
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:
The buffer does not begin on the proper boundary.
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
![]() |
![]() |
![]() |
![]() |
||
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |