*DECK DLRT USETEXT DLFPDEF USETEXT OUTCDA PROC DLRT(CL$TIME, RT$TIME); # COMPUTE RT FOR NEXT OCCURRENCE OF CLOCK # *IF DEF,IMS # *1DC DLRT * * 1. PROC NAME AUTHOR DATE * DLRT P.C.TAM 79/01/08 * * 2. FUNCTIONAL DESCRIPTIONS. * COMPUTE REAL TIME FOR NEXT OCCURRENCES OF GIVEN CLOCK TIME. * * 3. METHOD USED. * CONVERT INITIAL CLOCK TIME TO THE NUMBER OF SECONDS. * CONVERT NEW CLOCK TIME TO THE NUMBER OF SECONDS * SUBTRACT NEW CLOCK TIME FROM INITIAL CLOCK TIME USING * SECONDS VALUES. * * 4. INPUT PARAMETERS. * CL$TIME INPUT CLOCK TIME * IN HHMMSS0 FORMAT * SCLHHMMSS START TIME * IN 0HH.MM.SS. FORMAT * * 5. OUTPUT PARAMETERS. * RT$TIME CORRESPONDING DIFFERENCE IN MILLISECS * * 6. COMDECKS CALLED AND SYMPL TEXTS USED. * DLFPDEF OUTCDA * * 7. ROUTINES CALLED. * NONE * * 8. DAYFILE MESSAGES. * NONE * # *ENDIF # EXTERNAL VARIABLES # # NONE # # INTERNAL VARIABLES # ITEM CL$TIME I, # INPUT CLOCK TIME # RT$TIME I, # OUTPUT CORRESPONDING DIFFERENCE # HH I, # HOUR FIELD # HH2 I, # HOUR FIELD # MM I, # MINUTE FIELD # MM2 I, # MINUTE FIELD # SECS I, # CLOCK TIME CONVERTED TO SECONDS # SECS2 I, # CLOCK TIME CONVERTED TO SECONDS # SS I, # SECONDS FIELD # SS2 I, # SECONDS FIELD # TEMP1 I; # TEMPORARY VARIABLE # # ******************************************************************** # BEGIN HH = (C<0,1>CL$TIME - O"33") * 10 + C<1,1>CL$TIME - O"33"; MM = (C<2,1>CL$TIME - O"33") * 10 + C<3,1>CL$TIME - O"33"; SS = (C<4,1>CL$TIME - O"33") * 10 + C<5,1>CL$TIME - O"33"; SECS = (HH * 60 + MM) * 60 + SS; HH2 = (C<1,1>SCLHHMMSS - O"33") * 10 + C<2,1>SCLHHMMSS - O"33"; MM2 = (C<4,1>SCLHHMMSS - O"33") * 10 + C<5,1>SCLHHMMSS - O"33"; SS2 = (C<7,1>SCLHHMMSS - O"33") * 10 + C<8,1>SCLHHMMSS - O"33"; SECS2 = (HH2 * 60 + MM2) * 60 + SS2; TEMP1 = SECS - SECS2; RT$TIME = TEMP1 * 1000; RETURN; END TERM