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

Chapter 6 299
USING VPLUS INTRINSICS
INTRINSIC DESCRIPTIONS
VGETSCPFIELD
Returns information about the cursor position by field number on a VPLUS screen.
Syntax
VGETSCPFIELD {
comarea,fieldnum
}
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 VARMSCP:
cstatus Set to zero.
comarealen Set to total number of two-byte words in comarea. Must be
at least 70 words in length.
fieldnum Two-byte integer variable to which VGETSCPFIELD returns the field
number of the field where the cursor was last positioned when the read
terminated.
Discussion
When VREADFIELDS terminates, the cursor position on the screen is tracked and retrieved
by VGETSCPFIELD. The information contains the field number of the field in which the
cursor was positioned when the read was terminated. No cursor position information is
available if a VREADFIELDS retry occurs.
VGETSCPFIELD returns a -1 in fieldnum if:
The cursor was not positioned within a field when the read terminated.
No cursor position information is available when VGETSCPFIELD is called.
The cursor is positioned within a multi-line field and beyond the first line of the field.
VGETSCPFIELD should be called after each VREADFIELDS since it first retrieves the cursor
position information, then deletes the cursor position information upon procedure
completion.
Example
COBOL
CALL “VGETSCPFIELD” USING COMAREA FIELDNUM.
SPL
VGETSCPFIELD(COMAREA,FIELDNUM;
These examples return the cursor position on the last read in the fieldnum variable.