source: WorldVistAEHR/trunk/r/PATCH_MANAGEMNT-AAQ/AAQXUTMQ.m@ 1211

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

initial load of WorldVistAEHR

File size: 2.6 KB
Line 
1AAQXUTMQ ;FGO/JHS; TaskMan Waiting List ;08-07-97 [2/20/02 2:16am]
2 ;;1.7;AAQ LOCAL;;Jun 3, 1998;For Kernel V8.0 and Cache/OpenM-NT
3 ;;Revised version of XUTMQ
4ENV ;Establish Routine Environment
5 N %,%ZTF,%ZTI,%ZTJ,%ZTL,%ZTR,DDH,DIR,DIRUT,DTOUT,DUOUT,X,Y,ZT,ZT1,ZTENV,ZTKEY,ZTNAME,XUTMUCI S AAQX=""
6 D ENV^XUTMUTL Q:'$D(ZTENV)
7 D ^XQDATE X ^%ZOSF("UCI") S HDUV=Y
8 I '+$O(^%ZTSK(0))&'$D(^%ZTSCH("TASK")) W !!,"The Task File is empty, and there are no tasks currently running." S DIR(0)="E" D ^DIR Q
9SELECT ;Select listing (main loop)
10 D FLAGS,IOQ
11 I IOST["P-" W !!,"End of Report",@IOF
12EXIT I $D(SVDTIME) S DTIME=SVDTIME
13 K %X,%Y,%ZISOS,DIR,DIRUT,DTOUT,DUOUT,HDUV,IOT,POP,X,Y
14 I $D(ZTQUEUED) K ZTDESC,ZTRTN,ZTSK D ^%ZISC,HOME^%ZIS S ZTREQ="@"
15KEEP ; AAQX and SVDTIME are killed in AAQSOD or AAQMENU.
16 Q ; ZTQUEUED, ZTREQ are used to delete task and are not killed.
17FLAGS ;Reset Taskman Files Status Flags
18 S ZT1="",%ZTL=0 F S ZT1=$O(^%ZTSCH("LINK",ZT1)) Q:ZT1="" I $O(^%ZTSCH("LINK",ZT1,""))]"" S %ZTL=1 Q
19 S ZT1="",%ZTJ=0 F S ZT1=$O(^%ZTSCH("JOB",ZT1)) Q:ZT1="" I $O(^%ZTSCH("JOB",ZT1,0))]"" S %ZTJ=1 Q
20 S %ZTI=$D(^%ZTSCH("IO"))>9,%ZTF=+$O(^(""))!%ZTI!%ZTL!%ZTJ,%ZTR=$D(^%ZTSCH("TASK"))
21 Q
22IOQ ;Tasks waiting for devices.
23 N DIR,DIRUT,DTOUT,DUOUT,X,ZT,ZT1,ZT2,ZT3,ZTC,ZTF,ZTH,ZTS S ZTC=0,ZTF=1,ZTH="Tasks waiting for devices"
24 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="" D IOQ0 I (X=1)!(AAQX="^") G OUT
25 I 'ZTC W !!,%Y,?30,"Tasks waiting for devices",?65,HDUV,!!,"There are no tasks waiting for devices on this volume set."
26 Q:IOST["P-" W ! S DIR(0)="E",DIR("A")=$S(ZTC:"End of listing. ",1:"")_"Press RETURN to Continue" D ^DIR Q
27IOQ0 ;IOQ--Extending Scope Of FOR Loop
28 S ZTS=ZT3 D PRINT Q:X="^"
29 Q
30OUT ;Tag for breaking FOR scope to exit early
31 Q
32PRINT ;Subroutine--Print A Task
33 N ZTSK W:'ZTC %Y,?30,ZTH,?65,HDUV,! W:'ZTF !,"-------------------------------------------------------------------------------"
34 S X=0,ZTC=0,ZTF=0 D EN^XUTMTP(ZTS)
35 I IOST["C-",$Y>18 S ZTF=1 R !!,"Press RETURN to Continue, '^' to Exit: ",AAQX:DTIME S X=AAQX Q:X="^" W @IOF
36 I IOST["P-",$Y+4>IOSL W @IOF,!,%Y,?30,"Tasks waiting for devices",?65,HDUV,!!
37 S ZTC=ZTC+1 Q
38DEV K %ZIS S %ZIS="MQ",%ZIS("B")="" D ^%ZIS I POP W !!,"No Device was Selected and no Report will be Printed." H 2 Q
39 I '$D(IO("Q")),ION["P-MESSAGE" W $C(7),!,"If you select P-MESSAGE as the device, you must Queue the report." G DEV
40 G:(IOT="VTRM") ENV
41 I $D(IO("Q")) K IO("Q") S ZTDESC="Tasks waiting for devices",ZTRTN="ENV^AAQXUTMQ" D ^%ZTLOAD
42 I $D(ZTQUEUED) W !!,"Request queued.",!! G EXIT
Note: See TracBrowser for help on using the repository browser.