ATMI COBOL Function Reference
FVSTOF()
- copy from C structure to fielded buffer
01 DATA-REC.
COPY User data.
01 FML-BUFFER.
05 FML-ALIGN PIC S9(9) USAGE IS COMP.
05 FML-DATA PIC X(applen).
01 FML-REC
COPY FMLINFO.
CALL "FVSTOF" USING FML-BUFFER DATA-REC FML-REC.
CALL "FVSTOF32" USING FML-BUFFER DATA-REC FML-REC.
FVSTOF()
transfers data from a C structure to a fielded buffer. FML-BUFFER
is a record containing the fielded buffer. DATA-REC
is the COBOL record. VIEWNAME IN
FML-REC
is the name of the view describing the COBOL record. FML-MODE IN
FML-REC
specifies the manner in which the transfer is made. FML-MODE
has four possible values:
FUPDATE
FOJOIN
FJOIN
FCONCAT
The action of these modes are the same as that described in Fupdate, Fupdate32(3fml), Fojoin, Fojoin32(3fml), Fjoin, Fjoin32(3fml), and Fconcat, Fconcat32(3fml). One can even think of FVSTOF()
as the same as these functions, except that where they specify a source buffer, FVSTOF()
specifies a COBOL record. Bear in mind that FUPDATE
does not move record elements that have NULL values.
FVSTOF32()
is used for views defined with view32()
typed buffers for larger views with more fields.
Upon successful completion, FVSTOF32()
sets FML-STATUS IN
FML-REC
to FOK
.
On error, FML-STATUS
is set to a non-zero value.
Under the following conditions, FVSTOF()
fails and sets FML-STATUS
to:
"ACM contains negative value"
An Associated Count Member should not be a negative value while transferring data from a COBOL record to a fielded buffer.