ZTMONH2 ;SEA/RDS-TaskMan: Option, ZTMON, Part 5 (Help Modules) ;11/29/90 11:27 ;
;;7.1;KERNEL;;May 11, 1993
;
ENTRY G ^ZTMON
;
PRINT ;Subroutine--Print A Task
N ZTMT,ZTSK W:'ZTC @IOF,!,ZTH,! W:'ZTF !,"-------------------------------------------------------------------------------"
S X=0,ZTF=0,ZTMT=ZTS,ZTMT(0)="P" D ^ZTMT I $Y>18 W ! S ZTF=1,DIR(0)="E" D ^DIR S X=$D(DTOUT)!$D(DUOUT) Q:X W @IOF
S ZTC=ZTC+1 Q
;
OUT ;Tag for breaking FOR scope to exit early
Q
;
JOB ;Display Job List
N DIR,DIRUT,DTOUT,DUOUT,X,ZT,ZT1,ZT2,ZTC,ZTF,ZTH,ZTS S ZTC=0,ZTF=1,ZTH="Job list..."
S ZT1="" F ZT=0:0 S ZT1=$O(^%ZTSCH("JOB",ZT1)),ZT2=0 Q:ZT1="" F ZT=0:0 S ZT2=$O(^%ZTSCH("JOB",ZT1,ZT2)) Q:'ZT2 S ZTS=ZT2 D PRINT S ZTC=ZTC+1 G OUT:X
I 'ZTC W !!,"The Job List is empty."
W ! S DIR(0)="E",DIR("A")=$S(ZTC:"End of listing. ",1:"")_"Press RETURN to continue" D ^DIR Q
;
TASK ;Display Task List
N DIR,DIRUT,DTOUT,DUOUT,X,ZTC,ZTF,ZTH,ZTS S ZTC=0,ZTF=1,ZTH="Task list..."
F ZTS=0:0 S ZTS=$O(^%ZTSCH("TASK",ZTS)) Q:'ZTS D PRINT S ZTC=ZTC+1 G OUT:X
I 'ZTC W !!,"The Task List is empty."
W ! S DIR(0)="E",DIR("A")=$S(ZTC:"End of listing. ",1:"")_"Press RETURN to continue" D ^DIR Q
;
LINK ;Display Link Lists
N DIR,DIRUT,DTOUT,DUOUT,X,ZT,ZT1,ZT2,ZTC,ZTF,ZTS S ZTC=0,ZTF=1,ZTH="Link lists..."
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)) Q:'ZT2 F ZTS=$O(^%ZTSCH("LINK",ZT1,ZT2,ZTS)) Q:'ZTS D PRINT S ZTC=ZTC+1 G OUT:X
I 'ZTC W !!,"The Link List is empty."
W ! S DIR(0)="E",DIR("A")=$S(ZTC:"End of listing. ",1:"")_"Press RETURN to continue" D ^DIR Q
;
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HZTMONH2 1654 printed Dec 13, 2024@02:16:23 Page 2
ZTMONH2 ;SEA/RDS-TaskMan: Option, ZTMON, Part 5 (Help Modules) ;11/29/90 11:27 ;
+1 ;;7.1;KERNEL;;May 11, 1993
+2 ;
ENTRY GOTO ^ZTMON
+1 ;
PRINT ;Subroutine--Print A Task
+1 NEW ZTMT,ZTSK
if 'ZTC
WRITE @IOF,!,ZTH,!
if 'ZTF
WRITE !,"-------------------------------------------------------------------------------"
+2 SET X=0
SET ZTF=0
SET ZTMT=ZTS
SET ZTMT(0)="P"
DO ^ZTMT
IF $Y>18
WRITE !
SET ZTF=1
SET DIR(0)="E"
DO ^DIR
SET X=$DATA(DTOUT)!$DATA(DUOUT)
if X
QUIT
WRITE @IOF
+3 SET ZTC=ZTC+1
QUIT
+4 ;
OUT ;Tag for breaking FOR scope to exit early
+1 QUIT
+2 ;
JOB ;Display Job List
+1 NEW DIR,DIRUT,DTOUT,DUOUT,X,ZT,ZT1,ZT2,ZTC,ZTF,ZTH,ZTS
SET ZTC=0
SET ZTF=1
SET ZTH="Job list..."
+2 SET ZT1=""
FOR ZT=0:0
SET ZT1=$ORDER(^%ZTSCH("JOB",ZT1))
SET ZT2=0
if ZT1=""
QUIT
FOR ZT=0:0
SET ZT2=$ORDER(^%ZTSCH("JOB",ZT1,ZT2))
if 'ZT2
QUIT
SET ZTS=ZT2
DO PRINT
SET ZTC=ZTC+1
if X
GOTO OUT
+3 IF 'ZTC
WRITE !!,"The Job List is empty."
+4 WRITE !
SET DIR(0)="E"
SET DIR("A")=$SELECT(ZTC:"End of listing. ",1:"")_"Press RETURN to continue"
DO ^DIR
QUIT
+5 ;
TASK ;Display Task List
+1 NEW DIR,DIRUT,DTOUT,DUOUT,X,ZTC,ZTF,ZTH,ZTS
SET ZTC=0
SET ZTF=1
SET ZTH="Task list..."
+2 FOR ZTS=0:0
SET ZTS=$ORDER(^%ZTSCH("TASK",ZTS))
if 'ZTS
QUIT
DO PRINT
SET ZTC=ZTC+1
if X
GOTO OUT
+3 IF 'ZTC
WRITE !!,"The Task List is empty."
+4 WRITE !
SET DIR(0)="E"
SET DIR("A")=$SELECT(ZTC:"End of listing. ",1:"")_"Press RETURN to continue"
DO ^DIR
QUIT
+5 ;
LINK ;Display Link Lists
+1 NEW DIR,DIRUT,DTOUT,DUOUT,X,ZT,ZT1,ZT2,ZTC,ZTF,ZTS
SET ZTC=0
SET ZTF=1
SET ZTH="Link lists..."
+2 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))
if 'ZT2
QUIT
FOR ZTS=$ORDER(^%ZTSCH("LINK",ZT1,ZT2,ZTS))
if 'ZTS
QUIT
DO PRINT
SET ZTC=ZTC+1
if X
GOTO OUT
+3 IF 'ZTC
WRITE !!,"The Link List is empty."
+4 WRITE !
SET DIR(0)="E"
SET DIR("A")=$SELECT(ZTC:"End of listing. ",1:"")_"Press RETURN to continue"
DO ^DIR
QUIT
+5 ;