source: GuiMail/trunk/p/CWMAIL3.m@ 1582

Last change on this file since 1582 was 1139, checked in by George Lilly, 14 years ago

version 2.3 of GuiMail

File size: 1.8 KB
RevLine 
[1139]1CWMAIL3 ;INDPLS/PLS- DELPHI VISTA MAIL SERVER, CON'T ;21-Jun-2005 06:34;CLC
2 ;;2.3;CWMAIL;;Jul 19, 2005
3 ;Modified to fix Cache problem related to double close
[1138]4 Q ;ROUTINE CAN'T BE CALLED DIRECTLY
5 ;
6GRPINFO(CWDAT,CWPARAM) ;Mail Group Information
7 ;CWPARAM = Mail Group IEN
8 N CWFILE,IO,IOP,POP,DIC,DA,X,Y,CWFLG,CWNXT,IOSL,CWDEFDIR,CWDATFIL
9 S CWFILE="CWMAILGRP"_$J_".TXT"
10 S CWDEFDIR=$$PWD^%ZISH
11 D OPEN^%ZISH("CWDATFIL",CWDEFDIR,CWFILE,"W")
12 G:POP GRPINFOE
13 U IO S IOSL=99999
14 D DISPLAY^XMHIG(+CWPARAM)
15 D CLOSE^%ZISH("CWDATFIL")
16 I $$FTG^%ZISH(CWDEFDIR,CWFILE,$NA(CWDAT(2)),1) D
17 .S CWFILE(CWFILE)=""
18 .S X=$$DEL^%ZISH(CWDEFDIR,$NA(CWFILE))
19 .I $O(CWDAT(0))>0 D
20 ..S CWFLG=0,CWNXT=1
21 ..F S CWNXT=$O(CWDAT(CWNXT)) Q:CWNXT<1!(CWFLG) D
22 ...I '$L(CWDAT(CWNXT)),'CWFLG K CWDAT(CWNXT)
23 ...E I $A(CWDAT(CWNXT))=12 K CWDAT(CWNXT)
24 ...E S CWDAT(CWNXT)=$$CTRL^XMXUTIL1(CWDAT(CWNXT)),CWFLG=1 ;remove control characters
25 .S CWDAT(-9900)=$O(CWDAT(9999999),-1)+1
26 E S CWDAT(-9900)=2
[1139]27GRPINFOE ;D CLOSE^%ZISH("CWDATFIL")
[1138]28 Q $O(CWDAT(1))
29USRINFO(CWDAT,CWPARAM) ;Mail User Information
30 ;CWPARAM = Mail User IEN
31 N CWFILE,%ZIS,IOP,POP,IO,Y,X,CWDEFDIR,CWDATFIL,IOSL
32 N CWFLG,CWNXT
33 S CWFILE="CWMAILUSR"_$J_".TXT"
34 S CWDEFDIR=$$PWD^%ZISH
35 D OPEN^%ZISH("CWDATFIL",CWDEFDIR,CWFILE,"W")
36 G:POP USRINFOE
37 U IO S IOSL=99999
38 D DISPUSER^XMHIU(+CWPARAM)
39 D CLOSE^%ZISH("CWDATFIL")
40FLG I $$FTG^%ZISH(CWDEFDIR,CWFILE,$NA(CWDAT(2)),1) D
41 .S CWFILE(CWFILE)=""
42 .S X=$$DEL^%ZISH(CWDEFDIR,$NA(CWFILE))
43 .I $O(CWDAT(0))>0 D
44 ..S CWFLG=0,CWNXT=1
45 ..F S CWNXT=$O(CWDAT(CWNXT)) Q:CWNXT<1!(CWFLG) D
46 ...I '$L(CWDAT(CWNXT)),'CWFLG K CWDAT(CWNXT)
47 ...E I $A(CWDAT(CWNXT))=12 K CWDAT(CWNXT)
48 ...E S CWDAT(CWNXT)=$$CTRL^XMXUTIL1(CWDAT(CWNXT)),CWFLG=1 ;remove control characters
49 .S CWDAT(-9900)=$O(CWDAT(9999999),-1)+1
50 E S CWDAT(-9900)=2
[1139]51USRINFOE ;D CLOSE^%ZISH("CWDATFIL")
[1138]52 Q $O(CWDAT(1))
Note: See TracBrowser for help on using the repository browser.