APCPEOJ ; IHS/TUCSON/LAB - Clean up and EOJ AUGUST 14, 1992 ; [ 04/17/02 11:17 AM ]
;;2.0;IHS PCC DATA EXTRACTION SYSTEM;**6**;APR 03, 1998
I $D(APCP("ERROR COUNT")),APCP("ERROR COUNT") W:'$D(ZTQUEUED) !!,"One or more errors were encountered during this run!",!
K APCPS,APCPO,APCPV,APCPT,APCP,APCPE
K APCDOVRR,APCPTX
D KILL^AUPNPAT K AUPNVSIT
D EN^XBVK("APCP")
K %,%C,%H,%H1,%H2,%I,%Y,D,D0,D1,DA,DI,DIC,DIE,DLAYGO,DQ,DR,I,L,X,Y,X1,X2,ZTDESC,ZTDTH,ZTIO,ZTRTN
I $D(ZTQUEUED) S ZTREQ="@"
Q
RUNTIME ;EP - SHOW RUN TIME *** CALLED BY ^APCPREDO ***
Q:$D(ZTQUEUED)
S B=APCP("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
;
APCPEOJ ; IHS/TUCSON/LAB - Clean up and EOJ AUGUST 14, 1992 ; [ 04/17/02 11:17 AM ]
+1 ;;2.0;IHS PCC DATA EXTRACTION SYSTEM;**6**;APR 03, 1998
+2 IF $DATA(APCP("ERROR COUNT"))
IF APCP("ERROR COUNT")
IF '$DATA(ZTQUEUED)
WRITE !!,"One or more errors were encountered during this run!",!
+3 KILL APCPS,APCPO,APCPV,APCPT,APCP,APCPE
+4 KILL APCDOVRR,APCPTX
+5 DO KILL^AUPNPAT
KILL AUPNVSIT
+6 DO EN^XBVK("APCP")
+7 KILL %,%C,%H,%H1,%H2,%I,%Y,D,D0,D1,DA,DI,DIC,DIE,DLAYGO,DQ,DR,I,L,X,Y,X1,X2,ZTDESC,ZTDTH,ZTIO,ZTRTN
+8 IF $DATA(ZTQUEUED)
SET ZTREQ="@"
+9 QUIT
RUNTIME ;EP - SHOW RUN TIME *** CALLED BY ^APCPREDO ***
+1 IF $DATA(ZTQUEUED)
QUIT
+2 SET B=APCP("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 ;