SD106PT ;ALB/SWO POST INSTALL FOR SD*5.3*106;5.23.97
;;5.3;SCHEDULING;**106**;8.13.93
;CHECK %ZTSK FOR APPOINTMENT LIST TASKS SCHEDULED PRIOR
;TO PATCH 106 INSTALLATION AND ADD A "SDCONC" NODE, DEFAULTING VARIABLE
;"SDCONC" TO "C" FOR COUNT
EN ;ENTRY
N A1,A2,CNT1,CNT2,INSTLD,POP,QTIME,RTIME,SPACE,USER
S A1="",(CNT1,CNT2)="",POP=0,U="^",$P(SPACE," ",80)=""
D NOW^%DTC S INSTLD=%H
D BMES^XPDUTL("TASKS THAT WILL BE MODIFIED")
D BMES^XPDUTL("TASK # USER QUEUED TO RUN")
F S A1=$O(^%ZTSK(A1)) Q:A1="" D
. S A2=$G(^%ZTSK(A1,0)),POP=0 I $P(A2,U,1,2)'="START^SDAL" D
. . S CNT1=CNT1+1 S POP=1
. Q:POP S QTIME=$P(A2,U,5)
. I $TR(QTIME,",","")>$TR(INSTLD,",","") Q
. S RTIME=$P(A2,U,6)
. S USER=$P(A2,U,10)
. Q:$G(^%ZTSK(A1,.3,"SDCONC"))'=""
. S ^%ZTSK(A1,.3,"SDCONC")="C"
. D MES^XPDUTL(A1_$E(SPACE,1,9-$L(A1))_USER_$E(SPACE,1,35-$L(USER))_$$HTE^XLFDT(RTIME))
. S CNT2=CNT2+1
D BMES^XPDUTL("TASKS CHECKED : "_$J(CNT1,6))
D MES^XPDUTL("TASKS MODIFIED : "_$S(CNT2>0:$J(CNT2,6),1:$J(0,6)))
EX ;
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HSD106PT 1073 printed Oct 16, 2024@18:45:05 Page 2
SD106PT ;ALB/SWO POST INSTALL FOR SD*5.3*106;5.23.97
+1 ;;5.3;SCHEDULING;**106**;8.13.93
+2 ;CHECK %ZTSK FOR APPOINTMENT LIST TASKS SCHEDULED PRIOR
+3 ;TO PATCH 106 INSTALLATION AND ADD A "SDCONC" NODE, DEFAULTING VARIABLE
+4 ;"SDCONC" TO "C" FOR COUNT
EN ;ENTRY
+1 NEW A1,A2,CNT1,CNT2,INSTLD,POP,QTIME,RTIME,SPACE,USER
+2 SET A1=""
SET (CNT1,CNT2)=""
SET POP=0
SET U="^"
SET $PIECE(SPACE," ",80)=""
+3 DO NOW^%DTC
SET INSTLD=%H
+4 DO BMES^XPDUTL("TASKS THAT WILL BE MODIFIED")
+5 DO BMES^XPDUTL("TASK # USER QUEUED TO RUN")
+6 FOR
SET A1=$ORDER(^%ZTSK(A1))
if A1=""
QUIT
Begin DoDot:1
+7 SET A2=$GET(^%ZTSK(A1,0))
SET POP=0
IF $PIECE(A2,U,1,2)'="START^SDAL"
Begin DoDot:2
+8 SET CNT1=CNT1+1
SET POP=1
End DoDot:2
+9 if POP
QUIT
SET QTIME=$PIECE(A2,U,5)
+10 IF $TRANSLATE(QTIME,",","")>$TRANSLATE(INSTLD,",","")
QUIT
+11 SET RTIME=$PIECE(A2,U,6)
+12 SET USER=$PIECE(A2,U,10)
+13 if $GET(^%ZTSK(A1,.3,"SDCONC"))'=""
QUIT
+14 SET ^%ZTSK(A1,.3,"SDCONC")="C"
+15 DO MES^XPDUTL(A1_$EXTRACT(SPACE,1,9-$LENGTH(A1))_USER_$EXTRACT(SPACE,1,35-$LENGTH(USER))_$$HTE^XLFDT(RTIME))
+16 SET CNT2=CNT2+1
End DoDot:1
+17 DO BMES^XPDUTL("TASKS CHECKED : "_$JUSTIFY(CNT1,6))
+18 DO MES^XPDUTL("TASKS MODIFIED : "_$SELECT(CNT2>0:$JUSTIFY(CNT2,6),1:$JUSTIFY(0,6)))
EX ;
+1 QUIT