HP Data Entry and Forms Management System (VPLUS) Reference Manual (32209-90024)
276 Chapter6
USING VPLUS INTRINSICS
INTRINSIC DESCRIPTIONS
Special Considerations
Designers using the ARB feature in VGETBUFFER 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 that VPLUS version B.05.00 or later MUST
be used.
2. Use the VPLUS intrinsic HP32209 in the code. This intrinsic checks to make sure that
you are using the proper VPLUS version. If not, the application should terminate with
an appropriate message.
3. Check offset 65
(bufferstatus)
in the
comarea
on return from VGETBUFFER. Bit 15will
be set to 1 if VGETBUFFER 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 ORDER-ENTRY.
03 PART-NO PIC X(7).
03 DESCR PIC X(12).
03 QTY PIC S9(4).
03 UNIT-PR PIC S9(4)V9(2).
03 TOTL-PR PIC S9(6)V9(2).
:
:
CALL "VGETBUFFER" USING COMAREA, ORDER-ENTRY, DBUFLEN.
BASIC
340 L1=D1 <D1 is the
dbuflen
word in C
350 CALL VGETBUFFER(C(*),D$,L1)
FORTRAN
CALL VGETBUFFER(COMAREA,D1,DBFLEN)
SPL/PASCAL
BYTE ARRAY D1 (0:36) ;
:
:
VGETBUFFER(COMAREA,D1,DBUFLEN);
The examples above transfer the contents of the data buffer in memory to an application.
The current value of
dbuflen
is speciļ¬ed as the user buffer length.