SDRPA18 ;BP-OIFO/ESW,SWO - UTILITY ; 10/31/04 6:05pm
;;5.3;Scheduling;**376**;Aug 13, 1993
EN ;Check the 1st and 2nd run for missing ACK's
;BTRAK : ien of batch tracking entry
;V1 : ien of run
;ZNODE : zero node of batch tracking entry
N BTRAK,DA,DIK,RUN,V1,V2,V3,ZNODE
S V1=0 F S V1=$O(^SDWL(409.6,V1)) Q:V1'>0 Q:+$G(^SDWL(409.6,V1,0))>3040514 D
. S BTRAK=0 F S BTRAK=$O(^SDWL(409.6,V1,2,BTRAK)) Q:'BTRAK D
.. S ZNODE=$G(^SDWL(409.6,V1,2,BTRAK,0)) Q:ZNODE=""
.. I $P(ZNODE,"^",4)=""!($P(ZNODE,"^",5)="") D UPD(V1,BTRAK)
.;check the "AE" xref for this run
.F V2="S","N","R" S V3=0 I $D(^SDWL(409.6,"AE",V2,V1)) F S V3=$O(^SDWL(409.6,"AE",V2,V1,V3)) Q:'V3 D
.. S DIK="^SDWL(409.6,"_V1_",1," S DA=V3,DA(1)=V1 D ^DIK
Q
UPD(V1,V2) ;update the missed ACK as AA
;V1 : ien of run
;V2 : ien of batch tracking multiple
N DA,DIE,DR
S DA=V2,DA(1)=V1,DIE="^SDWL(409.6,"_V1_",2,"
S DR=".04///"_$$NOW^XLFDT_";.05///AA"
D ^DIE K DIE
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HSDRPA18 983 printed Dec 13, 2024@03:00:27 Page 2
SDRPA18 ;BP-OIFO/ESW,SWO - UTILITY ; 10/31/04 6:05pm
+1 ;;5.3;Scheduling;**376**;Aug 13, 1993
EN ;Check the 1st and 2nd run for missing ACK's
+1 ;BTRAK : ien of batch tracking entry
+2 ;V1 : ien of run
+3 ;ZNODE : zero node of batch tracking entry
+4 NEW BTRAK,DA,DIK,RUN,V1,V2,V3,ZNODE
+5 SET V1=0
FOR
SET V1=$ORDER(^SDWL(409.6,V1))
if V1'>0
QUIT
if +$GET(^SDWL(409.6,V1,0))>3040514
QUIT
Begin DoDot:1
+6 SET BTRAK=0
FOR
SET BTRAK=$ORDER(^SDWL(409.6,V1,2,BTRAK))
if 'BTRAK
QUIT
Begin DoDot:2
+7 SET ZNODE=$GET(^SDWL(409.6,V1,2,BTRAK,0))
if ZNODE=""
QUIT
+8 IF $PIECE(ZNODE,"^",4)=""!($PIECE(ZNODE,"^",5)="")
DO UPD(V1,BTRAK)
End DoDot:2
+9 ;check the "AE" xref for this run
+10 FOR V2="S","N","R"
SET V3=0
IF $DATA(^SDWL(409.6,"AE",V2,V1))
FOR
SET V3=$ORDER(^SDWL(409.6,"AE",V2,V1,V3))
if 'V3
QUIT
Begin DoDot:2
+11 SET DIK="^SDWL(409.6,"_V1_",1,"
SET DA=V3
SET DA(1)=V1
DO ^DIK
End DoDot:2
End DoDot:1
+12 QUIT
UPD(V1,V2) ;update the missed ACK as AA
+1 ;V1 : ien of run
+2 ;V2 : ien of batch tracking multiple
+3 NEW DA,DIE,DR
+4 SET DA=V2
SET DA(1)=V1
SET DIE="^SDWL(409.6,"_V1_",2,"
+5 SET DR=".04///"_$$NOW^XLFDT_";.05///AA"
+6 DO ^DIE
KILL DIE
+7 QUIT