HP Data Entry and Forms Management System (VPLUS) Reference Manual (32209-90024)
Appendix A 447
SAMPLE PROGRAMS
FORTRAN 77
!
! Init Comarea to all zeros.
!
ARRAY_INDEX = 1
DO WHILE (ARRAY_INDEX.LE.60)
COMAREA(ARRAY_INDEX) = 0
ARRAY_INDEX = ARRAY_INDEX + 1
END DO
!
! Set Language for FORTRAN-77.
!
LANGUAGE = 5
!
! Set Comarealen for 60 words (120 bytes).
!
COMAREALEN = 60
!
! Activate function key labeling.
!
LABELOPTIONS = 1
!
! Disable form background loading on Vreadfields.
!
LOOKAHEAD = 0
!
! Set size of local form storage directory.
!
FORMSTORESIZE = 4
!
! Open the Transaction File:
!
OPEN (UNIT = 10,
+ ENTITY = ’PAYTXN’,
+ ACCESS = ’DIRECT’,
+ RECL = 200,
+ FORM = ’UNFORMATTED’,
+ STATUS = ’NEW’,
+ ERR = 110)
!
GOTO 120
!
110 STOP_NOW = 1
ERROR_LOCATION =
+ "**** Routine: Setup For Work - Open Transaction File"
MSGBUF =
+ "**** File open failed!"
!
! Open the Forms File.
!
120 IF (STOP NOW.EQ.0) THEN
FILENIME = "PAYROLL.WORK.ADMIN"
!
CALL VOPENFORMF (COMAREA,
+ FILENAME)
!
IF (CSTATUS.NE.0) THEN
STOP_NOW = 1
ERROR_LOCATION =