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

448 AppendixA
SAMPLE PROGRAMS
FORTRAN 77
+ "**** Routine: Setup For Work - Forms File Open"
CALL GET_ERROR_MESSAGE
END IF
END IF
!
! Open the Terminal.
!
IF (STOP NOW.EQ.0) THEN
FILENAME = "HPTERM"
!
CALL VOPENTERM (COMAREA,
+ FILENAME)
!
IF (CSTATUS.NE.0) THEN
STOP_NOW = 1
ERROR_LOCATION =
+ "**** Routine: Setup For Work - Terminal Setup"
CALL GET_ERROR_MESSAGE
END IF
END IF
!
! Translate field names to screen orders.
!
! Three of the fields in the form used by this
! application need to be toggled from "display
! only" to "input allowed". In order to do this,
! we first translate field names to screen orders.
!
IF (STOP_NOW.EQ.0) THEN
!
NUM_ENTRIES = 3
ENTRY_LEN = 9
FORM_NAME = "DEDUCTION"
!
! Note that because the FIELD_NAME element is defined as 18
! characters long, each occurrence of FIELD_NAME overlaps
! the position of each occurrence of the SCREEN_ORDER element
! in the infobuf. Thus setting each FIELD_NAME element to
! a literal that is 16 characters long or Less results in each
! SCREEN_ORDER element being implicitly filled with blanks.
!
FIELD_NAME(1,1) = "BADGE_NUMBER"
!
FIELD_NAME(1,2) = "LAST_NAME"
!
FIELD_NAME(1,3) = "SUR_NAME"
!
! Now determine the length of the entire Fieldinfo buffer.
!
INFOBUFLEN = (NUM_ENTRIES * ENTRY_LEN) + 10
!
CALL VGETFIELDINFO (COMAREA,
+ FIELDINFO,
+ INFOBUFLEN)
!
IF (CSTATUS.NE.0) THEN
STOP_NOW = 1