PRS8SB ;HISC/MRL-DECOMPOSITION, STAND-BY ;3/25/93 10:02
;;4.0;PAID;;Sep 21, 1995
;
;Standby is computed based on hours entered either as part of a
;regularly scheduled tour (scheduled SB) or as an exception. An
;exception would be, for instance, a case where one individual
;substitutes for another who's scheduled. Sleep time is associated
;with the T&L which the employee is assigned to. It can be any
;time (in 15-minute increments) during the day and covers a period
;of 8-hours. When a person is called in during SB the callback is
;entered in the system as OT. No OT is actually paid, however, any
;hours reported during the 8-hour sleeptime period are recorded.
;Sleep time is reduced by the actual number of hours called in until
;the total hits 5 hours. Once that happens then no Sleep Time is
;recorded for that date.
;
;Called by Routines: PRS8AC
;
;B = Standby
;b = OT during Standby (used to figure sleep time)
;
S SBY=1,X=$S(VAR1="C":"B",VAR1="c":"b",1:VAR1)
I 'DOUB,"Cct"[VAR1 Q ;quit if PPI'="W" & OC
S D=$S(T<97:DAY,1:DAY+1) ;proper reporting date
S SB(D)=$G(SB(D))+1 ;increment standby time
Q
;
UP ; --- update counter for standby
S D=0
;
UP1 ; --- standby time update
S D=$O(SB(D)) I D S X=$G(SB(D)) I X S P=34 D SET G UP1
;
UP2 ; --- sleep time
K SL,SB,SBY,ST Q
;
SET ; --- set WK array
I D<1!(D>14) Q
S W=$S(D<8:1,1:2)
S $P(WK(W),"^",P)=$P(WK(W),"^",P)+X Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HPRS8SB 1462 printed Dec 13, 2024@02:22:59 Page 2
PRS8SB ;HISC/MRL-DECOMPOSITION, STAND-BY ;3/25/93 10:02
+1 ;;4.0;PAID;;Sep 21, 1995
+2 ;
+3 ;Standby is computed based on hours entered either as part of a
+4 ;regularly scheduled tour (scheduled SB) or as an exception. An
+5 ;exception would be, for instance, a case where one individual
+6 ;substitutes for another who's scheduled. Sleep time is associated
+7 ;with the T&L which the employee is assigned to. It can be any
+8 ;time (in 15-minute increments) during the day and covers a period
+9 ;of 8-hours. When a person is called in during SB the callback is
+10 ;entered in the system as OT. No OT is actually paid, however, any
+11 ;hours reported during the 8-hour sleeptime period are recorded.
+12 ;Sleep time is reduced by the actual number of hours called in until
+13 ;the total hits 5 hours. Once that happens then no Sleep Time is
+14 ;recorded for that date.
+15 ;
+16 ;Called by Routines: PRS8AC
+17 ;
+18 ;B = Standby
+19 ;b = OT during Standby (used to figure sleep time)
+20 ;
+21 SET SBY=1
SET X=$SELECT(VAR1="C":"B",VAR1="c":"b",1:VAR1)
+22 ;quit if PPI'="W" & OC
IF 'DOUB
IF "Cct"[VAR1
QUIT
+23 ;proper reporting date
SET D=$SELECT(T<97:DAY,1:DAY+1)
+24 ;increment standby time
SET SB(D)=$GET(SB(D))+1
+25 QUIT
+26 ;
UP ; --- update counter for standby
+1 SET D=0
+2 ;
UP1 ; --- standby time update
+1 SET D=$ORDER(SB(D))
IF D
SET X=$GET(SB(D))
IF X
SET P=34
DO SET
GOTO UP1
+2 ;
UP2 ; --- sleep time
+1 KILL SL,SB,SBY,ST
QUIT
+2 ;
SET ; --- set WK array
+1 IF D<1!(D>14)
QUIT
+2 SET W=$SELECT(D<8:1,1:2)
+3 SET $PIECE(WK(W),"^",P)=$PIECE(WK(W),"^",P)+X
QUIT