XUTMR1 ;SEA/RDS - Taskman: Requeue Interface, Part Two ;06/06/95 14:59
;;8.0;KERNEL;;Jul 10, 1995
;
;Continued From XUTMR
;
S ZTPRI="" G:'ZTKEY REQ
PROG ;Programmer Parameters Edit: Partition Size And Priority
K DIR
S DIR(0)="NO^1:10:0",DIR("A")="Task priority: ",DIR("?",1)="Please enter an integer between 1 (low) and 10 (high) to specify the task's",DIR("?")="priority. (Optional)"
S:$P(ZTREC,U,15)]"" DIR("B")=$P(ZTREC,U,15)
D ^DIR K DIR I $L(Y) G NEXT:$D(DIRUT) S:Y>0 ZTPRI=Y
;
REQ ;Dequeue, Modify, And Requeue Task
;
D DQ^%ZTLOAD
S $P(ZTREC,U,3)=DUZ,$P(ZTREC,U,5)=$H,$P(ZTREC,U,6)=ZTDTH,$P(ZTREC,U,15)="",ZTREC2=ZTIO_"^^^^"_$P(ZTREC2,U,5)_"^"
S:ZTCPU]"" $P(ZTREC,U,14)=ZTCPU I ZTKEY,ZTPRI]"" S $P(ZTREC,U,15)=ZTPRI
S ^%ZTSK(ZTSK,0)=ZTREC
K ^%ZTSK(ZTSK,.25),^(.21),^(.26) S:$D(ZTIO("H"))#2 $P(ZTREC2,U,6)=ZTIO("H"),^%ZTSK(ZTSK,.25)=ZTIO("P") S ^%ZTSK(ZTSK,.2)=ZTREC2
K ZTRTN,ZTIO,ZTREC,ZTREC2,ZTREC25
D REQ^%ZTLOAD
W !!!,"Task requeued!" H 1
NEXT L -^%ZTSK(ZTSK)
G LKUP^XUTMR
;
Q ;Cleanup And End Of Taskman Requeue Interface
K %,%DT,%H,%T,%ZTD,%ZTDTH,%ZTI,%ZTIO,%ZTN,%ZTO,%ZTOS,%ZTU,XUTMUCI,%ZTYN,%ZTYND,X,Y,ZTCPU,ZTDTH,ZTIO,ZTKEY,ZTPAR,ZTPRI,ZTREC,ZTREC2,ZTSK
D HOME^%ZIS Q
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HXUTMR1 1240 printed Nov 22, 2024@17:23:42 Page 2
XUTMR1 ;SEA/RDS - Taskman: Requeue Interface, Part Two ;06/06/95 14:59
+1 ;;8.0;KERNEL;;Jul 10, 1995
+2 ;
+3 ;Continued From XUTMR
+4 ;
+5 SET ZTPRI=""
if 'ZTKEY
GOTO REQ
PROG ;Programmer Parameters Edit: Partition Size And Priority
+1 KILL DIR
+2 SET DIR(0)="NO^1:10:0"
SET DIR("A")="Task priority: "
SET DIR("?",1)="Please enter an integer between 1 (low) and 10 (high) to specify the task's"
SET DIR("?")="priority. (Optional)"
+3 if $PIECE(ZTREC,U,15)]""
SET DIR("B")=$PIECE(ZTREC,U,15)
+4 DO ^DIR
KILL DIR
IF $LENGTH(Y)
if $DATA(DIRUT)
GOTO NEXT
if Y>0
SET ZTPRI=Y
+5 ;
REQ ;Dequeue, Modify, And Requeue Task
+1 ;
+2 DO DQ^%ZTLOAD
+3 SET $PIECE(ZTREC,U,3)=DUZ
SET $PIECE(ZTREC,U,5)=$HOROLOG
SET $PIECE(ZTREC,U,6)=ZTDTH
SET $PIECE(ZTREC,U,15)=""
SET ZTREC2=ZTIO_"^^^^"_$PIECE(ZTREC2,U,5)_"^"
+4 if ZTCPU]""
SET $PIECE(ZTREC,U,14)=ZTCPU
IF ZTKEY
IF ZTPRI]""
SET $PIECE(ZTREC,U,15)=ZTPRI
+5 SET ^%ZTSK(ZTSK,0)=ZTREC
+6 KILL ^%ZTSK(ZTSK,.25),^(.21),^(.26)
if $DATA(ZTIO("H"))#2
SET $PIECE(ZTREC2,U,6)=ZTIO("H")
SET ^%ZTSK(ZTSK,.25)=ZTIO("P")
SET ^%ZTSK(ZTSK,.2)=ZTREC2
+7 KILL ZTRTN,ZTIO,ZTREC,ZTREC2,ZTREC25
+8 DO REQ^%ZTLOAD
+9 WRITE !!!,"Task requeued!"
HANG 1
NEXT LOCK -^%ZTSK(ZTSK)
+1 GOTO LKUP^XUTMR
+2 ;
Q ;Cleanup And End Of Taskman Requeue Interface
+1 KILL %,%DT,%H,%T,%ZTD,%ZTDTH,%ZTI,%ZTIO,%ZTN,%ZTO,%ZTOS,%ZTU,XUTMUCI,%ZTYN,%ZTYND,X,Y,ZTCPU,ZTDTH,ZTIO,ZTKEY,ZTPAR,ZTPRI,ZTREC,ZTREC2,ZTSK
+2 DO HOME^%ZIS
QUIT
+3 ;