XUTMSYNC ;ISCSF/RWF - SYNC TASK MANAGMENT ;07/13/94 15:57
;;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
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HXUTMSYNC 799 printed Dec 13, 2024@02:13:39 Page 2
XUTMSYNC ;ISCSF/RWF - SYNC TASK MANAGMENT ;07/13/94 15:57
+1 ;;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