User Tools

Site Tools


cdc:nos2.source:nam5871:dlrt

Table of Contents

DLRT

Table Of Contents

  • [00004] PROC DLRT(CL$TIME, RT$TIME)

Source Code

DLRT.txt
  1. *DECK DLRT
  2. USETEXT DLFPDEF
  3. USETEXT OUTCDA
  4. PROC DLRT(CL$TIME, RT$TIME); # COMPUTE RT FOR NEXT OCCURRENCE OF CLOCK #
  5. *IF DEF,IMS
  6. #
  7. *1DC DLRT
  8. *
  9. * 1. PROC NAME AUTHOR DATE
  10. * DLRT P.C.TAM 79/01/08
  11. *
  12. * 2. FUNCTIONAL DESCRIPTIONS.
  13. * COMPUTE REAL TIME FOR NEXT OCCURRENCES OF GIVEN CLOCK TIME.
  14. *
  15. * 3. METHOD USED.
  16. * CONVERT INITIAL CLOCK TIME TO THE NUMBER OF SECONDS.
  17. * CONVERT NEW CLOCK TIME TO THE NUMBER OF SECONDS
  18. * SUBTRACT NEW CLOCK TIME FROM INITIAL CLOCK TIME USING
  19. * SECONDS VALUES.
  20. *
  21. * 4. INPUT PARAMETERS.
  22. * CL$TIME INPUT CLOCK TIME
  23. * IN HHMMSS0 FORMAT
  24. * SCLHHMMSS START TIME
  25. * IN 0HH.MM.SS. FORMAT
  26. *
  27. * 5. OUTPUT PARAMETERS.
  28. * RT$TIME CORRESPONDING DIFFERENCE IN MILLISECS
  29. *
  30. * 6. COMDECKS CALLED AND SYMPL TEXTS USED.
  31. * DLFPDEF OUTCDA
  32. *
  33. * 7. ROUTINES CALLED.
  34. * NONE
  35. *
  36. * 8. DAYFILE MESSAGES.
  37. * NONE
  38. *
  39.  #
  40. *ENDIF
  41. #
  42.   EXTERNAL VARIABLES
  43. #
  44. # NONE #
  45. #
  46.   INTERNAL VARIABLES
  47. #
  48. ITEM
  49. CL$TIME I, # INPUT CLOCK TIME #
  50. RT$TIME I, # OUTPUT CORRESPONDING DIFFERENCE #
  51. HH I, # HOUR FIELD #
  52. HH2 I, # HOUR FIELD #
  53. MM I, # MINUTE FIELD #
  54. MM2 I, # MINUTE FIELD #
  55. SECS I, # CLOCK TIME CONVERTED TO SECONDS #
  56. SECS2 I, # CLOCK TIME CONVERTED TO SECONDS #
  57. SS I, # SECONDS FIELD #
  58. SS2 I, # SECONDS FIELD #
  59. TEMP1 I; # TEMPORARY VARIABLE #
  60. # ******************************************************************** #
  61. BEGIN
  62. HH = (C<0,1>CL$TIME - O"33") * 10 +
  63. C<1,1>CL$TIME - O"33";
  64. MM = (C<2,1>CL$TIME - O"33") * 10 +
  65. C<3,1>CL$TIME - O"33";
  66. SS = (C<4,1>CL$TIME - O"33") * 10 +
  67. C<5,1>CL$TIME - O"33";
  68. SECS = (HH * 60 + MM) * 60 + SS;
  69. HH2 = (C<1,1>SCLHHMMSS - O"33") * 10 +
  70. C<2,1>SCLHHMMSS - O"33";
  71. MM2 = (C<4,1>SCLHHMMSS - O"33") * 10 +
  72. C<5,1>SCLHHMMSS - O"33";
  73. SS2 = (C<7,1>SCLHHMMSS - O"33") * 10 +
  74. C<8,1>SCLHHMMSS - O"33";
  75. SECS2 = (HH2 * 60 + MM2) * 60 + SS2;
  76. TEMP1 = SECS - SECS2;
  77. RT$TIME = TEMP1 * 1000;
  78. RETURN;
  79. END
  80. TERM
cdc/nos2.source/nam5871/dlrt.txt ยท Last modified: 2023/08/05 17:22 by Site Administrator