source: WorldVistAEHR/trunk/r/ENGINEERING-EN/ENPLSV.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: 1.7 KB
RevLine 
[613]1ENPLSV ;WISC/SAB-PROJECT COMMUNICATION SERVER ;5/16/95
2 ;;7.0;ENGINEERING;**11,23**;Aug 17, 1993
3EN ;
4 D INIT
5 D GETC
6 D:'ENABORT LOAD
7 D:'ENABORT SAVECC
8 D:'ENABORT CM^ENPLSV1
9 I 'ENABORT F S ENI=$O(^TMP($J,ENI)) Q:'ENI S ENREC=^(ENI),ENRSEG=$P(ENREC,U) D @(ENRSEG_"^ENPLSV2")
10 L:$G(ENDA)>0 -^ENG("PROJ",ENDA)
11 D:'ENABORT SM
12 D WRAPUP
13 Q
14INIT ; Initialization
15 S ENABORT=0,$P(ENBLANK," ",81)=""
16 K ^TMP($J)
17 S ENXMZ=XQMSG,ENXMSER="S."_XQSOP
18 Q
19GETC ; Get Communication Information
20 F X XMREC S:XMER ENABORT=1 Q:($P(XMRG,U)="ENG")!ENABORT
21 I 'ENABORT D
22 .S ENCCODE=$P(XMRG,U,3),ENCTYPE=$E(ENCCODE,2,4)
23 .S ENCDATE=$P(XMRG,U,4),ENCTIME=$P(XMRG,U,5)
24 .S ENCSITE=$P(XMRG,U,2),ENCTZD=$$TZD^ENPLUTL($$LTZ^ENPLUTL,$P(XMRG,U,6))
25 .S ENSCODE=$S($E(ENCCODE)="F":"5-Yr",1:"Appl")
26 .S ENSFIELD=$S($E(ENCCODE)="F":"181.1",$E(ENCCODE)="A":"251",1:"")
27 .S ENSTEXT=$S($E(ENCCODE)="F":"5-Yr Plan Project",1:"Proj. Application")
28 Q
29LOAD ; Load Message into ^TMP
30 S ENI=0 F X XMREC Q:XMER!($E(XMRG,1)="$") S ENI=ENI+1,^TMP($J,ENI)=XMRG
31 Q
32SAVECC ; Save Communication Comments (if any) & load first "A" segment
33 S ENI="" F S ENI=$O(^TMP($J,ENI)) Q:'ENI S ENREC=^(ENI) Q:$P(ENREC,U)="A" S ^TMP($J,"ENCC",ENI)=$P(ENREC,U,5)
34 I $P(ENREC,U)'="A" S ENABORT=1
35 I 'ENABORT S ENRSEG=$P(ENREC,U) D A^ENPLSV2
36 Q
37SM ; Send Message
38 S XMDUN="Regional Construction Database"
39 S ^XMB(3.9,XMZ,2,0)="^3.92A^"_ENL_"^"_ENL_"^"_DT
40 S XMY("G.EN PROJECTS")=""
41 D ENT1^XMD
42 Q
43WRAPUP ;
44 I 'ENABORT S XMZ=ENXMZ,XMSER=ENXMSER D REMSBMSG^XMA1C
45 K ^TMP($J),ENABORT,ENBLANK
46 K ENCCODE,ENCDATE,ENCSITE,ENCTIME,ENCTYPE,ENCTZD,ENDA,ENDT,ENI,ENJ,ENL
47 K ENPACT,ENPCOM,ENPDA1,ENPDA2,ENPNBR,ENPREV,ENPSTA,ENPTI1,ENPTI2,ENPTTL
48 K ENREC,ENRSEG,ENSCODE,ENSFIELD,ENSTEXT,ENXMZ,ENXMSER
49 K ENWP,ENWP3,ENWP4,X,Y
50 Q
51 ;ENPLSV
Note: See TracBrowser for help on using the repository browser.