source: WorldVistAEHR/trunk/r/VOLUNTARY_TIMEKEEPING-ABSV/ABSVU3.m@ 949

Last change on this file since 949 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 1.6 KB
Line 
1ABSVU3 ;ALTOONA/CTB SCREEN UPDATE UTILITY PROGRAM ;8/31/95 4:29 PM
2V ;;4.0;VOLUNTARY TIMEKEEPING;**6**;JULY 6, 1994
3PERCENT ;
4 N TIME,RTIME,TTIME,DX,DY,LINE
5 S $P(LINE," ",40)=""
6 S PERCENT=XCOUNT/TREC*100\1
7 I $E(IOST)="C" W CURSOR S XPOS=XPOS+1
8 D
9 . W !
10 . I 'NOCOUNT W XCOUNT," of ",TREC," items processed. "
11 . W $J((PERCENT/1),0,0),"% complete "_$E(LINE,1,15)
12 . S TIME=$P($H,",",2)
13 . S:BTIME>TIME TIME=TIME+86400
14 . S TIME=TIME-BTIME
15 . S TTIME=TIME/(PERCENT*.01),RTIME=TTIME-TIME
16 . D TIME(TTIME,"required")
17 . D TIME(TIME,"elapsed")
18 . D TIME($P(RTIME,"."),"remaining")
19 . I $E(IOST)'="C" QUIT
20 . S DX=XPOS,DY=A
21 . X IOXY
22 . QUIT
23 QUIT
24TIME(X,Y) ;
25 NEW HOURS,MIN,SEC
26 S $P(LINE," ",IOM)=""
27 S HOURS=0,MIN=0,SEC=0
28 I X>3600 S HOURS=X\3600,X=X#3600
29 S MIN=X\60,SEC=$P(X#60,".")
30 W:$E(IOST,1,2)="C-" !
31 W:HOURS HOURS," Hours, "
32 W MIN_" Minutes, "_SEC_" Seconds "_Y_"."_$E(LINE,1,15)
33 Q
34BEGIN ;
35 U IO W @IOF
36 I '$D(NOCOUNT) S NOCOUNT=0
37 S CURSOR="*"
38 I $E(IOST)="C",'$D(ZTQUEUED) S X="IORVON;IORVOFF" D ENDR^%ZISS
39 I $D(IORVON),$D(IORVOFF) S CURSOR=IORVON_" "_IORVOFF
40 S LREC=$S($E(IOST)="C":TREC\80+1,1:TREC\20+1)
41 W !! S X=MESSAGE D MSG^ABSVQ
42 S LINE="---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+"
43 I TREC>79,$E(IOST)="C" W !,?25,"P E R C E N T C O M P L E T E",!!," 10 20 30 40 50 60 70 80 90 100",!,LINE,!
44 I TREC<80,$E(IOST)="C" W !?(TREC-2),"100%",!?TREC,"|"
45 S DA=0,LASTENT=0,XPOS=0,A=$Y,BTIME=$P($H,",",2),XCOUNT=0
46 QUIT
47END ;
48 K X S $P(X," ",40)=""
49 W !!!!,"100% complete."_X,!
50 D KILL^%ZISS
51 K CURSOR,LREC,MESSAGE,TREC,LINE,XPOS,A,BTIME,XCOUNT
52 QUIT
Note: See TracBrowser for help on using the repository browser.