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

268 Chapter6
USING VPLUS INTRINSICS
INTRINSIC DESCRIPTIONS
VERRMSG
Returns a message corresponding to the error number of an edit error or an intrinsic call
error.
Syntax
VERRMSG {
comarea,buffer,buflen,actualen
}
Parameters
comarea
Must be
comarea
named when forms file was opened with VOPENFORMF. If
not already set, the following
comarea
items must be set before calling
VERRMSG:
language
Set to code identifying the programming language of the
calling program.
comarealen
Set to total number of two-byte words in
comarea
.
errfilenum
Contains MPE file number of VPLUS error message file;
should be initialized to zero so that VERRMSG can open the
error message file.
(Note that
cstatus
must not be cleared before calling this intrinsic.)
VERRMSG may set the following
comarea
items:
errfilenum
If initialized to zero, VERRMSG opens VPLUS error message
file and sets
errfilenum
to MPE file number of the opened
file.
buffer
Character string in an application to which message is returned by
VERRMSG. In order to contain the message, this buffer must be defined as at
least 72 bytes long.
buflen
Two-byte integer variable set by an application to the length of the buffer.
actualen
Two-byte integer to which VERRMSG returns the number of bytes in the
message sent to buffer.
Discussion
If an error occurs in an intrinsic call or is detected by a VPLUS edit, a call to VERRMSG
returns the message associated with the error. For an intrinsic call error,
cstatus
is set to
a nonzero value. If
cstatus
indicates an error, VERRMSG returns the text explaining the
type and cause of the error. If VINITFORM, VFIELDEDITS, or VFINISHFORM detects a data
error,
cstatus
is set to zero and
numerrs
is set to a nonzero value. If
numerrs
is set,
VERRMSG returns a custom error message if there is one; otherwise, it returns the VPLUS
error message associated with the edit error number in the VPLUS error message file. The
error message, custom or VPLUS, is returned for the first field flagged in error.
The message describing the error is returned to an application in the area defined by the
buffer
parameter. The message length can be no longer than
buflen
; the actual length of
the message is returned in
actualen
. You can then call VPUTWINDOW to move this message
to the window area of memory for later display at the terminal.