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(3), Fojoin(3), Fjoin(3), and Fconcat(3). 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:
FALIGNERR]
[FNOTFLD]
FINIT.
[FEINVAL]
[FBADACM]
[FBADVIEW]
VIEWNAME was not found in the files specified by VIEWDIR or VIEWFILES.
Fintro(), viewfile(5)