source: WorldVistAEHR/trunk/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/XUTMR.m@ 1351

Last change on this file since 1351 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 2.5 KB
Line 
1XUTMR ;SEA/RDS - Taskman: Requeue Interface, Part One ;9/8/95 15:49
2 ;;8.0;KERNEL;**2**;Jul 10, 1995
3 ;
4INIT ;Setup
5 D ENV^XUTMUTL
6 W @IOF
7LKUP ;Lookup Task
8 F %ZTI=0:0 R !!,"Task Number: ",ZTSK:DTIME G Q^XUTMR1:"^"[ZTSK Q:$D(^%ZTSK(ZTSK,0))#2!(ZTSK="??") W:ZTSK'="?" !?10,"This task is not listed in the Task Log." W !,"Please enter the number of an entry in the Task Log that you wish to requeue."
9 I ZTSK="??" D ^XUTMQ G INIT
10 L +^%ZTSK(ZTSK):5 E W !!?10,"That file is not currently available. Please try again later." G LKUP
11 S ZTREC=^%ZTSK(ZTSK,0),ZTREC2=$S($D(^%ZTSK(ZTSK,.2))#2:^(.2),1:"")
12 I 'ZTKEY,$S($P(ZTREC,U,11)_","_$P(ZTREC,U,12)=XUTMUCI:DUZ'=$P(ZTREC,U,3),1:ZTNAME'=$P(ZTREC,U,10)) W !!?10,"You may only requeue tasks that you originally queued." G LKUP
13 I $P(ZTREC,U,1,2)="ZTSK^XQ1",$D(^%ZTSK(ZTSK,.3,"XQSCH")) W !!,"This is a scheduled option, Please use the SCHEDULE/UNSCHDULE option." G LKUP
14 S %ZTDTH=$P(ZTREC,U,6),%ZTDTH(3)=$$H3^%ZTM(%ZTDTH)
15 ;S %ZTIO=""
16 ;F %ZTI=0:0 S %ZTIO=$O(^%ZTSCH("IO",%ZTIO)),%ZTU="" Q:%ZTIO="" F %ZTI=0:0 S %ZTU=$O(^%ZTSCH("IO",%ZTIO,%ZTU)) Q:%ZTU="" I $D(^%ZTSCH("IO",%ZTIO,%ZTU,ZTSK))#2 S %ZTIO(ZTSK)=%ZTIO G TIME
17 ;
18TIME ;Ask Requeue Time
19 W ! D EN^XUTMTP(ZTSK) W !
20 S %DT="AERSX",%DT("A")="Requeue for what time: ",%DT("B")="NOW"
21 I $$HDIFF^XLFDT(%ZTDTH,$H,2)>0 S %DT("B")=$$HTE^XLFDT(%ZTDTH)
22 D ^%DT G NEXT^XUTMR1:Y=-1 S ZTDTH=$$FMTH^XLFDT(Y)
23 ;
24DEV ;Ask Requeue Device And Calculate UCI And CPU Destination
25 S %ZTYND="YES" S:$P(ZTREC2,U)="" %ZTYND="NO"
26 S DIR("A")="Do you wish to change the Device the task goes to:",DIR("B")="No",DIR(0)="Y"
27 S DIR("?")="Please enter whether you wish to change output device for this task." D ^DIR
28 G NEXT^XUTMR1:$D(DIRUT) K ZTIO S ZTCPU=""
29 I Y'=1 S ZTIO=$P(ZTREC2,U),%=$P(ZTREC2,U,6) S:$L(%) ZTIO("H")=% S:$D(^%ZTSK(ZTSK,.25))#2 ZTIO("P")=^(.25) G CONT
30 ;
31D0 S %ZIS("B")=$S($P(ZTREC2,U)]"":$P(ZTREC2,U),1:""),%ZIS="NQZ",%ZIS("A")="Requeue to what device: " D ^%ZIS S ZTIO=$S($D(IOS)[0:"",POP:"",$D(ION)[0:"",ION]"":ION,IOS="":"",$D(^%ZIS(1,IOS,0))[0:"",1:$P(^(0),U))
32 I ZTIO="" W !!,"No device selected. Task unchanged." G NEXT^XUTMR1
33 I IOT="VTRM" D HOME^%ZIS W !,"Tasks can not open virtual terminals. Please select another device.",$C(7),! G D0
34 S ZTIO=ZTIO_$S($D(IOST)[0:"",1:";"_IOST)_$S($D(IO("DOC"))[0:$S($D(IOM)[0:"",1:";"_IOM_$S($D(IOSL)[0:"",1:";"_IOSL)),1:";"_IO("DOC"))_$S($D(IO("P"))[0:"",IO("P")="":"",1:";/"_IO("P")) S:$D(IOCPU)#2 ZTCPU=IOCPU
35 I $D(IO("HFSIO"))#2,$D(IOPAR)#2,IOT="HFS" S ZTIO("H")=IO("HFSIO"),ZTIO("P")=IOPAR
36 ;
37CONT ;Taskman Requeue Interface Is Continued In XUTMR1
38 G ^XUTMR1
39 ;
Note: See TracBrowser for help on using the repository browser.