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/XQSRV2.m@ 1800

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

initial load of WorldVistAEHR

File size: 2.6 KB
Line 
1XQSRV2 ;SEA/MJM - Server Task handler ;11/19/93 10:55 ;4/9/92 11:14 AM
2 ;;8.0;KERNEL;;Jul 10, 1995
3 ;
4AUDIT ;If audit is required fill in the data (AUDIT #2) the results.
5 D ^XQDATE S XQDONE=%
6 I XQMB6=" " S XQMB6="No errors reported by the Menu System."
7 S $P(^XUSEC(19,XQLTL,0),U,5)=XQDONE
8 S ^XUSEC(19,XQLTL,3)=XQMB6
9 Q
10 ;
11ZTSK ;Server Taskman Entry
12 S U="^",X="ERROR^XQSRV2",@^%ZOSF("TRAP")
13 ;
14RUN ;Do first audit, save off what I need, and clean out partition
15 D:XQAUDIT AUDIT^XQSRV1
16 F %="XMCHAN","XMFROM","XMREC","XMXX" S ^XUTL("XQ",$J,%)=@%
17 F %="XQ220","XQAUDIT","XQDATE","XQLTL","XQMB","XQMB6","XQMSG","XQNOUSR","XQREPLY","XQRTN","XQSND","XQSOP","XQSUB","XQSUP" S ^XUTL("XQ",$J,%)=@%
18 D KILL^XUSCLEAN
19 S (XQER,XQER1)=""
20 F %="XMCHAN","XMFROM","XMREC","XMXX" S @%=^XUTL("XQ",$J,%)
21 F %="XQ220","XQAUDIT","XQDATE","XQLTL","XQMB","XQMB6","XQMSG","XQNOUSR","XQREPLY","XQRTN","XQSND","XQSOP","XQSUB","XQSUP" S @%=^XUTL("XQ",$J,%)
22 S XMZ=XQMSG S:'$D(XMFROM) XMFROM=XQSND
23 ;
24 S XQER="Entry Action: "
25 I $D(^DIC(19,+XQY,20))#2,$L(^(20)) X ^(20) I $D(XQUIT) S XQER="XQUIT variable encountered after Entry Action. Routine not run." G OUT
26 ;
27 S XQER="Header: "
28 I $D(^DIC(19,+XQY,26))#2,$L(^(26)) X ^(26)
29 ;
30 S XQER="Routine "_XQRTN_": "
31 I XQRTN'=U S:'$D(XMZ) XMZ=^XUTL("XQ",$J,"XQMSG") D @XQRTN
32 ;
33 S XQER="Exit Action: "
34 I $D(^DIC(19,+XQY,15))#2,$L(^(15)) X ^(15)
35 ;
36 S:XQER1="" XQER=""
37 F %="XMCHAN","XMFROM","XMREC","XMXX" S @%=^XUTL("XQ",$J,%)
38 F %="XQ220","XQAUDIT","XQDATE","XQLTL","XQMB","XQMB6","XQMSG","XQNOUSR","XQREPLY","XQRTN","XQSND","XQSOP","XQSUB","XQSUP" S @%=^XUTL("XQ",$J,%)
39 ;
40OUT ;Clean up and quit
41 S:'$D(XQMB6) XQMB6="" S XQMB6=XQMB6_" "_XQER_" "_XQER1 S:XQMB6[";;" XQMB6=$P(XQMB6,";;",2)
42 I 'XQNOUSR,(XQSUP'="Y") D BULL^XQSRV4
43 I XQREPLY="R"!(XQREPLY="E"&(XQER]""))!(XQREPLY="E"&(XQER1]"")) D ^XQSRV3
44 D:XQNOUSR NOUSER^XQSRV3
45 D:XQAUDIT AUDIT
46 ;
47KILL ;Pass Mailman back variables and kill off XQ's
48 S XM1Z=XQMSG,XMXX="S."_XQSOP,XMB("TYPE")=5
49 I XQER]""!(XQER1]"") S %=XQER_XQER1,XQSRVOK=$E(%,1,30)
50 ;
51 K %,%Y,DIC,X,XQ,XQ220,XQAUDIT,XQBUL,XQCHK,XQDATE,XQDONE,XQDT,XQDTH,XQEND,XQER,XQER1,XQHERE,XQI,XQII,XQJ,XQLTL,XQMB,XQMD,XQMS,XQMSG
52 K XQN,XQNOBUL,XQNOUSR,XQREPLY,XQRES,XQRTN,XQSND,XQSOP,XQSRV,XQSTART,XQSTXT,XQSUB,XQSUP,XQUIT,XQVOL,XQX,XQY,XQY0,XQZ,Y,ZTSK
53 K ^XUTL("XQ",$J)
54 Q
55 ;
56ERROR ;Figure out the error message, load it in XQER, and call ^%ZTER
57 I $D(^XUTL("XQ",$J,"XMCHAN")) F %="XMCHAN","XMFROM","XMREC","XMXX" S @%=^(%)
58 I $D(^XUTL("XQ",$J,"XQ220")) F %="XQ220","XQAUDIT","XQDATE","XQLTL","XQMB","XQMB6","XQMSG","XQNOUSR","XQREPLY","XQRTN","XQSND","XQSOP","XQSUB","XQSUP" S @%=^(%)
59 S XQER1=$E($ZE,1,70)
60 S %ZTERLGR=$$LGR^%ZOSV D ^%ZTER
61 G OUT
62 Q
Note: See TracBrowser for help on using the repository browser.