HP 3000 Manuals

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


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

VPOSTBATCH 

Protects a user specified portion of the batch file data from a system
crash by posting an end-of-file mark after the last record referenced and
updating the batch file labels.

Syntax 

              VPOSTBATCH     {comarea}

Parameters 

comarea          Must be comarea name specified when the forms file was
                 opened with VOPENFORMF. If not already set, the
                 following comarea items must be set before calling
                 VPOSTBATCH:

                 cstatus          Set to zero.

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

                 VPOSTBATCH will set the following field:

                 cstatus          Set to nonzero if called unsuccessful,
                                  zero if successful.

Discussion 

VPOSTBATCH posts an end-of-file mark after the last record referenced in
the batch file and updates the environmental information found in the
file label.  Refer to the discussion of VOPENBATCH for a description of
the environmental information.

If a system crash or power failure occurs while the batch file is open,
all data before the end-of-file mark is preserved, and data collection
continues from that point.  In ENTRY, VPOSTBATCH is called after every 20
records, though you may extend or shorten this posting interval.  Two
cautions:

a.  Never call VPOSTBATCH while you are in BROWSE mode, or at any time
    when the last record referenced is not the last record in the batch
    file.  If you call this intrinsic when the last record referenced is
    in the middle of the file, VPOSTBATCH posts a mark before the actual
    end of the file, causing all data after this mark to be lost.

b.  The comarea field numrecs, which contains the number of undeleted
    records in the file, may not be restored correctly after a system
    crash if batch records have been deleted since the last call to the
    VPOSTBATCH intrinsic.

Example 

COBOL

          CALL "VPOSTBATCH" USING COMAREA.

BASIC

          290 CALL VPOSTBATCH(C(*))

FORTRAN

          CALL VPOSTBATCH(COMAREA)

SPL/PASCAL

          VPOSTBATCH(COMAREA);



MPE/iX 5.0 Documentation