C** Program bridge.f
C
C Program bridge converts input 2-digit base
C 10 year data into 2-digit base hexadeicmal
C data where the century is computed using a
C fixed window subroutine, window with a pivot
C value of 3.
C
C The logic of window is
C
C if y >= ipivot y -> y
C if y < ipivot y-> y+100
C
C where ipivot = 3
C
C Ipivot =3 defines the window from 1903-2002.
C
C The resulting hexadeciaml 2-digit year values
C are printed to file output.dat. File output.dat
C then can be used as input to samp1comp.f which
C assumes input data to be 2-digit hexadecimal
C year values.
C
C Program bridge.f reads in 4 lines of data
C consisting of:
C
C Name1
C Birthdate1
C Name2
C Birthdate2
C
C
C where all entries are character strings and
C the birthdates are in date format: MMDDYY.
C Input is keyboard input or from a file via
C redirection.
C
C Example:
C
C John Smith
C 991201
C Joe Public
C 981131
C
C The program prints the input data to file
C output.dat but with the 2-digit year values
C in hexadeciaml.
character*20 name1, name2
character*6 date1, date2
integer y1,y2
open (3,file='output.dat')
read(5,'(a)')name1
read (5,'(a)')date1
read(5,'(a)')name2
read (5,'(a)')date2
read(date1,'(3i2)')m1,d1,y1
read(date2,'(3i2)')m2,d2,y2
call window(y1,3)
call window(y2,3)
print *, y1
print *, y2
write(date1,'(2i2,z2)')m1,d1,y1
write(date2,'(2i2,z2)')m2,d2,y2
write(3,'(a)')name1,date1,name2,date2
close(2)
close(3)
end
subroutine window (y,ipivot)
integer y
if(y.ge.ipivot) then
y = y
else
y = y + 100
endif
return
end