home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS 1992 June / SIMTEL_0692.cdr / msdos / batutl / timechek.arc / TIMECHEK.DOC next >
Encoding:
Text File  |  1988-01-19  |  6.8 KB  |  184 lines

  1. .pn 1
  2. .mt 3
  3. .mb 8
  4. .f1                 Centurioε Softwarσ Corp.║ TIMECHEK
  5. .f2                              Pagσ #
  6.                             TIMECHEK
  7.  
  8.                    ß SMILEWAR┼ :-⌐ produc⌠ of
  9.  
  10.                     Centurioε Softwarσ Corp.
  11.                        391╖ GarfielΣ Drive
  12.                     Stonσ Mountain¼ G┴  30083
  13.  
  14.                   OPUS 133/302¼ (404⌐ 296-9681
  15.                2┤ hours¼ Filσ Request≤ ª Downloads
  16.  
  17.                          UpdateΣ 9/22/87
  18.  
  19. TIMECHE╦ ái≤ ácopyright¼ 1987¼ b∙ Centurioε áSoftwarσ áCorp« áanΣ ì
  20. releaseΣ áfo≥ publiπ usσ anΣ distribution«  N∩ áfees¼ ároyalties¼ ì
  21. license≤ arσ required.
  22.  
  23. TIMECHE╦ ái≤ aε outgrowtΦ oµ TIME96«  TIMECHE╦ caε functioε ájus⌠ ì
  24. likσ áTIME9╢ á(i⌠ áha≤ al∞ oµ áTIME96'≤ ácapabilities⌐ áplu≤ áonσ ì
  25. additiona∞ áfeaturσ tha⌠ make≤ i⌠ mucΦ easie≥ t∩ áuse« á TIMECHE╦ ì
  26. check≤ áthσ systeφ clocδ fo≥ thσ timσ oµ day¼ da∙ oµ áweek¼ áetc¼ ì
  27. anΣ exit≤ witΦ aε ERRORLEVE╠ baseΣ oε tha⌠ timσ anΣ thσ argument≤ ì
  28. presenteΣ áwitΦ thσ command«  Fo≥ thσ defaul⌠ mode¼ thσ á2┤ áhou≥ ì
  29. da∙ ái≤ brokeε int∩ 9╢ fifteeε minutσ intervals« á Thus¼ ábetweeε ì
  30. midnigh⌠ (00:00:00⌐ anΣ quarte≥ pas⌠ (00:14:59)¼ timecheδ return≤ ì
  31. aε áerrorleve∞ oµ 1╗ a⌠ 6:00:0░ AM¼ i⌠ return≤ aε áerrorleve∞ áoµ ì
  32. 25¼ a⌠ nooε aε errorleve∞ oµ 49¼ etc«  
  33.  
  34. ThrougΦ usσ oµ thi≤ program¼ ß batcΦ filσ caε d∩ differen⌠ thing≤ ì
  35. baseΣ oε timσ oµ day¼ da∙ oµ week¼ etc«  I⌠ wa≤ writteε t∩ áallo≈ ì
  36. differen⌠ áparameter≤ t∩ bσ passeΣ t∩ OMM═ (thσ Opu≤ Matri° áMai∞ ì
  37. Manager⌐ baseΣ oε thσ time« 
  38.  
  39. .paèThσ á01/18/198╕ versioε oµ TIMECHE╦ ha≤ severa∞ áargument≤ áwhicΦ ì
  40. affec⌠ thσ program'≤ behaviour║ 
  41. .lm 5
  42. .pm 1
  43.  
  44. Q:  an∙ áargumen⌠ ábeginninτ áwitΦ ß -╤ á(quite⌐ ásuppresse≤ áthσ ì
  45. áááágeneratioε oµ thσ copyrigh⌠ anΣ timσ oµ da∙ printout╗ 
  46.  
  47. W:  an∙ argumen⌠ beginninτ witΦ ß -╫ cause≤ TIMECHE╦ t∩ returε aε ì
  48. ááááargumen⌠ baseΣ oε thσ DA┘ O╞ WEE╦ iε placσ oµ thσ TIM┼ O╞ DA┘ ì
  49. áááá(1=Sunday¼ 2=Monday¼ etc.);
  50.  
  51. M:  an∙ áargumen⌠ beginninτ witΦ ß -═ cause≤ timecheδ át∩ áreturε ì
  52. ááááthσ MONT╚ (Jaε ╜ 1¼ etc);
  53.  
  54. D:  an∙ áargumen⌠ beginninτ witΦ ß -─ cause≤ TIMECHE╦ át∩ áreturε ì
  55. ááááthσ da∙ oµ thσ montΦ (ie¼ 9/22/8╖ -╛ 22);
  56.  
  57. Y:  an∙ áargumen⌠ beginninτ witΦ ß -┘ cause≤ TIMECHE╦ át∩ áreturε ì
  58. ááááthσ yea≥ (▓ digit).
  59.  
  60. R:  an∙ argumen⌠ beginninτ witΦ ß -╥ put≤ TIMECHE╦ int∩ thσ RANG┼ ì
  61. áááámode« á Thσ áprograφ wil∞ scaε thσ áremaininτ áargument≤ áanΣ ì
  62. ááááreturε thσ numbe≥ oµ thσ FIRS╘ rangσ tha⌠ matche≤ thσ curren⌠ ì
  63. áááátime«  Range≤ arσ oµ thσ forφ DD:sss≤-eeeσ wherσ D─ i≤ ß átw∩ ì
  64. áááácharacte≥ áda∙ oµ thσ weeδ (SU¼ MO¼ etc)¼ W╦ á(weekdays)¼ áW┼ ì
  65. áááá(weekends⌐ áo≥ A╠ (al∞ days)¼ anΣ sss≤ anΣ eeeσ arσ á┤ ádigi⌠ ì
  66. ááááSTAR╘ anΣ EN─ times«  AL╠ ┤ DIGIT╙ MUS╘ B┼ SUPPLIED.
  67. .cp 10
  68. .lm 1
  69. Thσ M¼ D¼ W¼ ┘ anΣ ╥ option≤ arσ mutuall∙ exclusive¼ anΣ onl∙ thσ ì
  70. LAS╘ onσ entereΣ wil∞ bσ iε effect«  Thesσ argument≤ caε bσ uppe≥ ì
  71. o≥ álowe≥ ácasσ áanΣ mus⌠ bσ precedeΣ b∙ ß ¡ o≥ ß » á[thi≤ ái≤ áß ì
  72. changσ froφ TIME96¼ wherσ thσ ¡ anΣ » werσ optional]«  Al∞ oµ thσ ì
  73. followinτ arσ legal:
  74.  
  75. .pm
  76. TIMECHE╦ W
  77. TIMECHE╦ ╤ m
  78. TIMECHE╦ /╤ /d
  79. TIMECHE╦ ≈ -q
  80. timechek
  81. timecheδ á-≥ al:040░-050░ al:230░-240░ al:000░-070░ ása:000░-240░ ì
  82.                             su:000░-1700
  83.  
  84. (Thσ las⌠ samplσ i≤ to∩ lonτ t∩ fi⌠ oε onσ linσ iε thi≤ document¼ ì
  85. bu⌠ áthσ ásu:000░-170░ ágoe≤ áoε áthσ ásamσ álinσ áa≤ áthσ áothe≥ ì
  86. arguments« á Thi≤ basicall∙ says║ iµ thσ curren⌠ timσ i≤ ábetweeε ì
  87. 040░ áanΣ 0500¼ returε errorleve∞ 1¼ iµ thσ timσ i≤ betweeε á230░ ì
  88. anΣ 240░ returε 2¼ iµ thσ timσ i≤ betweeε midnigh⌠ anΣ 7aφ returε ì
  89. 3¼ iµ i⌠ i≤ Saturda∙ (anΣ no⌠ onσ oµ thσ preceedinτ times⌐ returε ì
  90. ┤ áanΣ iµ i⌠ i≤ Sunda∙ (again¼ no⌠ onσ oµ thσ ápreceedinτ átimes⌐ ì
  91. returε 5«  Thus¼ witΦ onσ command¼ ß BA╘ filσ caε detec⌠ Nationa∞ ì
  92. Mai∞ Hou≥ (errorleve∞ 1⌐ anΣ chea≡ lonτ distancσ rate≤ iε thσ áU╙ ì
  93. (returε álevel≤ á▓-5)«  ┴ errorleve∞ oµ ░ indicate≤ áhighe≥ áthaε ì
  94. minimuφ lonτ distancσ rate≤ anΣ no⌠ NMH.)
  95. .paè.lm 1
  96. .oj off
  97.                  Examplσ Tablσ oµ returε valuesì
  98.  
  99. .lm 15
  100. ááááááááááááááDay   Time    defaul⌠      -╫ option
  101. .rr           L------!-----------#-----------#------R
  102. ááááááááááááááSun    00:00      1           1
  103. ááááááááááááááSun    06:00     25           1
  104. ááááááááááááááSun    12:00     49           1
  105. ááááááááááááááSun    18:00     73           1
  106. ááááááááááááááSun    23:45     96           1
  107.  
  108. ááááááááááááááMon    00:00      1           2
  109. ááááááááááááááMon    06:00     25           2
  110. ááááááááááááááMon    12:00     49           2
  111. ááááááááááááááMon    18:00     73           2
  112.  
  113. ááááááááááááááTue    00:00      1           3
  114. ááááááááááááááWed    00:00      1           4
  115. ááááááááááááááThu    00:00      1           5
  116. ááááááááááááááFri    00:00      1           6
  117. ááááááááááááááSat    00:00      1           7
  118. ááááááááááááááSat    23:45     96           7
  119.  
  120. .RR-!---!---!---!---!---!---!---!---!---!---!---!---!---!---!---R
  121.  
  122. .paèSamplσ usσ ¡ time9╢ compatiblσ runs:
  123. .lm 10
  124. ááááááááátimechek -w
  125. áááááááááiµ errorleve∞ 7 got∩   SATURDAY
  126. áááááááááiµ errorleve∞ 6 got∩   FRIDAY
  127. áááááááááiµ errorleve∞ 5 got∩   THURSDAY
  128. áááááááááiµ errorleve∞ 4 got∩   WEDNESDAY
  129. áááááááááiµ errorleve∞ 3 got∩   TUESDAY
  130. áááááááááiµ errorleve∞ 2 got∩   MONDAY
  131.  
  132. ááááááááá:SUNDAY
  133. áááááááááreφ Sunda∙ i≤ chea≡ unti∞ 5P═ (69)
  134. ááááááááátimechek
  135. áááááááááiµ errorleve∞ 6╣ got∩ OMMMHOLD
  136. ááááááááágot∩ OMMMSEND
  137.  
  138. ááááááááá:MONDAY
  139. ááááááááá:TUESDAY
  140. ááááááááá:WEDNESDAY
  141. ááááááááá:THURSDAY
  142. ááááááááá:FRIDAY
  143. áááááááááreφ 9│ i≤ 23:00¼ 2╣ i≤ 07:0░ ¡ betweeε 7aφ ª ì
  144. áááááááááreφ 1▒ P═ HOL─ al∞ lonτ distance
  145. áááááááááreφ beforσ ╖ anΣ afte≥ 1▒ don'⌠ hold
  146. ááááááááátimechek
  147. áááááááááiµ errorleve∞ 9│ got∩ OMMMSEND
  148. áááááááááiµ errorleve∞ 2╣ got∩ OMMMHOLD
  149. ááááááááágot∩ OMMMSEND
  150.  
  151. ááááááááá:SATURDAY
  152. áááááááááreφ Saturda∙ i≤ ALWAY╙ cheap¼ s∩ senΣ stuff
  153. ááááááááágot∩ OMMMSEND
  154.  
  155. .lm 1
  156. Samplσ ruε ¡ RANG┼ option:
  157. .lm 10
  158. áááááá
  159. ááááááááátimecheδ -≥ al:040░-050░ sa:000░-240░ su:000░-170░ ì
  160. ááááááááá                           al:2300-240░ al:0000-0700
  161. áááááááááiµ errorleve∞ ▓ got∩ OMMMSEND
  162. áááááááááiµ errorleve∞ ▒ got∩ OMMMNMH
  163. ááááááááágot∩ OMMMHOLD
  164.  
  165. .paè.lm 5
  166. .pm 1
  167. .oj on
  168.  
  169. Note≤ anΣ caveats:
  170.  
  171. 1) Thi≤ áprograφ áwa≤ compileΣ witΦ Turb∩ ├ versioε 1.░ áand¼ áa≤ ì
  172. áááásuch¼ ádoesn'⌠ reall∙ understanΣ timσ zones¼ s∩ n∩ timσ ázonσ ì
  173. áááái≤ displayed«  [Thi≤ i≤ ß changσ froφ TIME96.]
  174.  
  175. 2) Thσ á┘ anΣ ╥ option≤ arσ thσ onl∙ option≤ whicΦ caε returε áaε ì
  176. ááááerrorleve∞ oµ ░ (zero)«  Al∞ other≤ returε ß minimuφ oµ ß á1«  ì
  177. ááááN∩ áchecδ ái≤ ámadσ t∩ verif∙ tha⌠ áthσ áclock/calenda≥ ámakσ ì
  178. áááásense║  whateve≥ DO╙ reports¼ that'≤ wha⌠ i≤ returned.
  179.  
  180. 3) Thi≤ prograφ ha≤ beeε testeΣ witΦ P├-DO╙ 3.2░ anΣ M╙-DO╙ 3.21«  ì
  181. ááááOthe≥ áversion≤ áoµ DO╙ shoulΣ worδ fine¼ bu⌠ the∙ áhavσ áno⌠ ì
  182. áááábeeε tested.
  183.  
  184.