HP Data Entry and Forms Management System (VPLUS) Reference Manual (32209-90024)
Appendix A 451
SAMPLE PROGRAMS
FORTRAN 77
INTEGER*2 CHANGE_TYPE(4,3)
CHARACTER*4 CHANGE_SPEC(2,3)
EQUIVALENCE (FIELDSPECS (1), FIELD_ID) ,
+ (FIELDSPECS (1), CHANGE_TYPE),
+ (FIELDSPECS (1), CHANGE_SPEC)
INTEGER*2 NUMSPECS
INTEGER*2 FOUND_DATA_ERRS
!
! Setup for and get transaction data entry form.
!
REPEATAPP = 0
FREEZEAPP = 0
!
NFNAME = "DEDUCTION"
!
CALL VGETNEXTFORM (COMAREA)
!
IF (CSTATUS.NE.0) THEN
STOP_ NOW = 1
ERROR_LOCATION =
+ "**** Routine: Collect Transactions - Form Retrieval"
CALL GET_ERROR_MESSAGE
END IF
!
! Toggle three fields in form to "input allowed".
!
! Screen order is indicated to field change intrinsic
! as a negative number.
!
! Change field type is indicated by a 5.
!
! "Input allowed" is indicated by an "O" (for input/output).
!
IF (STOP_NOW.EQ.0) THEN
!
FIELD_ID(1,1) = (SCREEN_ORDER(9,1) * (-1))
CHANGE_TYPE(2,1) = 5
CHANGE_SPEC (2,1) = "O"
!
FIELD ID(1,2) = (SCREEN_ORDER(9,2) * (-1))
CHANGE_TYPE(2,2) = 5
CHANGE_SPEC(2,2) = "O"
!
FIELD_ID(1,3) = (SCREEN_ORDER(9,3) * (-1))
CHANGE_TYPE(2,3) = 5
CHANGE_SPEC(2,3) = "O"
!
NUMSPECS = 3
!
CALL VCHANGEFIELD (COMAREA,
+ FIELDSPECS,
+ NUMSPECS)
!
IF (CSTATUS.NE.0) THEN
STOP_NOW = 1
ERROR_LOCATION =
"**** Routine: Collect Transactions - Field Type Updates"