High-Level Screen Management Intrinsic Library Reference Manual (32424-90002)
C- 12
FORTRAN Sample Program
$CONTROL list on, tables on
!
! This application collects employee payroll deduction
! transactions and places the edited transactions into
! a file.
!
! For this application: Enter key = edit and file
! transaction;
!
! f8 = exit application;
!
! all other f keys = redo transaction.
!
! Each transaction entered by the operator is subjected to the
! data edits embedded within the input form.
!
! The application continues to collect transactions until either
! the operator signals to exit or a system error is detected.
!
$TITLE ' Main Program'
!***************************************************************!
! !
! Main Program !
! !
!***************************************************************!
!
PROGRAM FTN77EXMP
!
IMPLICIT NONE
!
COMMON /COM01/ GLOBALPAK
COMMON /COM02/ RETURNPAK
COMMON /COM03/ FORMSFILE
COMMON /COM04/ TERMPAK
COMMON /COM07/ MSGFORWINDOW
COMMON /COM10/ UNUSED_PARM
COMMON /COM101/ ERROR_LOCATION
COMMON /COM102/ STOP_NOW
COMMON /COM103/ DONE_WITH_TXNS
COMMON /COM104/ NBR_TXN_COLLECTED
!
INTEGER*4 GLOBALPAK(79)
INTEGER*4 RETURNPAK(79)
INTEGER*4 FORMSFILE(22)
INTEGER*4 TERMPAK (23)
INTEGER*4 MSGFORWINDOW(21)
INTEGER*4 UNUSED_PARM
CHARACTER*70 ERROR_LOCATION
INTEGER*2 STOP_NOW
INTEGER*2 DONE_WITH_TXNS
INTEGER*2 NBR_TXN_COLLECTED
!
STOP_NOW = 0
DONE_WITH_TXNS = 0
!
NBR_TXN_COLLECTED = 0
!
CALL SETUP_FOR_WORK
!
DO WHILE (STOP_NOW.EQ.0
+ .AND.DONE_WITH_TXNS.EQ.0)
CALL COLLECT_TXNS
END DO
!