XUTMTPU ;SEA/RDS - TaskMan: ToolKit, Print For Unschedule ;1/31/96 11:40
;;8.0;KERNEL;**20**;Jul 10, 1995
;
SCHED ;Lookup Tasks In Schedule File
N DIR,X,Y,ZT,ZT1,ZT2,ZT3,ZT4,ZT5,ZT6,ZTF,ZTIOSL,ZTS K ^TMP($J,"XUTMTPU"),ZTSK,DIRUT S ZTSK=0,ZTIOSL=$Y,X=0
S ZT1="" F ZT=0:0 S ZT1=$O(^%ZTSCH(ZT1)),ZT2="" Q:'ZT1 F ZT=0:0 S ZT2=$O(^%ZTSCH(ZT1,ZT2)) Q:ZT2="" S ZTS=ZT2 D DISPLAY G QUIT:$D(DIRUT)
S ZT1="" F ZT=0:0 S ZT1=$O(^%ZTSCH("IO",ZT1)),ZT2="" Q:ZT1="" F ZT=0:0 S ZT2=$O(^%ZTSCH("IO",ZT1,ZT2)),ZT3="" Q:ZT2="" F ZT=0:0 S ZT3=$O(^%ZTSCH("IO",ZT1,ZT2,ZT3)) Q:ZT3="" S ZTS=ZT3 D DISPLAY G QUIT:$D(DIRUT)
S ZT1="" F ZT=0:0 S ZT1=$O(^%ZTSCH("JOB",ZT1)),ZT2="" Q:ZT1="" F ZT=0:0 S ZT2=$O(^%ZTSCH("JOB",ZT1,ZT2)) Q:ZT2="" S ZTS=ZT2 D DISPLAY G QUIT:$D(DIRUT)
S ZT1="" F ZT=0:0 S ZT1=$O(^%ZTSCH("LINK",ZT1)),ZT2="" Q:ZT1="" F ZT=0:0 S ZT2=$O(^%ZTSCH("LINK",ZT1,ZT2)),ZT3="" Q:ZT2="" F ZT=0:0 S ZT3=$O(^%ZTSCH("LINK",ZT1,ZT2,ZT3)) Q:ZT3="" S ZTS=ZT3 D DISPLAY G QUIT:$D(DIRUT)
I ZTSK W !
;
QUIT ;Cleanup And Quit
K ^TMP($J,"XUTMTPU") Q
;
DISPLAY ;Add Either One Or Zero To The Count Of Scheduled Tasks In List
;
D2 ;First Screen By Whether Task Has Already Been Counted
I $D(^TMP($J,"XUTMTPU",ZTS))#2 Q
;
D5 ;Then Screen by Whether Task Is Within Range
I '$D(^TMP($J,"XUTMT",ZTS)) S ZT5=$O(^TMP($J,"XUTMT",ZTS)) Q:ZT5="" S ZT6=$O(^(ZT5,"")) Q:ZT6>ZTS!'ZT6
;
D8 ;Finally Screen By Whether User Has Authority To Select Task
N X
I 'ZTKEY S X=$G(^%ZTSK(ZTS)) I $S(X="":1,$P(X,U,11)_","_$P(X,U,12)=XUTMUCI:DUZ'=$P(X,U,3),1:ZTNAME'=$P(X,U,10)) Q
;
D12 ;Display And Count Tasks Not Screened Out
S ^TMP($J,"XUTMTPU",ZTS)="",ZTSK=ZTSK+1
N XUTMT,ZTSK S ZTF=0,X=0 D EN^XUTMTP(ZTS)
W !,"-------------------------------------------------------------------------------"
I $Y-ZTIOSL>18 S ZTF=1,ZTIOSL=0,DIR(0)="E" D ^DIR Q:$D(DIRUT) W @IOF
Q
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HXUTMTPU 1889 printed Dec 13, 2024@02:13:55 Page 2
XUTMTPU ;SEA/RDS - TaskMan: ToolKit, Print For Unschedule ;1/31/96 11:40
+1 ;;8.0;KERNEL;**20**;Jul 10, 1995
+2 ;
SCHED ;Lookup Tasks In Schedule File
+1 NEW DIR,X,Y,ZT,ZT1,ZT2,ZT3,ZT4,ZT5,ZT6,ZTF,ZTIOSL,ZTS
KILL ^TMP($JOB,"XUTMTPU"),ZTSK,DIRUT
SET ZTSK=0
SET ZTIOSL=$Y
SET X=0
+2 SET ZT1=""
FOR ZT=0:0
SET ZT1=$ORDER(^%ZTSCH(ZT1))
SET ZT2=""
if 'ZT1
QUIT
FOR ZT=0:0
SET ZT2=$ORDER(^%ZTSCH(ZT1,ZT2))
if ZT2=""
QUIT
SET ZTS=ZT2
DO DISPLAY
if $DATA(DIRUT)
GOTO QUIT
+3 SET ZT1=""
FOR ZT=0:0
SET ZT1=$ORDER(^%ZTSCH("IO",ZT1))
SET ZT2=""
if ZT1=""
QUIT
FOR ZT=0:0
SET ZT2=$ORDER(^%ZTSCH("IO",ZT1,ZT2))
SET ZT3=""
if ZT2=""
QUIT
FOR ZT=0:0
SET ZT3=$ORDER(^%ZTSCH("IO",ZT1,ZT2,ZT3))
if ZT3=""
QUIT
SET ZTS=ZT3
DO DISPLAY
if $DATA(DIRUT)
GOTO QUIT
+4 SET ZT1=""
FOR ZT=0:0
SET ZT1=$ORDER(^%ZTSCH("JOB",ZT1))
SET ZT2=""
if ZT1=""
QUIT
FOR ZT=0:0
SET ZT2=$ORDER(^%ZTSCH("JOB",ZT1,ZT2))
if ZT2=""
QUIT
SET ZTS=ZT2
DO DISPLAY
if $DATA(DIRUT)
GOTO QUIT
+5 SET ZT1=""
FOR ZT=0:0
SET ZT1=$ORDER(^%ZTSCH("LINK",ZT1))
SET ZT2=""
if ZT1=""
QUIT
FOR ZT=0:0
SET ZT2=$ORDER(^%ZTSCH("LINK",ZT1,ZT2))
SET ZT3=""
if ZT2=""
QUIT
FOR ZT=0:0
SET ZT3=$ORDER(^%ZTSCH("LINK",ZT1,ZT2,ZT3))
if ZT3=""
QUIT
SET ZTS=ZT3
DO DISPLAY
if $DATA(DIRUT)
GOTO QUIT
+6 IF ZTSK
WRITE !
+7 ;
QUIT ;Cleanup And Quit
+1 KILL ^TMP($JOB,"XUTMTPU")
QUIT
+2 ;
DISPLAY ;Add Either One Or Zero To The Count Of Scheduled Tasks In List
+1 ;
D2 ;First Screen By Whether Task Has Already Been Counted
+1 IF $DATA(^TMP($JOB,"XUTMTPU",ZTS))#2
QUIT
+2 ;
D5 ;Then Screen by Whether Task Is Within Range
+1 IF '$DATA(^TMP($JOB,"XUTMT",ZTS))
SET ZT5=$ORDER(^TMP($JOB,"XUTMT",ZTS))
if ZT5=""
QUIT
SET ZT6=$ORDER(^(ZT5,""))
if ZT6>ZTS!'ZT6
QUIT
+2 ;
D8 ;Finally Screen By Whether User Has Authority To Select Task
+1 NEW X
+2 IF 'ZTKEY
SET X=$GET(^%ZTSK(ZTS))
IF $SELECT(X="":1,$PIECE(X,U,11)_","_$PIECE(X,U,12)=XUTMUCI:DUZ'=$PIECE(X,U,3),1:ZTNAME'=$PIECE(X,U,10))
QUIT
+3 ;
D12 ;Display And Count Tasks Not Screened Out
+1 SET ^TMP($JOB,"XUTMTPU",ZTS)=""
SET ZTSK=ZTSK+1
+2 NEW XUTMT,ZTSK
SET ZTF=0
SET X=0
DO EN^XUTMTP(ZTS)
+3 WRITE !,"-------------------------------------------------------------------------------"
+4 IF $Y-ZTIOSL>18
SET ZTF=1
SET ZTIOSL=0
SET DIR(0)="E"
DO ^DIR
if $DATA(DIRUT)
QUIT
WRITE @IOF
+5 QUIT
+6 ;