User Tools

Site Tools


plato:source:plaopl:datescn

DATESCN

Table Of Contents

Source Code

DATESCN.txt
  1. DATESCN
  2. PROGRAM DATESCN(INPUT,OUTPUT,TAPE1,TAPE4)
  3. **
  4. * TAPE1 = MONTHLY ACCOUNT FILE TO BE SEARCHED
  5. * TAPE4 IS AN OUTPUT FILE ON WHICH TO STORE THE
  6. * BEGINNING AND END DATES FOR EACH RECORD IN THE
  7. * MONTHLY ACCOUNT FILE
  8. *
  9. * SEENBEG = TRUE IF *ABSY* OR *ARSY* HAS BEEN FOUND
  10. * SINCE THE LAST TIME *AESY* WAS FOUND
  11. *
  12. IMPLICIT INTEGER (A-Z)
  13. LOGICAL SEENBEG
  14. DIMENSION ICARD(4)
  15. * WRITE OUT A HEADER
  16. WRITE(4,101)
  17. 101 FORMAT(*BILLING CYCLE DATES*)
  18. *
  19. SEENBEG=.FALSE.
  20. ICARD(4)=0
  21. * READ NEXT RECORD IN THE ACCOUNT FILE; EXIT IF END OF FILE
  22. 111 READ(1,112) (ICARD(I),I=1,3)
  23. 112 FORMAT(A10,10X,A4,3X,A10)
  24. IF(EOF(1)) 500,200
  25. *
  26. * CODE FOR ABSY
  27. *
  28. 200 IF(ICARD(2).NE.10LABSY ) GOTO 300
  29. * IF TWO CONSECUTIVE, THEN NEED TO FAKE AESY
  30. IF(.NOT.SEENBEG) GOTO 201
  31. WRITE (4,210) ICARD(1),ICARD(3),10LAESY
  32. 201 WRITE (4,210) ICARD(1),ICARD(3),ICARD(2)
  33. 210 FORMAT(A10,1X,A8,1X,A4)
  34. SEENBEG=.TRUE.
  35. CALL REMARK(ICARD(3))
  36. GOTO 111
  37. *
  38. * CODE FOR AESY
  39. *
  40. 300 IF(ICARD(2).NE.10LAESY ) GOTO 400
  41. WRITE (4,210) ICARD(1),ICARD(3),ICARD(2)
  42. SEENBEG=.FALSE.
  43. GOTO 111
  44. *
  45. * CODE FOR ARSY
  46. *
  47. 400 IF(ICARD(2).NE.10LARSY ) GOTO 111
  48. * ONLY CARE ABOUT ARSY IF ABSY NOT SEEN AS THIS MEANS THAT
  49. * THE ABSY WAS LOST
  50. IF(SEENBEG) GOTO 111
  51. ICARD(3)=ICARD(3).AND.74777777777777777777B
  52. ICARD(3)=ICARD(3).OR.05000000000000000000B
  53. WRITE (4,401) ICARD(1),ICARD(3),ICARD(2)
  54. 401 FORMAT(A10,1X,R8,1X,A4)
  55. SEENBEG=.TRUE.
  56. CALL REMARK(ICARD(3))
  57. GOTO 111
  58. *
  59. * WRITE ENDING INFORMATION AND THEN EXIT
  60. *
  61. 500 WRITE(4,501)
  62. 501 FORMAT(X,*END OF FILE*)
  63. END
plato/source/plaopl/datescn.txt ยท Last modified: 2023/08/05 18:54 by Site Administrator