BCHEXEOJ ; IHS/CMI/LAB - Clean upand EOJ for export ;
;;2.0;IHS RPMS CHR SYSTEM;;OCT 23, 2012;Build 27
I $D(BCH("ERROR COUNT")),BCH("ERROR COUNT") W:'$D(ZTQUEUED) !!,"One or more errors were encountered during this run!",!
K BCHS,BCHO,BCHV,BCHT,BCH,BCHR,BCHRTYPE,BCHAFF,BCHC,BCHCOM,BCHDISC,BCHDUZ2,BCHE,BCHINI,BCHLOC,BCHNAME,BCHPAT,BCHREC,BCHTMP,BCHX,BCHAGE,BCHPOVD,BCHCPOV
K DIC,DIR,D0,D,DQ
K APCDOVRR,BCHTX
K AUPNDOB,AUPNDOD,AUPNPAT,AUPNSEX,AUPNVSIT,AUPNDAYS
K BCHBS,BCHCNT,BCHCNTL,BCHCNT1,BCHCNT2,BCHCNTR
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 ^BCHREDO ***
Q:$D(ZTQUEUED)
S B=BCH("BT")
S E=$HOROLOG
S T=(86400*($P(E,",")-$P(B,",")))+($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
;
BCHEXEOJ ; IHS/CMI/LAB - Clean upand EOJ for export ;
+1 ;;2.0;IHS RPMS CHR SYSTEM;;OCT 23, 2012;Build 27
+2 IF $DATA(BCH("ERROR COUNT"))
IF BCH("ERROR COUNT")
IF '$DATA(ZTQUEUED)
WRITE !!,"One or more errors were encountered during this run!",!
+3 KILL BCHS,BCHO,BCHV,BCHT,BCH,BCHR,BCHRTYPE,BCHAFF,BCHC,BCHCOM,BCHDISC,BCHDUZ2,BCHE,BCHINI,BCHLOC,BCHNAME,BCHPAT,BCHREC,BCHTMP,BCHX,BCHAGE,BCHPOVD,BCHCPOV
+4 KILL DIC,DIR,D0,D,DQ
+5 KILL APCDOVRR,BCHTX
+6 KILL AUPNDOB,AUPNDOD,AUPNPAT,AUPNSEX,AUPNVSIT,AUPNDAYS
+7 KILL BCHBS,BCHCNT,BCHCNTL,BCHCNT1,BCHCNT2,BCHCNTR
+8 KILL %,%C,%H,%H1,%H2,%I,%Y,D,D0,D1,DA,DI,DIC,DIE,DLAYGO,DQ,DR,I,L,X,Y
+9 IF $DATA(ZTQUEUED)
SET ZTREQ="@"
+10 QUIT
RUNTIME ;EP - SHOW RUN TIME *** CALLED BY ^BCHREDO ***
+1 IF $DATA(ZTQUEUED)
QUIT
+2 SET B=BCH("BT")
+3 SET E=$HOROLOG
+4 SET T=(86400*($PIECE(E,",")-$PIECE(B,",")))+($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 ;