ABMDDIE ; IHS/ASDST/DMJ - DIE utility ;
;;2.6;IHS 3P BILLING SYSTEM;;NOV 12, 2009
;Original;TMD;
;
; Routine to generically lock fileman entries prior to
; DIE calls
;
; output vars: ABM("DIE-FAIL") - set to 1 upon failure
;
K ABM("DIE-FAIL")
L +@(DIE_DA_")"):1 G FAIL:'$T
D ^DIE
L -@(DIE_DA_")")
Q
;
FAIL S ABM("DIE-FAIL")=1
Q:$D(ZTQUEUED)
W *7,!!?5,"ERROR: Record ",DA," for ",$P(DIE,"(")," in USE by another USER, try Later!"
Q
ABMDDIE ; IHS/ASDST/DMJ - DIE utility ;
+1 ;;2.6;IHS 3P BILLING SYSTEM;;NOV 12, 2009
+2 ;Original;TMD;
+3 ;
+4 ; Routine to generically lock fileman entries prior to
+5 ; DIE calls
+6 ;
+7 ; output vars: ABM("DIE-FAIL") - set to 1 upon failure
+8 ;
+9 KILL ABM("DIE-FAIL")
+10 LOCK +@(DIE_DA_")"):1
IF '$TEST
GOTO FAIL
+11 DO ^DIE
+12 LOCK -@(DIE_DA_")")
+13 QUIT
+14 ;
FAIL SET ABM("DIE-FAIL")=1
+1 IF $DATA(ZTQUEUED)
QUIT
+2 WRITE *7,!!?5,"ERROR: Record ",DA," for ",$PIECE(DIE,"(")," in USE by another USER, try Later!"
+3 QUIT