source: WorldVistAEHR/trunk/r/REGISTRATION-DGQE-DG-DPT-GRPX-VAD-VAF-VAS-VAT-VAU--VA-VIC--DGBT--DGJ--DGYA--VALM/DGA4002.m@ 691

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

initial load of WorldVistAEHR

File size: 2.3 KB
RevLine 
[613]1DGA4002 ;ALB/MRL - CHECK PROGRESS OF JOB ;01 JAN 1988@2300
2 ;;5.3;Registration;;Aug 13, 1993
3 ;S DGE=0,IOP=$S($D(ION):ION,1:IO) D ^%ZIS K IOP S DGRUN=$S($D(^DG(43,1,"AMIS")):^("AMIS"),1:0) I DGRUN=0 W:DGWR !,"AMIS 401-420 options have never been used!",*7 G PARQ
4 S DGE=0 S DGRUN=$S($D(^DG(43,1,"AMIS")):^("AMIS"),1:0) I DGRUN=0 W:DGWR !,"AMIS 401-420 options have never been used!",*7 G PARQ
5 S DGRUN=$S($D(^DG(43,1,"AMIS")):^("AMIS"),1:0) I DGRUN=0 W:DGWR !,"AMIS 401-420 options have never been used!",*7 G PARQ
6 S DGTSK=$P(DGRUN,"^",3),DGU=$S($D(^VA(200,+$P(DGRUN,"^",4),0)):$P(^(0),"^",1),1:"UNKNOWN USER")
7 I +DGTSK>0 D QCHK G PARQ:DGE,DGA4002:'DGTSK
8 S X(1)=$P(DGRUN,"^",1),X(2)=$P(DGRUN,"^",2),X(3)=+$P(DGRUN,"^",5) I X(1)="",X(2)="" W:DGWR !,"AMIS 401-420 options have never been run..." G PARQ
9 I X(1),'X(2) G RUN
10 I X(1)'>X(2),'X(3) S Y=X(1) X ^DD("DD") W:DGWR !,"Option last run ",Y," and completed " S Y=X(2) X ^DD("DD") D:DGWR DONE G PARQ
11 ;
12RUN S Y=X(1) X ^DD("DD") W:DGWR !,"Option has been running since " D:DGWR DONE S DGE=1
13 ;
14PARQ K DGWR,DGTSK,DGTSK1,DGWHEN,X,X1,DGTIME,DGDATE,C,DGRUN,DGU,Y Q
15QCHK S ZTSK=DGTSK D ISQED^%ZTLOAD Q:'ZTSK(0) W:DGWR !,"This report has been queued - the task number is "_ZTSK
16DEL W:DGWR !,"DO YOU WANT TO STOP THIS JOB FROM RUNNING" S %=2 D YN^DICN I %=-1!(%=2) W:DGWR !,"Job remains queued" S DGE=1 Q
17 I '% W ?4,"YES - If you want to stop this job from starting.",!?4,"NO - If you still want this job to run.",! G DEL
18 S ZTSK=DGTSK D KILL^%ZTLOAD W:DGWR !,"... deleted" S $P(DGRUN,"^",3)="",DGTSK=0,DGE=1 Q
19 ;
20DAT S %H=X D YMD^%DTC S X1=$P(%H,",",2),X=X+(X1\3600/100)+(X1\60#60/10000),Y=X X ^DD("DD") K %H Q
21 ;
22DONE W Y,".",!,"Run by ",DGU," for ",$S($P(DGRUN,"^",6)]"":$P(DGRUN,"^",6),1:"UNKNOWN") Q
23 ;
24QUIT D UP^DGA4001
25QUIT1 K %,%DT,C,D,D1,DA,DFN,DFN1,DG,DGA,DGA1,DGAD,DGAE,DGAE1,DGAL,DGAN,DGAP,DGBLK,DGC,DGCODFLG,DGCT,DGDATA,DGATA1,DGDATE,DGDD,DGDEV,DGDISLO,DGDIV,DGDV,DGE,DGEN,DGFL,DGFLG,DGH,DGHOME,DGI,DGI1,DGL,DGL1,DGN,DGN1,DGO,DGP,DGPGM,DGPR,DGQUIT,DGREG
26 K DGA,DGCODFLG,DGDEV,DGFLG,DGII,DGL,DGL1,DGLAB,DGUB,DGWIDTH,DGXI
27 K DGCTEOM,DGRUN,DGS,DGSEG,DGSEGR,DGTASK,DGTEXT,DGTIME,DGTSK,DGTSK1,DGU,DGUB,DGVAR,DGWHEN,DGWR,DGX,DGX1,DGX2,DGX3,DGXXXD,DGZ,DGZ1,DGZ2,DIC,DINUM,I,I1,I2,I3,I4,J,N,X,X1,X2,X3,XMDUZ,XMSUB,XMTEXT,XMY,Y,^UTILITY($J) D CLOSE^DGUTQ
28 D ENDREP^DGUTL
29 Q
Note: See TracBrowser for help on using the repository browser.