ATMI COBOL Function Reference
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
FINIT()
, FINIT32()
- initialize fielded buffer
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
.
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.
Upon successful completion, FINIT()
sets FML-STATUS
in FML-REC
to FOK
.
On error, FML-STATUS
is set to a non-zero value.
Under the following conditions, FINIT()
fails and sets FML-STATUS
in FML-REC
to:
The correct way to reinitialize a buffer to have no fields is: Finit
(frfr
, (FLDLEN
)Fsizeof
(fbfr
));
![]() ![]() |
![]() |
![]() |