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

Chapter 6 337
USING VPLUS INTRINSICS
INTRINSIC DESCRIPTIONS
Discussion
Depending on how it is specified, this intrinsic converts integer, double, real, long, packed,
zoned or yymmdd values to the external representation and copies the converted value to a
particular field in the data buffer, right justified. (Note that the exact format depends on
the data type of the destination field.) The destination field is identified by the field
number assigned by FORMSPEC. The field to which the value is copied may be defined as
a numeric field (data type NUM[n], IMPn, or DIG) or as a character field (data type
CHAR).
NOTE
If you are using VPUTBUFFER in conjunction with an ARB, you do not need to
use VPUTtype. VPUTBUFFER performs all the required conversions on the
application data in the buffer.
You can use both VPUTBUFFER with an ARB and VPUTtype calls in the same
program: the
buffercontrol
setting in the
comarea
that controls ARB
processing can be switched on or off for each form.
Note that the field number never changes as long as the field exists. It is not changed when
the position of the field in the form is changed, or its length or other characteristics are
changed. The field number can only be changed with the batch command, RENUMBER, as
described in Section 7. The field number should not be confused the screen order number,
which is the position of the field in the data buffer and is based on the field position within
the form. Thus, the field number provides a way to locate fields regardless of their position.
If the specified field had an error, VPUTtype clears the field's error flag, and decrements
numerrs
.
Refer to Table 6-13. under VGETtype for the format of each of the data types that may be
converted. Note that COBOL does not have type real or long, and BASIC does not have a
double integer data type.
Example
COBOL
77 FIELD-NUM PIC S9(4) COMP.
77 ITEM PIC S9(4) COMP.
:
MOVE 4 TO FIELD-NUM.
MOVE 25 TO ITEM.
CALL "VPUTINT" USING COMAREA, FIELD-NUM, ITEM.
BASIC
260 F1=4
263 I=25
265 CALL VPUTINT(C(*),F1,I)
FORTRAN
FIELD=4
ITEM=25
CALL VPUTINT(COMAREA,FIELD,ITEM)