HLPAT76 ;OAKCIOFO/AC POSTINIT ;08/06/2001 21:14
;;1.6;HEALTH LEVEL SEVEN;**76**;JUL 17, 1995
ENTER ; Check for incomplete messages as a result of READ ERRORS
; encountered by the DIRECT CONNECT API.
D BMES^XPDUTL("Post-init will identify all incomplete messages associated with TCP links")
D BMES^XPDUTL("These incomplete messages were a result of Network errors")
D BMES^XPDUTL("encountered by the DIRECT CONNECT API.")
D BMES^XPDUTL("These messages will be removed from the outbound TCP queue.")
D BMES^XPDUTL("Scanning for incomplete messages...")
EN1 ;ENTRY POINT ONE
N HLDA,HLFIRST,HLL,HLLAST,HLTCP,XPDIDTOT
S HLTCP=""
S HLFIRST=+$O(^HLMA("AC","O",0))
I 'HLFIRST D BMES^XPDUTL("No messages in the outbound TCP queue.") Q
S HLLAST=+$O(^HLMA("AC","O","@"),-1)
S XPDIDTOT=HLLAST-HLFIRST+1
F HLL=0:0 S HLL=$O(^HLMA("AC","O",HLL)) Q:HLL'>0 D
.D UPDATE^XPDID(XPDIDTOT-(HLLAST-HLL+1))
.F HLDA=0:0 S HLDA=$O(^HLMA("AC","O",HLL,HLDA)) Q:HLDA'>0 D
..F L +^HLMA(HLDA):1 Q:$T H 1
..I '$D(^HLMA(HLDA,"P")) D STATUS^HLTF0(HLDA,3,,,1)
..L -^HLMA(HLDA)
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HHLPAT76 1092 printed Nov 22, 2024@17:09:48 Page 2
HLPAT76 ;OAKCIOFO/AC POSTINIT ;08/06/2001 21:14
+1 ;;1.6;HEALTH LEVEL SEVEN;**76**;JUL 17, 1995
ENTER ; Check for incomplete messages as a result of READ ERRORS
+1 ; encountered by the DIRECT CONNECT API.
+2 DO BMES^XPDUTL("Post-init will identify all incomplete messages associated with TCP links")
+3 DO BMES^XPDUTL("These incomplete messages were a result of Network errors")
+4 DO BMES^XPDUTL("encountered by the DIRECT CONNECT API.")
+5 DO BMES^XPDUTL("These messages will be removed from the outbound TCP queue.")
+6 DO BMES^XPDUTL("Scanning for incomplete messages...")
EN1 ;ENTRY POINT ONE
+1 NEW HLDA,HLFIRST,HLL,HLLAST,HLTCP,XPDIDTOT
+2 SET HLTCP=""
+3 SET HLFIRST=+$ORDER(^HLMA("AC","O",0))
+4 IF 'HLFIRST
DO BMES^XPDUTL("No messages in the outbound TCP queue.")
QUIT
+5 SET HLLAST=+$ORDER(^HLMA("AC","O","@"),-1)
+6 SET XPDIDTOT=HLLAST-HLFIRST+1
+7 FOR HLL=0:0
SET HLL=$ORDER(^HLMA("AC","O",HLL))
if HLL'>0
QUIT
Begin DoDot:1
+8 DO UPDATE^XPDID(XPDIDTOT-(HLLAST-HLL+1))
+9 FOR HLDA=0:0
SET HLDA=$ORDER(^HLMA("AC","O",HLL,HLDA))
if HLDA'>0
QUIT
Begin DoDot:2
+10 FOR
LOCK +^HLMA(HLDA):1
if $TEST
QUIT
HANG 1
+11 IF '$DATA(^HLMA(HLDA,"P"))
DO STATUS^HLTF0(HLDA,3,,,1)
+12 LOCK -^HLMA(HLDA)
End DoDot:2
End DoDot:1
+13 QUIT