HP 3000 Manuals

VREADBATCH [ HP Data Entry and Forms Management System (VPLUS/V) ] MPE/iX 5.0 Documentation


HP Data Entry and Forms Management System (VPLUS/V)

VREADBATCH 

Reads contents of current batch record into data buffer in memory.

Syntax 

              VREADBATCH {comarea}

Parameters 

comarea          Must be comarea name used when the batch file was opened
                 with VOPENBATCH. If not already set, the following
                 comarea items must be set before calling VREADBATCH:

                 cstatus          Set to zero.

                 comarealen       Set to total number of two-byte words
                                  in comarea.

                 recnum           Set to the number of the record in the
                                  open batch file from which data is to
                                  be read (records are numbered from
                                  zero).

                 VREADBATCH may set the following comarea items:

                 nfname           Set to the name of the form associated
                                  with the data read from the batch file
                                  (used by VGETNEXTFORM to retrieve this
                                  form from forms file).

                 dbuflen          Set to length of data buffer (in bytes)
                                  based on length of data read from batch
                                  record.

                 deleteflag       Set to TRUE (all ones) if delete flag
                                  in batch record indicates record is
                                  deleted; set to FALSE (all zeros)
                                  otherwise.

                 cstatus          Set to nonzero value if call
                                  unsuccessful.

                 filerrnum        Set to file error code if MPE file
                                  error.

Discussion 

Use of this intrinsic is demonstrated by the browse/modify mode of ENTRY.
It enables a user to view the data in the batch file.  VREADBATCH may
also be used to bring the data from a batch file into the data buffer so
that it can be retrieved by an application with the VGETBUFFER,
VGETFIELD, or VGETtype intrinsics.

To display the data just read onto its associated form, VGETNEXTFORM must
be called before the call to VSHOWFORM.

VREADBATCH reads the record (recnum) in the batch file opened by
VOPENBATCH. The record is read into memory, where VREADBATCH extracts the
batch record control information (refer to the VOPENBATCH description).
This information includes the current form name which is moved to nfname,
the delete flag which is moved to deleteflag, and the data length in
bytes which is moved to dbuflen.  The data buffer is not updated if the
deleteflag has been set.

In order to use VREADBATCH, the batch file must be on a direct-access
device and must be created with fixed-length records, not variable-length
records.

Example 

COBOL

           CALL "VREADBATCH" USING COMAREA.

BASIC

           175 CALL VREADBATCH(C(*))

FORTRAN

           CALL VREADBATCH(COMAREA)

SPL/PASCAL

           VREADBATCH (COMAREA);

The calls shown above read the batch record specified by recnum update
the comarea according to the batch record information stored with the
data, and put the data in the data buffer in memory.



MPE/iX 5.0 Documentation