source: FOIAVistA/tag/r/KERNEL-XU-A4A7-USC-XG-XLF-XNOA-XPD-XQ-XVIR-ZI-ZOSF-ZOSV-ZT-ZU-%Z-XIP--XQAB--XUC--XUR--ZIN--ZTED/ZISG1.m@ 1383

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

initial load of FOIAVistA 6/30/08 version

File size: 4.5 KB
Line 
1%ZISG1 ;Device Handler prototype
2 ;;8.0T3
3 ;W !,$D(^$DI) K (%BUG) ;S:'$D(%BUG) %BUG=0 K:%BUG="NO" %BUG
4 S XGDA=""
5 I '$D(XGION) D
6 .S XGION=$S($D(^$W("ZISGDEV","G","DEV","VALUE")):^$W("ZISGDEV","G","DEV","VALUE"),1:"")
7 S:$G(XGION)]"" XGDA=$O(^%ZIS(1,"B",XGION,0))
8 S XGIOT=$G(^%ZIS(1,+XGDA,"TYPE"))
9 I XGIOT']""!('XGDA) D ^XGLMSG("E","No Device has been selected.") q
10 I XGIOT'="TRM" G @XGIOT
11 D INIT
12 I $D(^$W("ZISGTRM")) S ^$W("ZISGTRM","VISIBLE")=1 ;K ^$W("ZISGTRM")
13 E M ^$W("ZISGTRM")=TMP("ZISGTRM")
14 S ^$DI($PD,"FOCUS")="ZISGTRM"
15 I $G(^%ZOSF("OS"))["VAX DSM" ESTART 0
16 ;D ESTA^XG(0)
17 ;;I $D(XGIOST) D
18 ;;.S ^$W("ZISGTRM","G","SUB","VALUE")=XGIOST
19 ;;.ETRIGGER ^$W("ZISGTRM","G","SUB","EVENT","CHANGE")
20 S ^$W("ZISGTRM","VISIBLE")=1
21 ;D S^XG("ZISGTRM","VISIBLE",1)
22 D B2
23 ESTART
24 ;D ESTA^XG()
25ERR ;K ^$W("ZISGTRM")
26 ;D K^XG("ZISGTRM")
27 ;D S^XG("ZISGTRM","VISIBLE",0)
28 Q
29SUBTYPE ;
30 D B2^%ZISG3
31 Q
32B2 G B2^%ZISG3
33DEV ; Callback for DEV item.
34 Q
35SUB ; Callback for SUB item
36 G SUB^%ZISG3
37CHGRAD ;CHANGE IN MARGIN
38 G CHGRAD^%ZISG3
39OK ; Callback for exit item in menu
40 W !,"EXIT^%ZISG1 CALLED UPON CANCEL OF MORE"
41 ;D S^XG("ZISGTRM","VISIBLE",0)
42 S ^$W("ZISGTRM","VISIBLE")=0
43 W !,"JUST BEFORE ESTOP OF TAG EXIT^%ZISG1"
44 ESTOP
45 ;D ESTO^XG
46 QUIT
47CANCEL K ^$W("ZISGTRM")
48 ESTOP
49 ;D ESTO^XG
50 QUIT
51HELP ;Callback for help.
52 D ^XGLMSG("I","Help is not available at this time.")
53 Q
54INIT ;create names of devices into ACDEV
55 N %,%1,%2
56 K TMP("ZISGTRM","G","SUBTYPE","CHOICE")
57 S %1="" F %=1:1 S %1=$O(^%ZIS(2,"B",%1)) Q:%1']"" F %2=0:0 S %2=$O(^%ZIS(2,"B",%1,%2)) Q:%2'>0 S TMP("ZISGTRM","G","SUBTYPE","CHOICE",%)=%1
58 Q
59 ;
60SPL ;Entry point for SPOOL devices.
61 I '$D(DUZ) D ^XGLMSG("E","Your DUZ is not defined!") Q
62 I $S($D(^VA(200,DUZ,"SPL")):$E(^("SPL"),1),1:"N")'["y" D Q
63 .D ^XGLMSG("E","You aren't an authorized SPOOLER user.") Q
64 .; W:'$D(IOP) !?5,"You aren't an authorized SPOOLER user." Q
65 I '$D(^$W("ZISGSPL")) D
66 .M ^$W("ZISGSPL")=TMP("ZISGSPL")
67 .M TMP("OLD","G","ZISGSPL","CHOICE")=^XMB(3.51,"B")
68 .S X="",Y=""
69 .S XGDIC("S")="I '$P(^XMB(3.51,Y,0),U,10)"
70 .F S X=$O(TMP("OLD","G","ZISGSPL","CHOICE",X)) Q:X="" D
71 ..S Y="" F S Y=$O(TMP("OLD","G","ZISGSPL","CHOICE",X,Y)) Q:Y="" D
72 ...I 0
73 ...X:$D(^DD(3.51,0,"SCR")) ^("SCR") I $T X XGDIC("S") I $T S TMP("NEW","G","ZISGSPL","CHOICE",X_"^"_Y)=X
74 .M ^$W("ZISGSPL","G","DOC","CHOICE")=TMP("NEW","G","ZISGSPL","CHOICE")
75 E S ^$W("ZISGSPL","VISIBLE")=1
76 S ^$DI($PD,"FOCUS")="ZISGSPL"
77 ESTART
78 Q
79SPLOK ; Callback for exit item in menu
80 W !,"OK BUTTON CALLED IN SPOOL SETUP"
81 S XGDOC=^$W("ZISGSPL","G","DOC","VALUE")
82 ;D S^XG("ZISGSPL","VISIBLE",0)
83 S ^$W("ZISGSPL","VISIBLE")=0
84 ESTOP
85 ;D ESTO^XG
86 QUIT
87SPLNOK K ^$W("ZISGSPL")
88 ESTOP
89 ;D ESTO^XG
90 QUIT
91 ;
92MT ;Magtape device setup
93 S XGDA=""
94 I '$D(XGION) D
95 .S XGION=$S($D(^$W("ZISGDEV","G","DEV","VALUE")):^$W("ZISGDEV","G","DEV","VALUE"),1:"")
96 S:$G(XGION)]"" XGDA=$O(^%ZIS(1,"B",XGION,0))
97 M ^$W("ZISGMT")=TMP("ZISGMT")
98 S ^$W("ZISGMT","G","OPENPARAM","VALUE")=$G(^%ZIS(1,+XGDA,"IOPAR"))
99 S ^$DI($PD,"FOCUS")="ZISGMT"
100 ESTART
101 Q
102MTOK ; Callback for exit item in menu
103 W !,"OK BUTTON CALLED IN SPOOL SETUP"
104 S XGPAR=^$W("ZISGMT","G","OPENPARAM","VALUE")
105 ;D S^XG("ZISGMT","VISIBLE",0)
106 S ^$W("ZISGMT","VISIBLE")=0
107 W !,"JUST BEFORE ESTOP OF TAG MTOK^%ZISG1"
108 ESTOP
109 ;D ESTO^XG
110 QUIT
111MTNOK K ^$W("ZISGMT")
112 ESTOP
113 ;D ESTO^XG
114 QUIT
115SDP ;SDP device setup
116 S XGDA=""
117 I '$D(XGION) D
118 .S XGION=$S($D(^$W("ZISGDEV","G","DEV","VALUE")):^$W("ZISGDEV","G","DEV","VALUE"),1:"")
119 S:$G(XGION)]"" XGDA=$O(^%ZIS(1,"B",XGION,0))
120 M ^$W("ZISGSDP")=TMP("ZISGSDP")
121 S ^$W("ZISGSDP","G","OPENPARAM","VALUE")=$G(^%ZIS(1,+XGDA,"IOPAR"))
122 S ^$DI($PD,"FOCUS")="ZISGSDP"
123 ESTART
124 Q
125SDPOK ; Callback for exit item in menu
126 W !,"OK BUTTON CALLED IN SPOOL SETUP"
127 S XGPAR=^$W("ZISGSDP","G","OPENPARAM","VALUE")
128 ;D S^XG("ZISGSDP","VISIBLE",0)
129 S ^$W("ZISGSDP","VISIBLE")=0
130 W !,"JUST BEFORE ESTOP OF TAG SDPOK^%ZISG1"
131 ESTOP
132 ;D ESTO^XG
133 QUIT
134SDPNOK K ^$W("ZISGSDP")
135 ESTOP
136 ;D ESTO^XG
137 QUIT
138HFS ;HOST FILE device setup
139 S XGDA=""
140 I '$D(XGION) D
141 .S XGION=$S($D(^$W("ZISGDEV","G","DEV","VALUE")):^$W("ZISGDEV","G","DEV","VALUE"),1:"")
142 S:$G(XGION)]"" XGDA=$O(^%ZIS(1,"B",XGION,0))
143 M ^$W("ZISGHFS")=TMP("ZISGHFS")
144 S ^$W("ZISGHFS","G","OPENPARAM")=$G(^%ZIS(1,+XGDA,"IOPAR"))
145 S ^$DI($PD,"FOCUS")="ZISGHFS"
146 ESTART
147 Q
148HFSOK ; Callback for exit item in menu
149 W !,"OK BUTTON CALLED IN SPOOL SETUP"
150 S XGPAR=^$W("ZISGHFS","G","OPENPARAM","VALUE")
151 ;D S^XG("ZISGHFS","VISIBLE",0)
152 S ^$W("ZISGHFS","VISIBLE")=0
153 W !,"JUST BEFORE ESTOP OF TAG HFSOK^%ZISG1"
154 ESTOP
155 ;D ESTO^XG
156 QUIT
157HFSNOK K ^$W("ZISGHFS")
158 ESTOP
159 ;D ESTO^XG
160 QUIT
Note: See TracBrowser for help on using the repository browser.