Communicator 3000 MPE/iX Release 6.0 (Platform Software Release C.60.00) (30216-90269)

188 Chapter 10
Technical Articles
Year 2000 and Other Enhancements in VPLUS
Example
COBOL
CALL "VGETSAVEFIELD" USING COMAREA SFNAME SFBUF BUFLEN ACTLEN.
SPL
VGETSAVEFIELD(COMAREA,SFNAME,SFBUF,BUFLEN,ACTLEN);
These calls will transfer the contents of the save field specified by
SFNAME to SFBUF. If the call is successful, ACTLEN will contain the
exact number of bytes transferred.
Intrinsic VPUTSAVEFIELD
Copies data from an application to the specified save field in memory.
Syntax
VPUTSAVEFIELD {comarea,sfname,sfbuf,buflen,actualen}
Parameters
comarea Must be comarea name specified when the forms file was
opened with VOPENFORMF. If not already set, the
following comarea items must be set before calling
VPUTSAVEFIELD:
cstatus set to zero.
language set to the code identifying the
programming language of the calling
program.
comarealen set to total number of two-byte words in
comarea. Must be at least 70 words in
length.
VPUTSAVEFIELD may set the following comarea item:
cstatus set to nonzero value if call is
unsuccessful.
sfname is a character string in the application which contains
the name of the save field.
sfbuf is a character string in the application whose contents
are copied to the save field in memory.
buflen is a two-byte integer variable which specifies the
number of bytes in sfbuf.
actualen is a two-byte integer variable which specifies the
number of bytes actually moved to the save field in
memory.
Discussion
VPUTSAVEFIELD transfers the contents of the application variable
specified by sfbuf to the save field in memory specified by sfname.