AMHEXEOJ ; IHS/CMI/LAB - Clean up and EOJ AUGUST 14, 1992 ;
;;4.0;IHS BEHAVIORAL HEALTH;;MAY 14, 2010
L
I $D(AMH("ERROR COUNT")),AMH("ERROR COUNT") W:'$D(ZTQUEUED) !!,"One or more errors were encountered during this run!",!
K AMHS,AMHO,AMHV,AMHT,AMH,AMHR,AMHRTYPE,AMHAFF,AMHC,AMHCOM,AMHDISC,AMHDUZ2,AMHE,AMHINI,AMHLOC,AMHNAME,AMHPAT,AMHREC,AMHTMP,AMHX
K DIC,DIR,D0,D,DQ
K APCDOVRR,AMHTX
K AUPNDOB,AUPNDOD,AUPNPAT,AUPNSEX,AUPNVSIT,AUPNDAYS
K AMHBS,AMHCNT,AMHCNTL,AMHCNT1,AMHCNT2,AMHCNTR
K %,%C,%H,%H1,%H2,%I,%Y,D,D0,D1,DA,DI,DIC,DIE,DLAYGO,DQ,DR,I,L,X,Y
I $D(ZTQUEUED) S ZTREQ="@"
Q
RUNTIME ;EP - SHOW RUN TIME *** CALLED BY ^AMHREDO ***
Q:$D(ZTQUEUED)
S B=AMH("BT")
S E=$HOROLOG
S T=(86400*($P(E,",",1)-$P(B,",",1)))+($P(E,",",2)-$P(B,",",2)),H=$P(T/3600,".")
S:H="" H=0
S T=T-(H*3600),M=$P(T/60,".")
S:M="" M=0
S T=T-(M*60),S=T
W !!,"RUN TIME (H.M.S): ",H,".",M,".",S
K B,E,H,M,S,T
Q
;
AMHEXEOJ ; IHS/CMI/LAB - Clean up and EOJ AUGUST 14, 1992 ;
+1 ;;4.0;IHS BEHAVIORAL HEALTH;;MAY 14, 2010
+2 LOCK
+3 IF $DATA(AMH("ERROR COUNT"))
IF AMH("ERROR COUNT")
IF '$DATA(ZTQUEUED)
WRITE !!,"One or more errors were encountered during this run!",!
+4 KILL AMHS,AMHO,AMHV,AMHT,AMH,AMHR,AMHRTYPE,AMHAFF,AMHC,AMHCOM,AMHDISC,AMHDUZ2,AMHE,AMHINI,AMHLOC,AMHNAME,AMHPAT,AMHREC,AMHTMP,AMHX
+5 KILL DIC,DIR,D0,D,DQ
+6 KILL APCDOVRR,AMHTX
+7 KILL AUPNDOB,AUPNDOD,AUPNPAT,AUPNSEX,AUPNVSIT,AUPNDAYS
+8 KILL AMHBS,AMHCNT,AMHCNTL,AMHCNT1,AMHCNT2,AMHCNTR
+9 KILL %,%C,%H,%H1,%H2,%I,%Y,D,D0,D1,DA,DI,DIC,DIE,DLAYGO,DQ,DR,I,L,X,Y
+10 IF $DATA(ZTQUEUED)
SET ZTREQ="@"
+11 QUIT
RUNTIME ;EP - SHOW RUN TIME *** CALLED BY ^AMHREDO ***
+1 IF $DATA(ZTQUEUED)
QUIT
+2 SET B=AMH("BT")
+3 SET E=$HOROLOG
+4 SET T=(86400*($PIECE(E,",",1)-$PIECE(B,",",1)))+($PIECE(E,",",2)-$PIECE(B,",",2))
SET H=$PIECE(T/3600,".")
+5 IF H=""
SET H=0
+6 SET T=T-(H*3600)
SET M=$PIECE(T/60,".")
+7 IF M=""
SET M=0
+8 SET T=T-(M*60)
SET S=T
+9 WRITE !!,"RUN TIME (H.M.S): ",H,".",M,".",S
+10 KILL B,E,H,M,S,T
+11 QUIT
+12 ;