Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: XUTMRJD1

XUTMRJD1.m

Go to the documentation of this file.
  1. XUTMRJD1 ;SEA/RDS - TaskMan: Option, XURESJOB Exit Action, Part 2 ;11/8/94 09:12
  1. ;;8.0;KERNEL;;Jul 10, 1995
  1. HELP1A ;
  1. ;PROMPT1^XUTMRJD--? help
  1. W !!?5,"Answer yes or no. Enter ?? for more help."
  1. Q
  1. HELP1B ;
  1. ;PROMPT1^XUTMRJD--explain purpose and offer to show Task List
  1. N DIR,DIRUT,DTOUT,DUOUT,X,Y
  1. W !!?5,"If you answer yes, you will be asked to identify the tasks"
  1. W !?5,"you forcibly exited."
  1. W !!?5,"If you answer no, you will exit the option."
  1. W !!?5,"If you are not sure, answer yes. At the next prompt, you"
  1. W !?5,"can enter ?TASK LIST to see the list of tasks TaskMan believes"
  1. W !?5,"are running, which may help you identify tasks you may have"
  1. W !?5,"forcibly exited."
  1. Q
  1. HELP2A ;
  1. ;PROMPT2^XUTMRJD--? help
  1. I $D(ZTSCREEN) K ZTSCREEN Q
  1. W !!?5,"Answer must be the internal number(s) of the task(s) to be"
  1. W !?5,"selected."
  1. W !!?5,"Answer must be an integer between 1 and 999999999."
  1. W !?5,"Answer may be a range, for example 4000-5000."
  1. W !?5,"Answer may be a list, for example 4001,4004,4010-4020."
  1. W !!?5,"Enter ?? for more help."
  1. Q
  1. HELP2B ;
  1. ;PROMPT2^XUTMRJD--explain, offer to show system status or Task List
  1. W !!?5,"Enter ?TASK LIST (or ?T) to list the tasks TaskMan believes"
  1. W !?5,"are running."
  1. W !!?5,"Enter ?SYSTEM STATUS (or ?S) to list the system status report."
  1. Q
  1. SCREEN2A ;
  1. ;PROMPT2^XUTMRJD--screen out ?TASK LIST and ?SYSTEM STATUS as acceptable
  1. N ZTL,ZTX
  1. S ZTX=$$UP^XLFSTR(X)
  1. S ZTL=$L(X)
  1. I $E("?TASK LIST",1,ZTL)=ZTX D Q
  1. .W $E("?TASK LIST",ZTL+1,999)
  1. .S Y="?TASK LIST",ZTOUT=1
  1. .Q
  1. I $E("?SYSTEM STATUS",1,ZTL)=ZTX D Q
  1. .W $E("?SYSTEM STATUS",ZTL+1,999)
  1. .S Y="?SYSTEM STATUS",ZTOUT=1
  1. .Q
  1. Q
  1. ;
  1. SCREEN2B ;
  1. ;PROMPT2^XUTMRJD--screen out lists w/o any running tasks as unacceptable
  1. N ZTCOUNT,ZTR1,ZTR2,ZTSK
  1. S ZTCOUNT=0 K ^TMP($J,"XUTMRJD")
  1. S2B1 ;
  1. S ZTSK=0 F S ZTSK=$O(^%ZTSCH("TASK",ZTSK)) Q:'ZTSK D
  1. .I $D(^TMP($J,"XUTMT",ZTSK)) D Q
  1. ..S ZTCOUNT=ZTCOUNT+1
  1. ..S ^TMP($J,"XUTMRJD",ZTSK)=""
  1. .S ZTR2=$O(^TMP($J,"XUTMT",ZTSK))
  1. .S ZTR1=$O(^TMP($J,"XUTMT",ZTSK))
  1. .I ZTR1="" Q
  1. .I ZTR1>ZTSK Q
  1. .S ZTCOUNT=ZTCOUNT+1
  1. .S ^TMP($J,"XUTMRJD",ZTSK)=""
  1. .Q
  1. S2B2 ;
  1. I ZTCOUNT S ^TMP($J,"XUTMRJD")=ZTCOUNT Q
  1. W !!?5,"None of the tasks in that range are listed as running."
  1. W !!?5,"You must select from TaskMan's list of running tasks if you"
  1. W !?5,"want TaskMan to remove the ones you forcibly exited."
  1. W !!?5,"Enter ? for help."
  1. K X S ZTSCREEN=1
  1. Q
  1. HELP3A ;
  1. ;PROMPT3^XUTMRJD--? help
  1. W !!?5,"Answer yes or no. Enter ?? for more help."
  1. Q
  1. HELP3B ;
  1. ;PROMPT3^XUTMRJD--explain consequences
  1. W !!?5,"Answer yes if before continuing you want to see the task",ZTPLURAL
  1. W !?5,"you have selected."
  1. W !!?5,"Answer no if you are sure which task",ZTPLURAL," you selected."
  1. Q
  1. HELP4A ;
  1. ;PROMPT4^XUTMRJD--? help
  1. W !!?5,"Answer yes or no. Enter ?? for more help."
  1. Q
  1. HELP4B ;
  1. ;PROMPT4^XUTMRJD--explain consequences
  1. W !!?5,"Answer yes to remove the selected task",ZTPLURAL
  1. W " from TaskMan's list"
  1. W !?5,"of running tasks. If you do, TaskMan will no longer believe"
  1. I ZTCOUNT>1 W !?5,"these tasks are running."
  1. E W !?5,"this task is running."
  1. W !!?5,"Answer no to leave the task",ZTPLURAL," listed as running."
  1. Q
  1. ;