XUTMSYNC ;ISCSF/RWF - SYNC TASK MANAGMENT ;07/13/94 15:57 [ 04/02/2003 8:29 AM ]
;;8.0;KERNEL;**1002,1003,1004,1005,1007**;APR 1, 2003
;;8.0;KERNEL;**163**;Jul 10, 1995
A ;Lookup and clear/restart a sync queue.
;N DIC,DIR,XUFLAG,XUIO,XUDA,X,Y
S DIC="^%ZISL(14.8,",DIC(0)="AEMQ" D ^DIC G:Y'>0 EXIT
S XUDA=+Y,XUIO=$P($P(Y,"^",2),"~"),XUFLAG=$P($P(Y,"^",2),"~",2)
;QUICK HACK TO SHOW DATA
W !,^%ZISL(14.8,XUDA,0),!,$G(^(1))
S DIR(0)="S^Z:ZAP;S:START NEXT;Q:QUIT"
S DIR("A")="What to do with this one:" D ^DIR G:Y="Q" A
G A:Y="Q",ZAP:Y="Z",START:Y="S",EXIT
START ;START, CLEAR AND START NEXT
N IOT S IOT="RES"
S X=$$SYNCFLG^%ZTMS2("D",XUIO,XUFLAG)
D SCHSYNC^%ZTMS2(XUFLAG,XUIO)
W !,"OK"
Q
ZAP ;CLEAR SYNC FLAG AND DELETE QUEUE.
N IOT S IOT="RES"
K ^%ZTSCH("SYNC",XUFLAG,XUIO)
S X=$$SYNCFLG^%ZTMS2("D",XUIO,XUFLAG)
W !,"ZAPPED"
Q
EXIT Q
XUTMSYNC ;ISCSF/RWF - SYNC TASK MANAGMENT ;07/13/94 15:57 [ 04/02/2003 8:29 AM ]
+1 ;;8.0;KERNEL;**1002,1003,1004,1005,1007**;APR 1, 2003
+2 ;;8.0;KERNEL;**163**;Jul 10, 1995
A ;Lookup and clear/restart a sync queue.
+1 ;N DIC,DIR,XUFLAG,XUIO,XUDA,X,Y
+2 SET DIC="^%ZISL(14.8,"
SET DIC(0)="AEMQ"
DO ^DIC
IF Y'>0
GOTO EXIT
+3 SET XUDA=+Y
SET XUIO=$PIECE($PIECE(Y,"^",2),"~")
SET XUFLAG=$PIECE($PIECE(Y,"^",2),"~",2)
+4 ;QUICK HACK TO SHOW DATA
+5 WRITE !,^%ZISL(14.8,XUDA,0),!,$GET(^(1))
+6 SET DIR(0)="S^Z:ZAP;S:START NEXT;Q:QUIT"
+7 SET DIR("A")="What to do with this one:"
DO ^DIR
IF Y="Q"
GOTO A
+8 IF Y="Q"
GOTO A
IF Y="Z"
GOTO ZAP
IF Y="S"
GOTO START
GOTO EXIT
START ;START, CLEAR AND START NEXT
+1 NEW IOT
SET IOT="RES"
+2 SET X=$$SYNCFLG^%ZTMS2("D",XUIO,XUFLAG)
+3 DO SCHSYNC^%ZTMS2(XUFLAG,XUIO)
+4 WRITE !,"OK"
+5 QUIT
ZAP ;CLEAR SYNC FLAG AND DELETE QUEUE.
+1 NEW IOT
SET IOT="RES"
+2 KILL ^%ZTSCH("SYNC",XUFLAG,XUIO)
+3 SET X=$$SYNCFLG^%ZTMS2("D",XUIO,XUFLAG)
+4 WRITE !,"ZAPPED"
+5 QUIT
EXIT QUIT