VGETIEEELONG [ Migration Process Guide ] MPE/iX 5.0 Documentation
Migration Process Guide
VGETIEEELONG
The VGETIEEELONG intrinsic copies character-coded data from a specified
field in the form data buffer in memory into an application, converting
the numeric value to IEEE long floating-point format. The syntax and
parameter descriptions for this intrinsic are described below.
VGETIEEELONG {COMAREA,FIELDNUM,VARIABLE}
COMAREA Must be the COMAREA name specified when the forms
file was opened with VOPENFORMF. If not already
set, the following COMAREA items must be set before
calling VGETIEEELONG:
CSTATUS Set to zero.
COMAREALEN Set to total number of 2-byte
words in COMAREA.
VGETIEEELONG may set the following COMAREA fields:
CSTATUS Set to non-zero value if call
is unsuccessful or if field's
error flag is set.
FIELDNUM Two-byte integer variable containing the field
number assigned by FORMSPEC to the field in the
data buffer from which the value is retrieved.
Note that the field identified by FIELDNUM may not
be longer than 80 characters.
VARIABLE Variable of type IEEE long floating-point real
(64-bits) in which the converted value will be
placed.
This intrinsic reads the field identified by its field number from the
data buffer. (Note that this field number is a unique number assigned to
each field by FORMSPEC and is totally independent of the field position
in the data buffer). The field's value must be numeric, but its data
type need not be. That is, numbers in a character type field can be
converted.
The numeric value, stored in the buffer in character-coded form, is
converted to IEEE long format and then moved to the variable in the
application. If errors occur during conversion, CSTATUS is set to an
error code. If the requested field's error flag is set, its value is
moved to the variable, but CSTATUS is set to an error code.
Note that a field's number never changes unless the batch command
RENUMBER is used. It is not changed even if the position of the field in
the form is changed, or its length or other characteristics are changed.
The field number should not be confused with the position of the field in
the data buffer, which is based on the field position within the form.
Thus, the field number provides a way to locate fields regardless of
their position.
The following examples illustrate a call to VGETIEEELONG using common
programming languages:
COBOL:
CALL "VGETIEEELONG" USING COMAREA FIELDNUM VARIABLE.
FORTRAN:
CALL VGETIEEELONG(COMAREA,FIELDNUM,VARIABLE)
Pascal:
VGETIEEELONG(COMAREA,FIELDNUM,VARIABLE);
MPE/iX 5.0 Documentation