![]() |
![]() |
e-docs > Tuxedo > ATMI COBOL Function Reference > Section 3(cbl) - COBOL Functions |
ATMI COBOL Function Reference
|
Name
FVFTOS(), FVFTOS32() - copy from fielded buffer to COBOL structure
Synopsis
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 "FVFTOS" USING FML-BUFFER DATA-REC FML-REC.
CALL "FVFTOS32" USING FML-BUFFER DATA-REC FML-REC.
Description
The FVFTOS() function transfers data from a fielded buffer to a COBOL record. FML-BUFFER is a pointer to a fielded buffer initialized with FINIT(). DATA-REC is a pointer to a C structure. VIEWNAME IN FML-REC is the name of the view describing the COBOL record.
Fields are copied from the fielded buffer into the structure based on the element descriptions in VIEWNAME. If a field in the fielded buffer has no corresponding element in the COBOL record, it is ignored. If an element specified in the COBOL record has no corresponding field in the fielded buffer, a NULL value is copied into the element. The NULL value used is definable for each element in the view description.
To store multiple occurrences in the COBOL record, the record element should be defined with OCCURS. If the buffer has fewer occurrences of the field than there are occurrences of the element, the extra element slots are assigned NULL values. On the other hand, if the buffer has more occurrences of the field than there are occurrences of the element, the surplus occurrences are ignored.
FVFTOS32() is used for views defined with view32() typed buffers for larger views with more fields.
Return Values
Upon successful completion, FVFTOS32() sets FML-STATUS IN FML-REC to FOK.
On error, FML-STATUS is set to a non-zero value.
Errors
Under the following conditions, FVFTOS() fails and sets FML-STATUS to:
The buffer does not begin on the proper boundary.
The buffer is not a fielded buffer or has not been initialized by FINIT().
One of the arguments to the function invoked was invalid.
An Associated Count Member should not be a negative value while transferring data from a COBOL record to a fielded buffer.
The view description VIEWNAME was not found in the files specified by VIEWDIR or VIEWFILES.
See Also
Introduction to FML Functions, viewfile(5)
![]() |
![]() |
![]() |
![]() |
||
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |