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

332 Chapter6
USING VPLUS INTRINSICS
INTRINSIC DESCRIPTIONS
the 200 bytes of data moved to the data buffer with VPUTBUFFER.
Fewer bytes than the data buffer can hold may be transferred; the remaining space in the
data buffer is not changed.
The data moved to the data buffer is exactly as it appears in the application buffer. (If you
want the data converted to USASCII in the data buffer, you must use VPUTtype, where
type is the data type of the field in an application.) When the data is displayed, it is moved
to each field in the form in sequence from left to right, top to bottom. If any field being
replaced by user data contained an error, VPUTBUFFER clears the error flag for the field and
decrements
numerrs
.
Special Considerations
Designers using the ARB feature in VPUTBUFFER should be aware that damaging run-time
errors could occur if the application is inadvertently run on a system that has a VPLUS
version earlier than B.05.00.
To prevent this, the designer should do three things:
1. Document the product with a clear warning requiring VPLUS B.05.00 or later.
2. Use the VPLUS intrinsic HP32209 in the code. This intrinsic checks to make sure you
are using the proper VPLUS version. If not, the application should terminate with an
appropriate message.
3. Check offset 65 (
bufferstatus
)inthe
comarea
on return from VPUTBUFFER. Bit 15 will
be set to 1 if VPUTBUFFER performed the conversion successfully. In other words, the
application must check both
status
and
bufferstatus
to be sure that the data was
correctly converted.
Example
COBOL
01 DAT1.
03 FIRSTNAME PIC X(6).
03 LASTNAME PIC X(18).
.
.
.
ACCEPT DAT1.
CALL "VPUTBUFFER" USING COMAREA, DAT1, DBUFLEN.
BASIC
235 L1=24
240 CALL VPUTBUFFER(C(*),D1$,L1)
FORTRAN
CALL VPUTBUFFER(COMAREA,DAT1,DBLEN)
SPL/PASCAL
BYTE ARRAY DAT1(0:23);
VPUTBUFFER(COM1,DAT1,LEN);
The following calls transfer 24 bytes from an application area, DAT 1 to the data buffer. In
this example, the longest
dbuflen
is assumed to be 80 bytes.