ABMDREL0 ; IHS/ASDST/DMJ - PRINTING UTILITIES ;
;;2.6;IHS 3P BILLING SYSTEM;;NOV 12, 2009
;Original;TMD;
CALC ;
I Y=0!(X=0) S Z="**" G COMMA
S Z=(((X/Y)-1)*100),Z=$FN(Z,"+,",1)
COMMA ;
S X=$FN(X,",")
Q
DONE ;EP to print run summary
Q:$D(ABMD("Q"))
I $D(ABMD("ET")) S ABMD("TS")=(86400*($P(ABMD("ET"),",",1)-$P(ABMD("BT"),",",1)))+($P(ABMD("ET"),",",2)-$P(ABMD("BT"),",",2)),ABMD("H")=$P(ABMD("TS")/3600,".",1) S:ABMD("H")="" ABMD("H")=0
S ABMD("TS")=ABMD("TS")-(ABMD("H")*3600),ABMD("M")=$P(ABMD("TS")/60,".",1) S:ABMD("M")="" ABMD("M")=0 S ABMD("TS")=ABMD("TS")-(ABMD("M")*60),ABMD("S")=ABMD("TS") W !!,"RUN TIME (H.M.S): ",ABMD("H"),".",ABMD("M"),".",ABMD("S")
Q
EOJ ;
K %DT,Y,X,ZTSK,ZTQUEUED,POP,ZTIO,DIRUT,DIR
K Z,^TMP("ABMDBRH",ABMD("$J")),ABMD
Q
ABMDREL0 ; IHS/ASDST/DMJ - PRINTING UTILITIES ;
+1 ;;2.6;IHS 3P BILLING SYSTEM;;NOV 12, 2009
+2 ;Original;TMD;
CALC ;
+1 IF Y=0!(X=0)
SET Z="**"
GOTO COMMA
+2 SET Z=(((X/Y)-1)*100)
SET Z=$FNUMBER(Z,"+,",1)
COMMA ;
+1 SET X=$FNUMBER(X,",")
+2 QUIT
DONE ;EP to print run summary
+1 IF $DATA(ABMD("Q"))
QUIT
+2 IF $DATA(ABMD("ET"))
SET ABMD("TS")=(86400*($PIECE(ABMD("ET"),",",1)-$PIECE(ABMD("BT"),",",1)))+($PIECE(ABMD("ET"),",",2)-$PIECE(ABMD("BT"),",",2))
SET ABMD("H")=$PIECE(ABMD("TS")/3600,".",1)
IF ABMD("H")=""
SET ABMD("H")=0
+3 SET ABMD("TS")=ABMD("TS")-(ABMD("H")*3600)
SET ABMD("M")=$PIECE(ABMD("TS")/60,".",1)
IF ABMD("M")=""
SET ABMD("M")=0
SET ABMD("TS")=ABMD("TS")-(ABMD("M")*60)
SET ABMD("S")=ABMD("TS")
WRITE !!,"RUN TIME (H.M.S): ",ABMD("H"),".",ABMD("M"),".",ABMD("S")
+4 QUIT
EOJ ;
+1 KILL %DT,Y,X,ZTSK,ZTQUEUED,POP,ZTIO,DIRUT,DIR
+2 KILL Z,^TMP("ABMDBRH",ABMD("$J")),ABMD
+3 QUIT