- XUTMDQ1 ;SEA/RDS - TaskMan: Option, XUTMDQ, Part 2 (Bulk DQ) ;11/28/90 16:07 ; [ 04/02/2003 8:29 AM ]
- ;;8.0;KERNEL;**1002,1003,1004,1005,1007**;APR 1, 2003
- ;;8.0;KERNEL;;Jul 10, 1995
- ;
- COUNT ;Ask Whether To First Count The Number Of Tasks To Unschedule
- W !
- K DIR
- S DIR(0)="Y"
- S DIR("A")="Would you like to know how many tasks in that list can be unscheduled"
- S DIR("B")="YES"
- S DIR("?")=" Answer NO if you don't want a count of the tasks to be unscheduled."
- D ^DIR
- I $D(DTOUT) W $C(7)
- I $D(DIRUT) W !!?5,"Tasks NOT unscheduled!" Q
- I 'Y G SHOW
- S XUTMT(0)="LU" D ^XUTMT
- W !!?5,"There ",$S(ZTSK=1:"is ",1:"are "),ZTSK," task",$S(ZTSK=1:"",1:"s")," in that list that can be unscheduled."
- I ZTSK=0 Q
- ;
- SHOW ;Ask Whether To Show The Tasks To Be Unscheduled
- W !
- K DIR
- S DIR(0)="Y"
- S DIR("A")="Would you like to see the tasks that will be unscheduled"
- S DIR("B")="YES"
- S DIR("?")=" Answer NO if you don't want to see the tasks to be unscheduled."
- D ^DIR
- I $D(DTOUT) W $C(7)
- I $D(DIRUT) W !!?5,"Tasks NOT unscheduled!" Q
- I 'Y G CONFIRM
- W !
- S XUTMT(0)="PU" D ^XUTMT
- I 'ZTSK W !?5,"There are 0 tasks in that list." Q
- ;
- CONFIRM ;Prompt For Confirmation Of Unscheduling
- K DIR
- S DIR(0)="Y"
- S DIR("A")="Are you sure you want to unschedule these tasks"
- S DIR("B")="NO"
- S DIR("?")=" Answer YES if you want to unschedule the selected tasks."
- D ^DIR
- I $D(DTOUT) W $C(7)
- I 'Y W !!?5,"Tasks NOT unscheduled!" Q
- S XUTMT(0)="UL" D ^XUTMT
- I ZTSK W !!?5,"Tasks unscheduled!"
- I 'ZTSK W !!?5,"There are 0 tasks in that list."
- Q
- ;
- XUTMDQ1 ;SEA/RDS - TaskMan: Option, XUTMDQ, Part 2 (Bulk DQ) ;11/28/90 16:07 ; [ 04/02/2003 8:29 AM ]
- +1 ;;8.0;KERNEL;**1002,1003,1004,1005,1007**;APR 1, 2003
- +2 ;;8.0;KERNEL;;Jul 10, 1995
- +3 ;
- COUNT ;Ask Whether To First Count The Number Of Tasks To Unschedule
- +1 WRITE !
- +2 KILL DIR
- +3 SET DIR(0)="Y"
- +4 SET DIR("A")="Would you like to know how many tasks in that list can be unscheduled"
- +5 SET DIR("B")="YES"
- +6 SET DIR("?")=" Answer NO if you don't want a count of the tasks to be unscheduled."
- +7 DO ^DIR
- +8 IF $DATA(DTOUT)
- WRITE $CHAR(7)
- +9 IF $DATA(DIRUT)
- WRITE !!?5,"Tasks NOT unscheduled!"
- QUIT
- +10 IF 'Y
- GOTO SHOW
- +11 SET XUTMT(0)="LU"
- DO ^XUTMT
- +12 WRITE !!?5,"There ",$SELECT(ZTSK=1:"is ",1:"are "),ZTSK," task",$SELECT(ZTSK=1:"",1:"s")," in that list that can be unscheduled."
- +13 IF ZTSK=0
- QUIT
- +14 ;
- SHOW ;Ask Whether To Show The Tasks To Be Unscheduled
- +1 WRITE !
- +2 KILL DIR
- +3 SET DIR(0)="Y"
- +4 SET DIR("A")="Would you like to see the tasks that will be unscheduled"
- +5 SET DIR("B")="YES"
- +6 SET DIR("?")=" Answer NO if you don't want to see the tasks to be unscheduled."
- +7 DO ^DIR
- +8 IF $DATA(DTOUT)
- WRITE $CHAR(7)
- +9 IF $DATA(DIRUT)
- WRITE !!?5,"Tasks NOT unscheduled!"
- QUIT
- +10 IF 'Y
- GOTO CONFIRM
- +11 WRITE !
- +12 SET XUTMT(0)="PU"
- DO ^XUTMT
- +13 IF 'ZTSK
- WRITE !?5,"There are 0 tasks in that list."
- QUIT
- +14 ;
- CONFIRM ;Prompt For Confirmation Of Unscheduling
- +1 KILL DIR
- +2 SET DIR(0)="Y"
- +3 SET DIR("A")="Are you sure you want to unschedule these tasks"
- +4 SET DIR("B")="NO"
- +5 SET DIR("?")=" Answer YES if you want to unschedule the selected tasks."
- +6 DO ^DIR
- +7 IF $DATA(DTOUT)
- WRITE $CHAR(7)
- +8 IF 'Y
- WRITE !!?5,"Tasks NOT unscheduled!"
- QUIT
- +9 SET XUTMT(0)="UL"
- DO ^XUTMT
- +10 IF ZTSK
- WRITE !!?5,"Tasks unscheduled!"
- +11 IF 'ZTSK
- WRITE !!?5,"There are 0 tasks in that list."
- +12 QUIT
- +13 ;