HP Data Entry and Forms Management System (VPLUS) Reference Manual (32209-90024)

Chapter 6 335
USING VPLUS INTRINSICS
INTRINSIC DESCRIPTIONS
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 a character string in the application which contains the name of the save
field.
sfbuf a character string in the application whose contents are copied to the save
field in memory.
buflen a two-byte integer variable which specifies the number of bytes in
sfbuf
.
actualen 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
.
If the length of the save field is less than the length specified by
buflen
, the right most
bytes are truncated. Following a successful transfer,
actualen
is set to the actual number
of bytes transferred to the save field in memory.
Note that the contents of the save field as recorded in the forms file is not changed by a call
to VPUTSAVEFIELD. Also VPUTSAVEFIELD does not convert the data moved to the save field
in memory.
Example
COBOL
CALL "VPUTSAVEFIELD" USING COMAREA SFNAME SFBUF BUFLEN ACTLEN.
SPL
VPUTSAVEFIELD(COMAREA,SFNAME,SFBUF,BUFLEN,ACTLEN);
These calls will transfer the contents of the application buffer SFBUF to the save field in
memory specified by SFNAME. If the call is successful ACTLEN will contain the exact number
of bytes transferred.