From e1897190e488870de3f0d1bc407eaf931d275170 Mon Sep 17 00:00:00 2001 From: george Date: Sun, 10 Apr 2011 18:13:17 +0000 Subject: [PATCH] version 2.1 of GuiMail source code --- KIDS/CWMA_GuiMail_V2_1.KID | 4468 ++++++++++++++++++++++++++++++++++++ p/CWMACPPI.m | 35 + p/CWMAIL.m | 134 ++ p/CWMAIL0.m | 87 + p/CWMAIL1.m | 80 + p/CWMAIL2.m | 117 + p/CWMAIL3.m | 51 + p/CWMAIL4.m | 28 + p/CWMAILA.m | 144 ++ p/CWMAILB.m | 123 + p/CWMAILC.m | 120 + p/CWMAILD.m | 109 + p/CWMAILE.m | 59 + p/CWMAILF.m | 75 + p/CWMAINI.m | 64 + p/CWMAPP.m | 16 + p/CWMAPP01.m | 69 + 17 files changed, 5779 insertions(+) create mode 100644 KIDS/CWMA_GuiMail_V2_1.KID create mode 100644 p/CWMACPPI.m create mode 100644 p/CWMAIL.m create mode 100644 p/CWMAIL0.m create mode 100644 p/CWMAIL1.m create mode 100644 p/CWMAIL2.m create mode 100644 p/CWMAIL3.m create mode 100644 p/CWMAIL4.m create mode 100644 p/CWMAILA.m create mode 100644 p/CWMAILB.m create mode 100644 p/CWMAILC.m create mode 100644 p/CWMAILD.m create mode 100644 p/CWMAILE.m create mode 100644 p/CWMAILF.m create mode 100644 p/CWMAINI.m create mode 100644 p/CWMAPP.m create mode 100644 p/CWMAPP01.m diff --git a/KIDS/CWMA_GuiMail_V2_1.KID b/KIDS/CWMA_GuiMail_V2_1.KID new file mode 100644 index 0000000..c8f07ab --- /dev/null +++ b/KIDS/CWMA_GuiMail_V2_1.KID @@ -0,0 +1,4468 @@ +KIDS Distribution saved on Sep 20, 1999@08:03:34 +GuiMail v2.1 Server Software +**KIDS**:CW GUIMail 2.1^ + +**INSTALL NAME** +CW GUIMail 2.1 +"BLD",160,0) +CW GUIMail 2.1^CW GUIMail^0^2990920^n +"BLD",160,1,0) +^^76^76^2990916.074259 +"BLD",160,1,1,0) +This KIDS Build will install Version 2.1 of Vista GuiMail. This installation +"BLD",160,1,2,0) +makes the GuiMail Server software compatible with MailMan v7.1 after patch 50 +"BLD",160,1,3,0) +has been installed. The version 2.1 GuiMail Client software was be installed +"BLD",160,1,4,0) +and used on the PC side. Please refer to the ReadMe.Txt file in the ZIP file +"BLD",160,1,5,0) +for instructions regarding installation. Also, refer to the GuiMail_Changes.Txt +"BLD",160,1,6,0) +file included in the ZIP file for a listing of major changes that can be found +"BLD",160,1,7,0) +in version 2.1. +"BLD",160,1,8,0) + +"BLD",160,1,9,0) +Here is a sample install dialog: +"BLD",160,1,10,0) + +"BLD",160,1,11,0) + +"BLD",160,1,12,0) +PACKAGE: CW GUIMail 2.1 Jun 03, 1999 1:58 pm PAGE 1 +"BLD",160,1,13,0) + COMPLETED ELAPSED +"BLD",160,1,14,0) +----------------------------------------------------------------------------------------------------------------------------------- +"BLD",160,1,15,0) +STATUS: Install Completed DATE LOADED: JUN 01, 1999@14:02:49 +"BLD",160,1,16,0) +INSTALLED BY: SALMON,PHILLIP +"BLD",160,1,17,0) +NATIONAL PACKAGE: CW GUIMail +"BLD",160,1,18,0) + +"BLD",160,1,19,0) +INSTALL STARTED: JUN 01, 1999@14:03:03 14:03:13 0:00:10 +"BLD",160,1,20,0) + +"BLD",160,1,21,0) +ROUTINES: 14:03:04 0:00:01 +"BLD",160,1,22,0) + +"BLD",160,1,23,0) +FILES: +"BLD",160,1,24,0) +PARAMETER DEFINITION 14:03:04 +"BLD",160,1,25,0) +PARAMETER TEMPLATE 14:03:05 0:00:01 +"BLD",160,1,26,0) + +"BLD",160,1,27,0) +REMOTE PROCEDURE 14:03:08 0:00:03 +"BLD",160,1,28,0) +OPTION 14:03:09 0:00:01 +"BLD",160,1,29,0) + +"BLD",160,1,30,0) +POST-INIT CHECK POINTS: +"BLD",160,1,31,0) +XPD POSTINSTALL STARTED 14:03:12 0:00:03 +"BLD",160,1,32,0) +XPD POSTINSTALL COMPLETED 14:03:12 +"BLD",160,1,33,0) + +"BLD",160,1,34,0) +INSTALL QUESTION PROMPT ANSWER +"BLD",160,1,35,0) + +"BLD",160,1,36,0) +XPZ1 +"BLD",160,1,37,0) +MESSAGES: +"BLD",160,1,38,0) + +"BLD",160,1,39,0) + Install Started for CW GUIMail 2.1 : +"BLD",160,1,40,0) + Jun 01, 1999@14:03:03 +"BLD",160,1,41,0) + +"BLD",160,1,42,0) + Installing Routines: +"BLD",160,1,43,0) + Jun 01, 1999@14:03:04 +"BLD",160,1,44,0) + +"BLD",160,1,45,0) + Installing Data Dictionaries: +"BLD",160,1,46,0) + +"BLD",160,1,47,0) +Data Dictionary for File #8989.51 not installed. +"BLD",160,1,48,0) + +"BLD",160,1,49,0) +Data Dictionary for File #8989.52 not installed. +"BLD",160,1,50,0) + Jun 01, 1999@14:03:05 +"BLD",160,1,51,0) + +"BLD",160,1,52,0) + Installing Data: +"BLD",160,1,53,0) + Jun 01, 1999@14:03:08 +"BLD",160,1,54,0) + +"BLD",160,1,55,0) + Installing PACKAGE COMPONENTS: +"BLD",160,1,56,0) + +"BLD",160,1,57,0) + Installing REMOTE PROCEDURE +"BLD",160,1,58,0) + +"BLD",160,1,59,0) + Installing OPTION +"BLD",160,1,60,0) + Jun 01, 1999@14:03:09 +"BLD",160,1,61,0) + +"BLD",160,1,62,0) + Running Post-Install Routine: EN^CWMAINI +"BLD",160,1,63,0) + +"BLD",160,1,64,0) +There are 8 user(s) to convert +"BLD",160,1,65,0) +Beginning conversion of preferences... +"BLD",160,1,66,0) + +"BLD",160,1,67,0) +Preference conversion is finished. +"BLD",160,1,68,0) + +"BLD",160,1,69,0) +Removing CW GUI VISTA MAIL USER (890) File ... +"BLD",160,1,70,0) + +"BLD",160,1,71,0) + Updating Routine file... +"BLD",160,1,72,0) + +"BLD",160,1,73,0) + Updating KIDS files... +"BLD",160,1,74,0) + +"BLD",160,1,75,0) + CW GUIMail 2.1 Installed. +"BLD",160,1,76,0) + Jun 01, 1999@14:03:13 +"BLD",160,4,0) +^9.64PA^8989.52^2 +"BLD",160,4,8989.51,0) +8989.51 +"BLD",160,4,8989.51,222) +n^n^f^^y^^y^r^n +"BLD",160,4,8989.51,224) +I $E(^(0),1,4)="CWMA" +"BLD",160,4,8989.52,0) +8989.52 +"BLD",160,4,8989.52,222) +n^n^f^^y^^y^o^n +"BLD",160,4,8989.52,224) +I $E($P(^XTV(8989.52,+Y,0),"^"),1,4)="CWMA" +"BLD",160,4,"B",8989.51,8989.51) + +"BLD",160,4,"B",8989.52,8989.52) + +"BLD",160,"ABNS",0) +^9.66A^1^1 +"BLD",160,"ABNS",1,0) +CWMA +"BLD",160,"ABNS",1,1,0) +^9.661A^^ +"BLD",160,"ABNS","B","CWMA",1) + +"BLD",160,"ABPKG") +n^y^G.CAIRO_TECH_SUPPORT@INDIANAPOLIS.VA.GOV +"BLD",160,"INIT") +EN^CWMAINI +"BLD",160,"KRN",0) +^9.67PA^19^18 +"BLD",160,"KRN",.4,0) +.4 +"BLD",160,"KRN",.401,0) +.401 +"BLD",160,"KRN",.402,0) +.402 +"BLD",160,"KRN",.403,0) +.403 +"BLD",160,"KRN",.5,0) +.5 +"BLD",160,"KRN",.84,0) +.84 +"BLD",160,"KRN",3.6,0) +3.6 +"BLD",160,"KRN",3.8,0) +3.8 +"BLD",160,"KRN",9.2,0) +9.2 +"BLD",160,"KRN",9.8,0) +9.8 +"BLD",160,"KRN",9.8,"NM",0) +^9.68A^20^18 +"BLD",160,"KRN",9.8,"NM",1,0) +CWMACPPI^^0^B4934611 +"BLD",160,"KRN",9.8,"NM",2,0) +CWMAIL^^0^B16733706 +"BLD",160,"KRN",9.8,"NM",3,0) +CWMAIL0^^0^B20950040 +"BLD",160,"KRN",9.8,"NM",4,0) +CWMAIL1^^0^B14471507 +"BLD",160,"KRN",9.8,"NM",5,0) +CWMAIL2^^0^B22772090 +"BLD",160,"KRN",9.8,"NM",6,0) +CWMAIL3^^0^B5161423 +"BLD",160,"KRN",9.8,"NM",7,0) +CWMAIL4^^0^B1346202 +"BLD",160,"KRN",9.8,"NM",8,0) +CWMAILA^^0^B23618442 +"BLD",160,"KRN",9.8,"NM",9,0) +CWMAILB^^0^B21615660 +"BLD",160,"KRN",9.8,"NM",10,0) +CWMAILC^^0^B12646738 +"BLD",160,"KRN",9.8,"NM",11,0) +CWMAILD^^0^B18697748 +"BLD",160,"KRN",9.8,"NM",12,0) +CWMAILE^^0^B13183521 +"BLD",160,"KRN",9.8,"NM",15,0) +CWMAINI^^0^B8244845 +"BLD",160,"KRN",9.8,"NM",16,0) +CWMAPP^^0^B806108 +"BLD",160,"KRN",9.8,"NM",17,0) +CWMAPP01^^0^B2776736 +"BLD",160,"KRN",9.8,"NM",18,0) +CWMAILF^^0^B6688838 +"BLD",160,"KRN",9.8,"NM",19) +^^^ +"BLD",160,"KRN",9.8,"NM",19,0) +CWMAILSN^^1^ +"BLD",160,"KRN",9.8,"NM",20) +^^^ +"BLD",160,"KRN",9.8,"NM",20,0) +CWMAILSU^^1^ +"BLD",160,"KRN",9.8,"NM","B","CWMACPPI",1) + +"BLD",160,"KRN",9.8,"NM","B","CWMAIL",2) + +"BLD",160,"KRN",9.8,"NM","B","CWMAIL0",3) + +"BLD",160,"KRN",9.8,"NM","B","CWMAIL1",4) + +"BLD",160,"KRN",9.8,"NM","B","CWMAIL2",5) + +"BLD",160,"KRN",9.8,"NM","B","CWMAIL3",6) + +"BLD",160,"KRN",9.8,"NM","B","CWMAIL4",7) + +"BLD",160,"KRN",9.8,"NM","B","CWMAILA",8) + +"BLD",160,"KRN",9.8,"NM","B","CWMAILB",9) + +"BLD",160,"KRN",9.8,"NM","B","CWMAILC",10) + +"BLD",160,"KRN",9.8,"NM","B","CWMAILD",11) + +"BLD",160,"KRN",9.8,"NM","B","CWMAILE",12) + +"BLD",160,"KRN",9.8,"NM","B","CWMAILF",18) + +"BLD",160,"KRN",9.8,"NM","B","CWMAILSN",19) + +"BLD",160,"KRN",9.8,"NM","B","CWMAILSU",20) + +"BLD",160,"KRN",9.8,"NM","B","CWMAINI",15) + +"BLD",160,"KRN",9.8,"NM","B","CWMAPP",16) + +"BLD",160,"KRN",9.8,"NM","B","CWMAPP01",17) + +"BLD",160,"KRN",19,0) +19 +"BLD",160,"KRN",19,"NM",0) +^9.68A^1^1 +"BLD",160,"KRN",19,"NM",1,0) +CW MAIL^^0 +"BLD",160,"KRN",19,"NM","B","CW MAIL",1) + +"BLD",160,"KRN",19.1,0) +19.1 +"BLD",160,"KRN",101,0) +101 +"BLD",160,"KRN",409.61,0) +409.61 +"BLD",160,"KRN",771,0) +771 +"BLD",160,"KRN",869.2,0) +869.2 +"BLD",160,"KRN",870,0) +870 +"BLD",160,"KRN",8994,0) +8994 +"BLD",160,"KRN",8994,"NM",0) +^9.68A^1^1 +"BLD",160,"KRN",8994,"NM",1,0) +CW MAIL API^^0 +"BLD",160,"KRN",8994,"NM","B","CW MAIL API",1) + +"BLD",160,"KRN","B",.4,.4) + +"BLD",160,"KRN","B",.401,.401) + +"BLD",160,"KRN","B",.402,.402) + +"BLD",160,"KRN","B",.403,.403) + +"BLD",160,"KRN","B",.5,.5) + +"BLD",160,"KRN","B",.84,.84) + +"BLD",160,"KRN","B",3.6,3.6) + +"BLD",160,"KRN","B",3.8,3.8) + +"BLD",160,"KRN","B",9.2,9.2) + +"BLD",160,"KRN","B",9.8,9.8) + +"BLD",160,"KRN","B",19,19) + +"BLD",160,"KRN","B",19.1,19.1) + +"BLD",160,"KRN","B",101,101) + +"BLD",160,"KRN","B",409.61,409.61) + +"BLD",160,"KRN","B",771,771) + +"BLD",160,"KRN","B",869.2,869.2) + +"BLD",160,"KRN","B",870,870) + +"BLD",160,"KRN","B",8994,8994) + +"BLD",160,"PRE") +CWMAINI +"BLD",160,"QUES",0) +^9.62^^0 +"BLD",160,"REQB",0) +^9.611^^ +"DATA",8989.51,1,0) +CWMA SOUND MESSAGE OPEN^GUIMAIL MESSAGE OPEN SOUND^0^^Open Message Sound File Location +"DATA",8989.51,1,1) +F^^Enter the full path to the wav sound file +"DATA",8989.51,1,20,0) +^^4^4^2990423.100233 +"DATA",8989.51,1,20,1,0) +This parameter holds the full resolved path to the wav file that will be +"DATA",8989.51,1,20,2,0) +played on the client system when a message is opened. +"DATA",8989.51,1,20,3,0) + +"DATA",8989.51,1,20,4,0) +Client attribute: [Sound]Message Open +"DATA",8989.51,1,30,0) +^8989.513I^2^2 +"DATA",8989.51,1,30,1,0) +1^200 +"DATA",8989.51,1,30,2,0) +9^9.4 +"DATA",8989.51,2,0) +CWMA SOUND MESSAGE CLOSE^GUIMAIL MESSAGE CLOSE SOUND^0^^Close Message Sound File Location +"DATA",8989.51,2,1) +F^^Enter the full path to the wav sound file +"DATA",8989.51,2,20,0) +^^4^4^2990423.100321 +"DATA",8989.51,2,20,1,0) +This parameter holds the full resolved path to the wav file that will be +"DATA",8989.51,2,20,2,0) +played on the client system when a message is closed. +"DATA",8989.51,2,20,3,0) + +"DATA",8989.51,2,20,4,0) +Client attribute: [Sound]Message Close +"DATA",8989.51,2,30,0) +^8989.513I^2^2 +"DATA",8989.51,2,30,1,0) +1^200 +"DATA",8989.51,2,30,2,0) +9^9.4 +"DATA",8989.51,3,0) +CWMA SOUND NEW MAIL^GUIMAIL NEW MAIL SOUND^0^^New Mail Sound File Location +"DATA",8989.51,3,1) +F^^Enter the full path to the wav sound file +"DATA",8989.51,3,20,0) +^^4^4^2990423^ +"DATA",8989.51,3,20,1,0) +This parameter holds the full resolved path to the wav file that will be +"DATA",8989.51,3,20,2,0) +played on the client system when new mail is received. +"DATA",8989.51,3,20,3,0) + +"DATA",8989.51,3,20,4,0) +Client attribute: [Sound]New Mail +"DATA",8989.51,3,30,0) +^8989.513I^2^2 +"DATA",8989.51,3,30,1,0) +1^200 +"DATA",8989.51,3,30,2,0) +9^9.4 +"DATA",8989.51,4,0) +CWMA STARTUP NEW MAIL^GUIMAIL STARTUP RETRIEVE NEW MAIL^0^^Retrieve New Mail at Startup +"DATA",8989.51,4,1) +S^0:False;1:True^Enter 'True' or 'False' +"DATA",8989.51,4,2) + +"DATA",8989.51,4,20,0) +^^4^4^2981228^ +"DATA",8989.51,4,20,1,0) +This parameter holds a boolean value of 'True' or 'False' and is used by +"DATA",8989.51,4,20,2,0) +the client system to determine if New Mail will be displayed on Startup. +"DATA",8989.51,4,20,3,0) + +"DATA",8989.51,4,20,4,0) +Client attribute: [StartUp]StartUpNewMail= +"DATA",8989.51,4,30,0) +^8989.513I^2^2 +"DATA",8989.51,4,30,1,0) +1^200 +"DATA",8989.51,4,30,2,0) +9^9.4 +"DATA",8989.51,5,0) +CWMA STARTUP OPEN MAIL BOX^GUIMAIL OPEN MAIL BOX^0^^Open a Mail Box at Startup +"DATA",8989.51,5,1) +S^0:False;1:True^Enter 'True' or 'False' +"DATA",8989.51,5,20,0) +^^4^4^2990423.100148 +"DATA",8989.51,5,20,1,0) +This parameter holds the setting for mail box opening at start-up of the +"DATA",8989.51,5,20,2,0) +client application. +"DATA",8989.51,5,20,3,0) + +"DATA",8989.51,5,20,4,0) +Client attribute: [StartUp]StartUpOpenMailBoxName +"DATA",8989.51,5,30,0) +^8989.513I^2^2 +"DATA",8989.51,5,30,1,0) +1^200 +"DATA",8989.51,5,30,2,0) +9^9.4 +"DATA",8989.51,6,0) +CWMA STARTUP MAIL BOX NAME^GUIMAIL OPEN MAIL BOX NAME^0^^Mail Box Name to Open +"DATA",8989.51,6,1) +F^^Enter mail box name to open Name is case sensitive +"DATA",8989.51,6,20,0) +^^5^5^2990423^ +"DATA",8989.51,6,20,1,0) +This parameters holds the name of the Mail Box that will be opened at +"DATA",8989.51,6,20,2,0) +client application startup if the CWMA STARTUP OPEN MAIL BOX parameter is +"DATA",8989.51,6,20,3,0) +set to 1. This value is case sensitive. +"DATA",8989.51,6,20,4,0) + +"DATA",8989.51,6,20,5,0) +Client attribute: [StartUp]StartUpOpenMailBoxName +"DATA",8989.51,6,30,0) +^8989.513I^2^2 +"DATA",8989.51,6,30,1,0) +1^200 +"DATA",8989.51,6,30,2,0) +9^9.4 +"DATA",8989.51,7,0) +CWMA GENERAL CMA STYLE^GUIMAIL CMA STYLE DEFAULT^0^^Msg Attrib Style +"DATA",8989.51,7,1) +S^0:Use Menu;1:Show Checkboxes^Enter the display style on Create Message Form +"DATA",8989.51,7,20,0) +^^4^4^2981228.143111 +"DATA",8989.51,7,20,1,0) +This parameter holds the style that the Create Message Form will use to +"DATA",8989.51,7,20,2,0) +display Message Attributes. +"DATA",8989.51,7,20,3,0) + +"DATA",8989.51,7,20,4,0) +Client attribute: [General]CreateMessageAttributes +"DATA",8989.51,7,30,0) +^8989.513I^2^2 +"DATA",8989.51,7,30,1,0) +1^200 +"DATA",8989.51,7,30,2,0) +9^9.4 +"DATA",8989.51,8,0) +CWMA GENERAL MPD TAB^GUIMAIL MSG PROPERTIES DEFAULT TAB^0^^MSG Properties Default Tab +"DATA",8989.51,8,1) +S^0:Recipients;1:Message Info;2:Addressed To^Enter the default tab +"DATA",8989.51,8,20,0) +^^4^4^2981228.145529 +"DATA",8989.51,8,20,1,0) +This parameter holds the default Message Properties Tab that will display +"DATA",8989.51,8,20,2,0) +when viewing the message attributes. +"DATA",8989.51,8,20,3,0) + +"DATA",8989.51,8,20,4,0) +Client attribute: [General]MessagePropertiesDefaultTab +"DATA",8989.51,8,30,0) +^8989.513I^2^2 +"DATA",8989.51,8,30,1,0) +1^200 +"DATA",8989.51,8,30,2,0) +9^9.4 +"DATA",8989.51,9,0) +CWMA GENERAL NMP FREQ^GUIMAIL NEW MAIL POLLING FREQUENCY^0^^New Mail Polling Freq. +"DATA",8989.51,9,1) +N^1:360:0^Enter number of minutes for polling frequency +"DATA",8989.51,9,20,0) +^^4^4^2981228.145551 +"DATA",8989.51,9,20,1,0) +This parameter holds the number of minutes that the application will poll +"DATA",8989.51,9,20,2,0) +the VISTA mail server for new mail. +"DATA",8989.51,9,20,3,0) + +"DATA",8989.51,9,20,4,0) +Client attribute: [General]NewMailPollingFrequency +"DATA",8989.51,9,30,0) +^8989.513I^2^2 +"DATA",8989.51,9,30,1,0) +1^200 +"DATA",8989.51,9,30,2,0) +9^9.4 +"DATA",8989.51,10,0) +CWMA GENERAL MD COUNT^GUIMAIL # OF MSG DISPLAY COUNT^0^^Message Display Count +"DATA",8989.51,10,1) +N^1:49^Enter the number of messages to display +"DATA",8989.51,10,20,0) +^^4^4^2981228.145151 +"DATA",8989.51,10,20,1,0) +This parameter holds the number of messages to display in main message +"DATA",8989.51,10,20,2,0) +viewer. +"DATA",8989.51,10,20,3,0) + +"DATA",8989.51,10,20,4,0) +Client attribute: [General]MessageDisplayCount +"DATA",8989.51,10,30,0) +^8989.513I^2^2 +"DATA",8989.51,10,30,1,0) +1^200 +"DATA",8989.51,10,30,2,0) +9^9.4 +"DATA",8989.51,11,0) +CWMA GENERAL VISTA PRT^GUIMAIL DEFAULT VISTA PRINTER^0^^VISTA Printer Name +"DATA",8989.51,11,1) +F^^Enter the Vista printer name as defined in the Device File +"DATA",8989.51,11,20,0) +^^3^3^2981228.145625 +"DATA",8989.51,11,20,1,0) +This parameter holds the default Vista printer name. +"DATA",8989.51,11,20,2,0) + +"DATA",8989.51,11,20,3,0) +Client attribute: [General]DefaultVistaPrinter +"DATA",8989.51,11,30,0) +^8989.513I^2^2 +"DATA",8989.51,11,30,1,0) +1^200 +"DATA",8989.51,11,30,2,0) +9^9.4 +"DATA",8989.51,12,0) +CWMA SOUND PRIORITY MAIL^GUIMAIL PRIORITY MAIL SOUND^0^^Priority Message Sound File Location +"DATA",8989.51,12,1) +F^^Enter the full path to the wav sound file +"DATA",8989.51,12,20,0) +^^4^4^2990423.100209 +"DATA",8989.51,12,20,1,0) +This parameter holds the full resolved path to the wav file that will be +"DATA",8989.51,12,20,2,0) +played on the client system when a message is of type Priority. +"DATA",8989.51,12,20,3,0) + +"DATA",8989.51,12,20,4,0) +Client attribute: [Sound]Message Priority +"DATA",8989.51,12,30,0) +^8989.513I^2^2 +"DATA",8989.51,12,30,1,0) +1^200 +"DATA",8989.51,12,30,2,0) +9^9.4 +"DATA",8989.51,13,0) +CWMA GENERAL PRINTMODE^GUIMAIL DEFAULT PRINT MODE^0^^Print Mode +"DATA",8989.51,13,1) +S^0:Vista;1:Windows^Enter mode of default printing +"DATA",8989.51,13,20,0) +^^3^3^2990423^ +"DATA",8989.51,13,20,1,0) +This parameter holds the default mode of printing for the Print button. +"DATA",8989.51,13,20,2,0) + +"DATA",8989.51,13,20,3,0) +Client attribute: [General]DefaultPrintMode +"DATA",8989.51,13,30,0) +^8989.513I^2^2 +"DATA",8989.51,13,30,1,0) +1^200 +"DATA",8989.51,13,30,2,0) +9^9.4 +"DATA",8989.51,14,0) +CWMA GENERAL MD COL^GUIMAIL MSG DISPLAY COLUMN SETTINGS^1^Column Display Sequence^Column,Width +"DATA",8989.51,14,1) +F^^Example: 3,50 (Column Number (zero based), pixel width)(Pattern: 1.2N1","1.N) +"DATA",8989.51,14,2) +K:X'?1.2N1","1.N X +"DATA",8989.51,14,6) +N^1:7^Enter the sequence in which the columns will display +"DATA",8989.51,14,20,0) +^^7^7^2990422^^ +"DATA",8989.51,14,20,1,0) +This parameter holds the ordering of the columns and the column/width value +"DATA",8989.51,14,20,2,0) +pair. The value of each sequence instance will be in the following format: +"DATA",8989.51,14,20,3,0) + +"DATA",8989.51,14,20,4,0) +Column Number, a comma, and column width in pixels. The column number is +"DATA",8989.51,14,20,5,0) +zero based. +"DATA",8989.51,14,20,6,0) + +"DATA",8989.51,14,20,7,0) +Client attribute: [General]MessageDisplayColumns +"DATA",8989.51,14,30,0) +^8989.513I^2^2 +"DATA",8989.51,14,30,1,0) +1^200 +"DATA",8989.51,14,30,2,0) +9^9.4 +"DATA",8989.51,15,0) +CWMA SOUND ENABLED^GUIMAIL SOUND ENABLED^0^^Enable Sound +"DATA",8989.51,15,1) +S^0:False;1:True^Enter '1' to play sound, '0' to disable sound +"DATA",8989.51,15,20,0) +^^3^3^2990423.100335 +"DATA",8989.51,15,20,1,0) +This parameter holds the value of whether or not sound will be played. +"DATA",8989.51,15,20,2,0) + +"DATA",8989.51,15,20,3,0) +Client attribute: [Sound]Sound +"DATA",8989.51,15,30,0) +^8989.513I^2^2 +"DATA",8989.51,15,30,1,0) +1^200 +"DATA",8989.51,15,30,2,0) +9^9.4 +"DATA",8989.51,16,0) +CWMA ALLOW ATTACHMENTS^GUIMAIL ALLOW ATTACHMENTS^0^^Allow attachments to be added to message +"DATA",8989.51,16,1) +S^0:False;1:True^Enter 'True' or 'False' +"DATA",8989.51,16,20,0) +^^4^4^2990907^ +"DATA",8989.51,16,20,1,0) +This parameter holds a boolean value of 'True' or 'False' and is used by +"DATA",8989.51,16,20,2,0) +the client system to determine if a user can add attachments to messages. +"DATA",8989.51,16,20,3,0) + +"DATA",8989.51,16,20,4,0) +Client attribute: [General]AllowAttachments= +"DATA",8989.51,16,30,0) +^8989.513I^2^2 +"DATA",8989.51,16,30,1,0) +1^200 +"DATA",8989.51,16,30,2,0) +9^9.4 +"DATA",8989.52,1,0) +CWMA PACKAGE PARAMETERS^GUI Mail Package Parameters^9.4 +"DATA",8989.52,1,10,0) +^8989.521IA^16^16 +"DATA",8989.52,1,10,1,0) +1^4 +"DATA",8989.52,1,10,2,0) +2^5 +"DATA",8989.52,1,10,3,0) +3^6 +"DATA",8989.52,1,10,4,0) +4^7 +"DATA",8989.52,1,10,5,0) +5^8 +"DATA",8989.52,1,10,6,0) +6^9 +"DATA",8989.52,1,10,7,0) +7^10 +"DATA",8989.52,1,10,8,0) +8^13 +"DATA",8989.52,1,10,9,0) +9^11 +"DATA",8989.52,1,10,10,0) +10^14 +"DATA",8989.52,1,10,11,0) +20^1 +"DATA",8989.52,1,10,12,0) +21^2 +"DATA",8989.52,1,10,13,0) +22^12 +"DATA",8989.52,1,10,14,0) +23^3 +"DATA",8989.52,1,10,15,0) +15^15 +"DATA",8989.52,1,10,16,0) +30^16 +"DATA",8989.52,2,0) +CWMA USER PARAMETERS^GUI Mail Package Parameters^200 +"DATA",8989.52,2,10,0) +^8989.521IA^16^16 +"DATA",8989.52,2,10,1,0) +1^4 +"DATA",8989.52,2,10,2,0) +2^5 +"DATA",8989.52,2,10,3,0) +3^6 +"DATA",8989.52,2,10,4,0) +4^7 +"DATA",8989.52,2,10,5,0) +5^8 +"DATA",8989.52,2,10,6,0) +6^9 +"DATA",8989.52,2,10,7,0) +7^10 +"DATA",8989.52,2,10,8,0) +8^13 +"DATA",8989.52,2,10,9,0) +9^11 +"DATA",8989.52,2,10,10,0) +10^14 +"DATA",8989.52,2,10,11,0) +20^1 +"DATA",8989.52,2,10,12,0) +21^2 +"DATA",8989.52,2,10,13,0) +22^12 +"DATA",8989.52,2,10,14,0) +23^3 +"DATA",8989.52,2,10,15,0) +15^15 +"DATA",8989.52,2,10,16,0) +60^16 +"FIA",8989.51) +PARAMETER DEFINITION +"FIA",8989.51,0) +^XTV(8989.51, +"FIA",8989.51,0,0) +8989.51I +"FIA",8989.51,0,1) +n^n^f^^y^^y^r^n +"FIA",8989.51,0,10) + +"FIA",8989.51,0,11) +I $E(^(0),1,4)="CWMA" +"FIA",8989.51,0,"RLRO") + +"FIA",8989.51,0,"VR") +2.1^CW GUIMail +"FIA",8989.51,8989.51) +0 +"FIA",8989.51,8989.512) +0 +"FIA",8989.51,8989.513) +0 +"FIA",8989.52) +PARAMETER TEMPLATE +"FIA",8989.52,0) +^XTV(8989.52, +"FIA",8989.52,0,0) +8989.52I +"FIA",8989.52,0,1) +n^n^f^^y^^y^o^n +"FIA",8989.52,0,10) + +"FIA",8989.52,0,11) +I $E($P(^XTV(8989.52,+Y,0),"^"),1,4)="CWMA" +"FIA",8989.52,0,"RLRO") + +"FIA",8989.52,0,"VR") +2.1^CW GUIMail +"FIA",8989.52,8989.52) +0 +"FIA",8989.52,8989.521) +0 +"FRV1",8989.52,"1,0",3) +PACKAGE +"FRV1",8989.52,"1,0",3,"F") +;DIC( +"FRV1",8989.52,"1,10,1,0",2) +CWMA STARTUP NEW MAIL +"FRV1",8989.52,"1,10,1,0",2,"F") +;XTV(8989.51, +"FRV1",8989.52,"1,10,10,0",2) +CWMA GENERAL MD COL +"FRV1",8989.52,"1,10,10,0",2,"F") +;XTV(8989.51, +"FRV1",8989.52,"1,10,11,0",2) +CWMA SOUND MESSAGE OPEN +"FRV1",8989.52,"1,10,11,0",2,"F") +;XTV(8989.51, +"FRV1",8989.52,"1,10,12,0",2) +CWMA SOUND MESSAGE CLOSE +"FRV1",8989.52,"1,10,12,0",2,"F") +;XTV(8989.51, +"FRV1",8989.52,"1,10,13,0",2) +CWMA SOUND PRIORITY MAIL +"FRV1",8989.52,"1,10,13,0",2,"F") +;XTV(8989.51, +"FRV1",8989.52,"1,10,14,0",2) +CWMA SOUND NEW MAIL +"FRV1",8989.52,"1,10,14,0",2,"F") +;XTV(8989.51, +"FRV1",8989.52,"1,10,15,0",2) +CWMA SOUND ENABLED +"FRV1",8989.52,"1,10,15,0",2,"F") +;XTV(8989.51, +"FRV1",8989.52,"1,10,16,0",2) +CWMA ALLOW ATTACHMENTS +"FRV1",8989.52,"1,10,16,0",2,"F") +;XTV(8989.51, +"FRV1",8989.52,"1,10,2,0",2) +CWMA STARTUP OPEN MAIL BOX +"FRV1",8989.52,"1,10,2,0",2,"F") +;XTV(8989.51, +"FRV1",8989.52,"1,10,3,0",2) +CWMA STARTUP MAIL BOX NAME +"FRV1",8989.52,"1,10,3,0",2,"F") +;XTV(8989.51, +"FRV1",8989.52,"1,10,4,0",2) +CWMA GENERAL CMA STYLE +"FRV1",8989.52,"1,10,4,0",2,"F") +;XTV(8989.51, +"FRV1",8989.52,"1,10,5,0",2) +CWMA GENERAL MPD TAB +"FRV1",8989.52,"1,10,5,0",2,"F") +;XTV(8989.51, +"FRV1",8989.52,"1,10,6,0",2) +CWMA GENERAL NMP FREQ +"FRV1",8989.52,"1,10,6,0",2,"F") +;XTV(8989.51, +"FRV1",8989.52,"1,10,7,0",2) +CWMA GENERAL MD COUNT +"FRV1",8989.52,"1,10,7,0",2,"F") +;XTV(8989.51, +"FRV1",8989.52,"1,10,8,0",2) +CWMA GENERAL PRINTMODE +"FRV1",8989.52,"1,10,8,0",2,"F") +;XTV(8989.51, +"FRV1",8989.52,"1,10,9,0",2) +CWMA GENERAL VISTA PRT +"FRV1",8989.52,"1,10,9,0",2,"F") +;XTV(8989.51, +"FRV1",8989.52,"2,0",3) +NEW PERSON +"FRV1",8989.52,"2,0",3,"F") +;DIC( +"FRV1",8989.52,"2,10,1,0",2) +CWMA STARTUP NEW MAIL +"FRV1",8989.52,"2,10,1,0",2,"F") +;XTV(8989.51, +"FRV1",8989.52,"2,10,10,0",2) +CWMA GENERAL MD COL +"FRV1",8989.52,"2,10,10,0",2,"F") +;XTV(8989.51, +"FRV1",8989.52,"2,10,11,0",2) +CWMA SOUND MESSAGE OPEN +"FRV1",8989.52,"2,10,11,0",2,"F") +;XTV(8989.51, +"FRV1",8989.52,"2,10,12,0",2) +CWMA SOUND MESSAGE CLOSE +"FRV1",8989.52,"2,10,12,0",2,"F") +;XTV(8989.51, +"FRV1",8989.52,"2,10,13,0",2) +CWMA SOUND PRIORITY MAIL +"FRV1",8989.52,"2,10,13,0",2,"F") +;XTV(8989.51, +"FRV1",8989.52,"2,10,14,0",2) +CWMA SOUND NEW MAIL +"FRV1",8989.52,"2,10,14,0",2,"F") +;XTV(8989.51, +"FRV1",8989.52,"2,10,15,0",2) +CWMA SOUND ENABLED +"FRV1",8989.52,"2,10,15,0",2,"F") +;XTV(8989.51, +"FRV1",8989.52,"2,10,16,0",2) +CWMA ALLOW ATTACHMENTS +"FRV1",8989.52,"2,10,16,0",2,"F") +;XTV(8989.51, +"FRV1",8989.52,"2,10,2,0",2) +CWMA STARTUP OPEN MAIL BOX +"FRV1",8989.52,"2,10,2,0",2,"F") +;XTV(8989.51, +"FRV1",8989.52,"2,10,3,0",2) +CWMA STARTUP MAIL BOX NAME +"FRV1",8989.52,"2,10,3,0",2,"F") +;XTV(8989.51, +"FRV1",8989.52,"2,10,4,0",2) +CWMA GENERAL CMA STYLE +"FRV1",8989.52,"2,10,4,0",2,"F") +;XTV(8989.51, +"FRV1",8989.52,"2,10,5,0",2) +CWMA GENERAL MPD TAB +"FRV1",8989.52,"2,10,5,0",2,"F") +;XTV(8989.51, +"FRV1",8989.52,"2,10,6,0",2) +CWMA GENERAL NMP FREQ +"FRV1",8989.52,"2,10,6,0",2,"F") +;XTV(8989.51, +"FRV1",8989.52,"2,10,7,0",2) +CWMA GENERAL MD COUNT +"FRV1",8989.52,"2,10,7,0",2,"F") +;XTV(8989.51, +"FRV1",8989.52,"2,10,8,0",2) +CWMA GENERAL PRINTMODE +"FRV1",8989.52,"2,10,8,0",2,"F") +;XTV(8989.51, +"FRV1",8989.52,"2,10,9,0",2) +CWMA GENERAL VISTA PRT +"FRV1",8989.52,"2,10,9,0",2,"F") +;XTV(8989.51, +"INIT") +EN^CWMAINI +"KRN",19,11198,-1) +0^1 +"KRN",19,11198,0) +CW MAIL^CW MAIL^^B^^^^^^^^ +"KRN",19,11198,1,0) +^^1^1^2980925^ +"KRN",19,11198,1,1,0) +This menu option is used to validate the Broker Context of a user. +"KRN",19,11198,99) +57216,70477 +"KRN",19,11198,99.1) +56869,83450 +"KRN",19,11198,"RPC",0) +^19.05P^103^103 +"KRN",19,11198,"RPC",11,0) +DDR LISTER +"KRN",19,11198,"RPC",12,0) +DDR FILER +"KRN",19,11198,"RPC",13,0) +DDR GETS ENTRY DATA +"KRN",19,11198,"RPC",14,0) +DDR VALIDATOR +"KRN",19,11198,"RPC",15,0) +XWB GET VARIABLE VALUE +"KRN",19,11198,"RPC",52,0) +CW MAIL API +"KRN",19,11198,"RPC",92,0) +DDR FINDER +"KRN",19,11198,"RPC",100,0) +DDR DELETE ENTRY +"KRN",19,11198,"RPC",101,0) +DDR FIND1 +"KRN",19,11198,"RPC",102,0) +DDR GET DD HELP +"KRN",19,11198,"RPC",103,0) +DDR LOCK/UNLOCK NODE +"KRN",19,11198,"U") +CW MAIL +"KRN",8994,126,-1) +0^1 +"KRN",8994,126,0) +CW MAIL API^ENTRY^CWMAIL^4^P^^^1 +"KRN",8994,126,1,0) +^^2^2^2990805^^^^ +"KRN",8994,126,1,1,0) +The RPC Call is used by the Clinical Workstation GUI Vista Mail +"KRN",8994,126,1,2,0) + application. +"KRN",8994,126,2,0) +^8994.02A^2^2 +"KRN",8994,126,2,1,0) +PARAMETER^1^512 +"KRN",8994,126,2,2,0) +TEXT ARRAY^2 +"KRN",8994,126,2,"B","PARAMETER",1) + +"KRN",8994,126,2,"B","TEXT ARRAY",2) + +"MBREQ") +0 +"ORD",0,9.8) +9.8;;1;RTNF^XPDTA;RTNE^XPDTA +"ORD",0,9.8,0) +ROUTINE +"ORD",16,8994) +8994;16;1;;;;;;;RPCDEL^XPDIA1 +"ORD",16,8994,0) +REMOTE PROCEDURE +"ORD",18,19) +19;18;;;OPT^XPDTA;OPTF1^XPDIA;OPTE1^XPDIA;OPTF2^XPDIA;;OPTDEL^XPDIA +"ORD",18,19,0) +OPTION +"PGL",8989.52,0,3,.03) +USE ENTITY FROM^*P1'^DIC(^0;3^S DIC("S")="I $$ALLOW^XPARDD1(Y)" D ^DIC K DIC S DIC=DIE,X=+Y K:Y<0 X +"PGL",8989.52,0,4,.04) +USE INSTANCE FROM^P8989.51'^XTV(8989.51,^0;4^Q +"PGL",8989.521,0,2,.02) +PARAMETER^P8989.51'^XTV(8989.51,^0;2^Q +"PKG",439,-1) +1^1 +"PKG",439,0) +CW GUIMail^CWMA^CW GUIMail +"PKG",439,1,0) +^^2^2^2990805^^^^ +"PKG",439,1,1,0) +This package holds the Clinical Workstation GUIMail files and +"PKG",439,1,2,0) +specifications. +"PKG",439,5) +INDPLS +"PKG",439,7) +^^III +"PKG",439,20,0) +^9.402P^^ +"PKG",439,22,0) +^9.49I^1^1 +"PKG",439,22,1,0) +2.1^2990920 +"PKG",439,22,1,1,0) +^^76^76^2990920 +"PKG",439,22,1,1,1,0) +This KIDS Build will install Version 2.1 of Vista GuiMail. This installation +"PKG",439,22,1,1,2,0) +makes the GuiMail Server software compatible with MailMan v7.1 after patch 50 +"PKG",439,22,1,1,3,0) +has been installed. The version 2.1 GuiMail Client software was be installed +"PKG",439,22,1,1,4,0) +and used on the PC side. Please refer to the ReadMe.Txt file in the ZIP file +"PKG",439,22,1,1,5,0) +for instructions regarding installation. Also, refer to the GuiMail_Changes.Txt +"PKG",439,22,1,1,6,0) +file included in the ZIP file for a listing of major changes that can be found +"PKG",439,22,1,1,7,0) +in version 2.1. +"PKG",439,22,1,1,8,0) + +"PKG",439,22,1,1,9,0) +Here is a sample install dialog: +"PKG",439,22,1,1,10,0) + +"PKG",439,22,1,1,11,0) + +"PKG",439,22,1,1,12,0) +PACKAGE: CW GUIMail 2.1 Jun 03, 1999 1:58 pm PAGE 1 +"PKG",439,22,1,1,13,0) + COMPLETED ELAPSED +"PKG",439,22,1,1,14,0) +----------------------------------------------------------------------------------------------------------------------------------- +"PKG",439,22,1,1,15,0) +STATUS: Install Completed DATE LOADED: JUN 01, 1999@14:02:49 +"PKG",439,22,1,1,16,0) +INSTALLED BY: SALMON,PHILLIP +"PKG",439,22,1,1,17,0) +NATIONAL PACKAGE: CW GUIMail +"PKG",439,22,1,1,18,0) + +"PKG",439,22,1,1,19,0) +INSTALL STARTED: JUN 01, 1999@14:03:03 14:03:13 0:00:10 +"PKG",439,22,1,1,20,0) + +"PKG",439,22,1,1,21,0) +ROUTINES: 14:03:04 0:00:01 +"PKG",439,22,1,1,22,0) + +"PKG",439,22,1,1,23,0) +FILES: +"PKG",439,22,1,1,24,0) +PARAMETER DEFINITION 14:03:04 +"PKG",439,22,1,1,25,0) +PARAMETER TEMPLATE 14:03:05 0:00:01 +"PKG",439,22,1,1,26,0) + +"PKG",439,22,1,1,27,0) +REMOTE PROCEDURE 14:03:08 0:00:03 +"PKG",439,22,1,1,28,0) +OPTION 14:03:09 0:00:01 +"PKG",439,22,1,1,29,0) + +"PKG",439,22,1,1,30,0) +POST-INIT CHECK POINTS: +"PKG",439,22,1,1,31,0) +XPD POSTINSTALL STARTED 14:03:12 0:00:03 +"PKG",439,22,1,1,32,0) +XPD POSTINSTALL COMPLETED 14:03:12 +"PKG",439,22,1,1,33,0) + +"PKG",439,22,1,1,34,0) +INSTALL QUESTION PROMPT ANSWER +"PKG",439,22,1,1,35,0) + +"PKG",439,22,1,1,36,0) +XPZ1 +"PKG",439,22,1,1,37,0) +MESSAGES: +"PKG",439,22,1,1,38,0) + +"PKG",439,22,1,1,39,0) + Install Started for CW GUIMail 2.1 : +"PKG",439,22,1,1,40,0) + Jun 01, 1999@14:03:03 +"PKG",439,22,1,1,41,0) + +"PKG",439,22,1,1,42,0) + Installing Routines: +"PKG",439,22,1,1,43,0) + Jun 01, 1999@14:03:04 +"PKG",439,22,1,1,44,0) + +"PKG",439,22,1,1,45,0) + Installing Data Dictionaries: +"PKG",439,22,1,1,46,0) + +"PKG",439,22,1,1,47,0) +Data Dictionary for File #8989.51 not installed. +"PKG",439,22,1,1,48,0) + +"PKG",439,22,1,1,49,0) +Data Dictionary for File #8989.52 not installed. +"PKG",439,22,1,1,50,0) + Jun 01, 1999@14:03:05 +"PKG",439,22,1,1,51,0) + +"PKG",439,22,1,1,52,0) + Installing Data: +"PKG",439,22,1,1,53,0) + Jun 01, 1999@14:03:08 +"PKG",439,22,1,1,54,0) + +"PKG",439,22,1,1,55,0) + Installing PACKAGE COMPONENTS: +"PKG",439,22,1,1,56,0) + +"PKG",439,22,1,1,57,0) + Installing REMOTE PROCEDURE +"PKG",439,22,1,1,58,0) + +"PKG",439,22,1,1,59,0) + Installing OPTION +"PKG",439,22,1,1,60,0) + Jun 01, 1999@14:03:09 +"PKG",439,22,1,1,61,0) + +"PKG",439,22,1,1,62,0) + Running Post-Install Routine: EN^CWMAINI +"PKG",439,22,1,1,63,0) + +"PKG",439,22,1,1,64,0) +There are 8 user(s) to convert +"PKG",439,22,1,1,65,0) +Beginning conversion of preferences... +"PKG",439,22,1,1,66,0) + +"PKG",439,22,1,1,67,0) +Preference conversion is finished. +"PKG",439,22,1,1,68,0) + +"PKG",439,22,1,1,69,0) +Removing CW GUI VISTA MAIL USER (890) File ... +"PKG",439,22,1,1,70,0) + +"PKG",439,22,1,1,71,0) + Updating Routine file... +"PKG",439,22,1,1,72,0) + +"PKG",439,22,1,1,73,0) + Updating KIDS files... +"PKG",439,22,1,1,74,0) + +"PKG",439,22,1,1,75,0) + CW GUIMail 2.1 Installed. +"PKG",439,22,1,1,76,0) + Jun 01, 1999@14:03:13 +"PKG",439,"DEV") +Phillip Salmon/Indianapolis VAMC +"PKG",439,"VERSION") +2.1 +"PRE") +CWMAINI +"QUES","XPF1",0) +Y +"QUES","XPF1","??") +^D REP^XPDH +"QUES","XPF1","A") +Shall I write over your |FLAG| File +"QUES","XPF1","B") +YES +"QUES","XPF1","M") +D XPF1^XPDIQ +"QUES","XPF2",0) +Y +"QUES","XPF2","??") +^D DTA^XPDH +"QUES","XPF2","A") +Want my data |FLAG| yours +"QUES","XPF2","B") +YES +"QUES","XPF2","M") +D XPF2^XPDIQ +"QUES","XPI1",0) +YO +"QUES","XPI1","??") +^D INHIBIT^XPDH +"QUES","XPI1","A") +Want KIDS to INHIBIT LOGONs during the install +"QUES","XPI1","B") +YES +"QUES","XPI1","M") +D XPI1^XPDIQ +"QUES","XPM1",0) +PO^VA(200,:EM +"QUES","XPM1","??") +^D MG^XPDH +"QUES","XPM1","A") +Enter the Coordinator for Mail Group '|FLAG|' +"QUES","XPM1","B") + +"QUES","XPM1","M") +D XPM1^XPDIQ +"QUES","XPO1",0) +Y +"QUES","XPO1","??") +^D MENU^XPDH +"QUES","XPO1","A") +Want KIDS to Rebuild Menu Trees Upon Completion of Install +"QUES","XPO1","B") +YES +"QUES","XPO1","M") +D XPO1^XPDIQ +"QUES","XPZ1",0) +Y +"QUES","XPZ1","??") +^D OPT^XPDH +"QUES","XPZ1","A") +Want to DISABLE Scheduled Options, Menu Options, and Protocols +"QUES","XPZ1","B") +YES +"QUES","XPZ1","M") +D XPZ1^XPDIQ +"QUES","XPZ2",0) +Y +"QUES","XPZ2","??") +^D RTN^XPDH +"QUES","XPZ2","A") +Want to MOVE routines to other CPUs +"QUES","XPZ2","B") +NO +"QUES","XPZ2","M") +D XPZ2^XPDIQ +"RTN") +18 +"RTN","CWMACPPI") +0^1^B4934611 +"RTN","CWMACPPI",1,0) +CWMACPPI ;RVAMC/PLS - Convert Personal Preferences to Parameters Utility;26-Aug-1999 12:44;PS +"RTN","CWMACPPI",2,0) + ;;2.1;CWMA GuiMail;;Jan 06, 1999 +"RTN","CWMACPPI",3,0) + ;Call EN to convert Personal Preferences from File 890 +"RTN","CWMACPPI",4,0) + ;to the Kernel Toolkit Parameter File. +"RTN","CWMACPPI",5,0) +EN ;entry point +"RTN","CWMACPPI",6,0) + N CWLP,CWCNT,DTOUT,DUOUT,DIR,X,Y +"RTN","CWMACPPI",7,0) + ;check for existing CWMAIL1 global containing preferences +"RTN","CWMACPPI",8,0) + I '$D(^CWMAIL1) D BMES^XPDUTL("CWMAIL1 Global doesn't exist! Conversion of preferences not needed.") Q +"RTN","CWMACPPI",9,0) + S (CWCNT,CWLP)=0 F S CWLP=$O(^CWMAIL1(CWLP)) Q:CWLP<1 D +"RTN","CWMACPPI",10,0) + . I $D(^CWMAIL1(CWLP,1,1,0)) S CWCNT=CWCNT+1 +"RTN","CWMACPPI",11,0) + D BMES^XPDUTL("There are "_CWCNT_" user(s) to convert") +"RTN","CWMACPPI",12,0) + D UPDATE^XPDID(0) ;init progress bar +"RTN","CWMACPPI",13,0) + D MES^XPDUTL("Beginning conversion of preferences...") +"RTN","CWMACPPI",14,0) + D LOOP +"RTN","CWMACPPI",15,0) + Q +"RTN","CWMACPPI",16,0) +LOOP ;loop thru users +"RTN","CWMACPPI",17,0) + N CWUSR,CWLP,CWTXT,CWVAL,CWPREF,CWCNTC,XPDIDTOT +"RTN","CWMACPPI",18,0) + S CWUSR=0 +"RTN","CWMACPPI",19,0) + S XPDIDTOT=CWCNT ;set total number +"RTN","CWMACPPI",20,0) + F S CWUSR=$O(^CWMAIL1(CWUSR)) Q:CWUSR<1 D +"RTN","CWMACPPI",21,0) + . S CWCNTC=+$G(CWCNTC)+1 +"RTN","CWMACPPI",22,0) + . I CWCNTC#10=0 D UPDATE^XPDID(CWCNTC) +"RTN","CWMACPPI",23,0) + . S CWPREF=$O(^CWMAIL1(CWUSR,1,"B","PREFERENCES",0)) ;get node +"RTN","CWMACPPI",24,0) + . Q:'CWPREF ;no preferences stored +"RTN","CWMACPPI",25,0) + . S CWLP=0 F S CWLP=$O(^CWMAIL1(CWUSR,1,CWPREF,1,CWLP)) Q:CWLP<1 D +"RTN","CWMACPPI",26,0) + . . S CWTXT=^CWMAIL1(CWUSR,1,CWPREF,1,CWLP,0) ;get node text +"RTN","CWMACPPI",27,0) + . . I CWTXT'?1"[".E1"]" D +"RTN","CWMACPPI",28,0) + . . . S CWPRM=$$GETPRM^CWMAILE($P(CWTXT,"=")) ;get parameter +"RTN","CWMACPPI",29,0) + . . . I $L(CWPRM) D +"RTN","CWMACPPI",30,0) + . . . . S CWVAL=$$STRIP^XLFSTR($P(CWTXT,"=",2)," ") ;get value +"RTN","CWMACPPI",31,0) + . . . . I CWPRM="1|CWMA GENERAL MD COL" D +"RTN","CWMACPPI",32,0) + . . . . . S CWVAL=CWVAL_$S($E(CWVAL,$L(CWVAL))=";":"6,38",1:";6,38") ;add data for new column +"RTN","CWMACPPI",33,0) + . . . . S CWERR=$$SETPARM^CWMAILD(CWUSR,CWPRM,CWVAL) ;set value into parameter +"RTN","CWMACPPI",34,0) + D BMES^XPDUTL("Preference conversion is finished.") +"RTN","CWMACPPI",35,0) + Q +"RTN","CWMAIL") +0^2^B16733706 +"RTN","CWMAIL",1,0) +CWMAIL ;INDPLS/PLS- DELPHI VISTA MAIL SERVER ;16-Sep-1999 07:47;PS +"RTN","CWMAIL",2,0) + ;;2.1;CWMA GuiMail;;Jan 06, 1999 +"RTN","CWMAIL",3,0) + Q ;ROUTINE CAN'T BE CALLED DIRECTLY +"RTN","CWMAIL",4,0) +ENTRY(CWDATA,CWINPUT,CWTEXT) ;CALL WITH CWINPUT=CALL;DUZ;MSG;BASKET;NEW BASKET;NEWMAIL, TEXT=TEXT ARRAY +"RTN","CWMAIL",5,0) + N CWCALL,X,DUZ,CWMHDR,CWMST,U,CWSVER +"RTN","CWMAIL",6,0) + ;REMOVED XMDUZ FROM BEING NEW STATEMENT +"RTN","CWMAIL",7,0) + I $$NEWERR^%ZTER N $ET S $ET="" +"RTN","CWMAIL",8,0) + S U="^" +"RTN","CWMAIL",9,0) + S $ZT="ERR^CWMAIL" +"RTN","CWMAIL",10,0) + K CWDATA +"RTN","CWMAIL",11,0) + S CWDATA(1)="0^^AN ERROR HAS OCCURRED" +"RTN","CWMAIL",12,0) + S CWCALL="%"_$$UP^XLFSTR($P(CWINPUT,";")) ;HOLDS TAG +"RTN","CWMAIL",13,0) + S DUZ=$P(CWINPUT,";",2) +"RTN","CWMAIL",14,0) + D DUZ^XUP(DUZ) ;SETUP DUZ ARRAY +"RTN","CWMAIL",15,0) + D INIT^XMVVITAE ;UPDATE MAILMAN STATUS +"RTN","CWMAIL",16,0) + S CWINPUT=$P(CWINPUT,";",3,999) +"RTN","CWMAIL",17,0) + D PURGNAM +"RTN","CWMAIL",18,0) + I CWCALL?1"%"1.7A,$T(@CWCALL)'="" D @(CWCALL_"(.CWDATA,CWINPUT,.CWTEXT)") +"RTN","CWMAIL",19,0) + Q +"RTN","CWMAIL",20,0) +ERR D @^%ZOSF("ERRTN") +"RTN","CWMAIL",21,0) + D RETGNAM +"RTN","CWMAIL",22,0) + Q ; +"RTN","CWMAIL",23,0) +%READ(CWDATA,CWINPUT,CWTEXT) ; +"RTN","CWMAIL",24,0) + D %READ^CWMAILA(.CWDATA,CWINPUT) +"RTN","CWMAIL",25,0) + Q +"RTN","CWMAIL",26,0) +%LIST(CWDATA,CWINPUT,CWTEXT) ; +"RTN","CWMAIL",27,0) + ;CWINPUT = MAIL TYPE OR MAILBOX NUMBER; +"RTN","CWMAIL",28,0) + D %LIST^CWMAILA(.CWDATA,CWINPUT),RETGNAM +"RTN","CWMAIL",29,0) + Q +"RTN","CWMAIL",30,0) +%DELETE(CWDATA,CWINPUT,CWTEXT) ; +"RTN","CWMAIL",31,0) + D %DELETE^CWMAILA(.CWDATA,CWINPUT),RETGNAM +"RTN","CWMAIL",32,0) + Q +"RTN","CWMAIL",33,0) +%SAVE(CWDATA,CWINPUT,CWTEXT) ; +"RTN","CWMAIL",34,0) + D %SAVE^CWMAILA(.CWDATA,CWINPUT),RETGNAM +"RTN","CWMAIL",35,0) + Q +"RTN","CWMAIL",36,0) +%MAKNEW(CWDATA,CWINPUT,CWTEXT) ; +"RTN","CWMAIL",37,0) + D %MAKNEW^CWMAILA(.CWDATA,CWINPUT),RETGNAM +"RTN","CWMAIL",38,0) + Q +"RTN","CWMAIL",39,0) +%NEWBSK(CWDATA,CWINPUT,CWTEXT) ;CREATE A NEW MAIL BASKET +"RTN","CWMAIL",40,0) + D %NEWBSK^CWMAILA(.CWDATA,CWINPUT),RETGNAM +"RTN","CWMAIL",41,0) + Q +"RTN","CWMAIL",42,0) +%RESEQ(CWDATA,CWINPUT,CWTEXT) ;RESEQUENCE A VISTA MAIL BASKET +"RTN","CWMAIL",43,0) + D %RESEQ^CWMAILA(.CWDATA,CWINPUT),RETGNAM +"RTN","CWMAIL",44,0) + Q +"RTN","CWMAIL",45,0) +%REPLY(CWDATA,CWINPUT,CWTEXT) ; +"RTN","CWMAIL",46,0) + D %REPLY^CWMAILB(.CWDATA,CWINPUT,.CWTEXT),RETGNAM +"RTN","CWMAIL",47,0) + Q +"RTN","CWMAIL",48,0) +%FORWARD(CWDATA,CWINPUT,CWTEXT) ; +"RTN","CWMAIL",49,0) + ;M ^TMP("CWMAIL","FORWARD",$H)=CWTEXT +"RTN","CWMAIL",50,0) + ;S ^TMP("CWMAIL","CWINPUT",$J)=CWINPUT +"RTN","CWMAIL",51,0) + D %FORWARD^CWMAILB(.CWDATA,CWINPUT,.CWTEXT),RETGNAM +"RTN","CWMAIL",52,0) + Q +"RTN","CWMAIL",53,0) +%ANSWER(CWDATA,CWINPUT,CWTEXT) ; +"RTN","CWMAIL",54,0) + D %ANSWER^CWMAILB(.CWDATA,CWINPUT,.CWTEXT),RETGNAM +"RTN","CWMAIL",55,0) + Q +"RTN","CWMAIL",56,0) +%TERMIN(CWDATA,CWINPUT,CWTEXT) ;TERMINATE A MESSAGE THREAD +"RTN","CWMAIL",57,0) + D %TERMIN^CWMAILB(.CWDATA,CWINPUT),RETGNAM +"RTN","CWMAIL",58,0) + Q +"RTN","CWMAIL",59,0) +%CREATE(CWDATA,CWINPUT,CWTEXT) ;CREATE A NEW MESSAGE +"RTN","CWMAIL",60,0) + D %CREATE^CWMAIL2(.CWDATA,CWINPUT,.CWTEXT),RETGNAM +"RTN","CWMAIL",61,0) + Q +"RTN","CWMAIL",62,0) +%LATER(CWDATA,CWINPUT,CWTEXT) ;LATER A MESSAGE +"RTN","CWMAIL",63,0) + D %LATER^CWMAILC(.CWDATA,CWINPUT),RETGNAM +"RTN","CWMAIL",64,0) + Q +"RTN","CWMAIL",65,0) + ; +"RTN","CWMAIL",66,0) +%MBOX(CWDATA,CWINPUT,CWTEXT) ;RETRIEVE MAILBOXES +"RTN","CWMAIL",67,0) + D %MBOX^CWMAILC(.CWDATA,CWINPUT),RETGNAM +"RTN","CWMAIL",68,0) + Q +"RTN","CWMAIL",69,0) +%PMBOX(CWDATA,CWINPUT,CWTEXT) ;PURGE ENTIRE MAIL BOX +"RTN","CWMAIL",70,0) + D %PMBOX^CWMAILC(.CWDATA,CWINPUT),RETGNAM +"RTN","CWMAIL",71,0) + Q +"RTN","CWMAIL",72,0) +%RNMBOX(CWDATA,CWINPUT,CWTEXT) ;RENAME EXISTING MAILBOX +"RTN","CWMAIL",73,0) + D %RNMBOX^CWMAILC(.CWDATA,CWINPUT),RETGNAM +"RTN","CWMAIL",74,0) + Q +"RTN","CWMAIL",75,0) +%MSGRCP(CWDATA,CWINPUT,CWTEXT) ; RETURNS A LIST OF MESSAGE RECIPIENTS +"RTN","CWMAIL",76,0) + D %MSGRCP^CWMAILC(.CWDATA,CWINPUT) ;,RETGNAM +"RTN","CWMAIL",77,0) + Q +"RTN","CWMAIL",78,0) +%NETINFO(CWDATA,CWINPUT,CWTEXT) ; RETURNS NETWORK TRANSMISSION INFO +"RTN","CWMAIL",79,0) + D %NETINFO^CWMAILC(.CWDATA,CWINPUT) ;,RETGNAM +"RTN","CWMAIL",80,0) + Q +"RTN","CWMAIL",81,0) +%ADRSTO(CWDATA,CWINPUT,CWTEXT) ;RETURNS ARRAY OF ADDRESSED TO +"RTN","CWMAIL",82,0) + D %ADRSTO^CWMAILC(.CWDATA,CWINPUT) ;,RETGNAM +"RTN","CWMAIL",83,0) + Q +"RTN","CWMAIL",84,0) +%GRPINF(CWDATA,CWINPUT,CWTEXT) ;MAIL GROUP INFO +"RTN","CWMAIL",85,0) + D %GRPINF^CWMAILC(.CWDATA,CWINPUT),RETGNAM +"RTN","CWMAIL",86,0) + Q +"RTN","CWMAIL",87,0) +%USRINF(CWDATA,CWINPUT,CWTEXT) ; MAIL USER INFO +"RTN","CWMAIL",88,0) + ;CWINPUT = MAIL USER IEN +"RTN","CWMAIL",89,0) + D %USRINF^CWMAILC(.CWDATA,CWINPUT),RETGNAM +"RTN","CWMAIL",90,0) + Q +"RTN","CWMAIL",91,0) +%PERPREF(CWDATA,CWINPUT,CWTEXT) ;RETRIEVE PERSONAL PREFERENCES +"RTN","CWMAIL",92,0) + ;CWINPUT = MAIL USER IEN;SAVE NAME +"RTN","CWMAIL",93,0) + D %PERPREF^CWMAILD(.CWDATA,CWINPUT),RETGNAM +"RTN","CWMAIL",94,0) + Q +"RTN","CWMAIL",95,0) +%USRLOG(CWDATA,CWINPUT,CWTEXT) ;LOG USER INTO GUI MAIL LOG +"RTN","CWMAIL",96,0) + ;CWINPUT = DUZ +"RTN","CWMAIL",97,0) + D %USRLOG^CWMAILD(.CWDATA,DUZ),RETGNAM +"RTN","CWMAIL",98,0) + Q +"RTN","CWMAIL",99,0) +%BMSGD(CWDATA,CWINPUT,CWTEXT) ;BUILD MSG INFO INTO GLOBAL +"RTN","CWMAIL",100,0) + ; +"RTN","CWMAIL",101,0) + D %BMSGD^CWMAILD(.CWDATA,CWINPUT,.CWTEXT),RETGNAM +"RTN","CWMAIL",102,0) + Q +"RTN","CWMAIL",103,0) +%SUPREF(CWDATA,CWINPUT,CWTEXT) ;SET USER PREFERENCES +"RTN","CWMAIL",104,0) + ; +"RTN","CWMAIL",105,0) + D %SUPREF^CWMAILD(.CWDATA,CWINPUT,.CWTEXT),RETGNAM +"RTN","CWMAIL",106,0) + Q +"RTN","CWMAIL",107,0) +RETGNAM ;RETURNS A $NAME FOR GLOBAL AFTER MERGING +"RTN","CWMAIL",108,0) + M ^TMP($J,"CWMAIL")=CWDATA +"RTN","CWMAIL",109,0) + K CWDATA S CWDATA=$NA(^TMP($J,"CWMAIL")) +"RTN","CWMAIL",110,0) + Q +"RTN","CWMAIL",111,0) +PURGNAM ;PURGE GLOBAL ARRAY USED FOR DATA RETURN +"RTN","CWMAIL",112,0) + K ^TMP($J,"CWMAIL") +"RTN","CWMAIL",113,0) + Q +"RTN","CWMAIL",114,0) +%CHKMAIL(CWDATA,CWINPUT,CWTEXT) ;CHECK FOR NEW MAIL +"RTN","CWMAIL",115,0) + ;CWINPUT = DUZ +"RTN","CWMAIL",116,0) + D %CHKMAIL^CWMAILD(.CWDATA,DUZ),RETGNAM +"RTN","CWMAIL",117,0) + Q +"RTN","CWMAIL",118,0) +%PRINT(CWDATA,CWINPUT,CWTEXT) ;PRINT A MESSAGE +"RTN","CWMAIL",119,0) + ; +"RTN","CWMAIL",120,0) + D %PRTMSG^CWMAILD(.CWDATA,CWINPUT),RETGNAM +"RTN","CWMAIL",121,0) + Q +"RTN","CWMAIL",122,0) +%GETSVER(CWDATA,CWINPUT,CWTEXT) ;GET SERVER VERSION +"RTN","CWMAIL",123,0) + ; +"RTN","CWMAIL",124,0) + D %GETSVER^CWMAILD(.CWDATA,CWINPUT),RETGNAM +"RTN","CWMAIL",125,0) + Q +"RTN","CWMAIL",126,0) +%MSGSRC(CWDATA,CWINPUT,CWTEXT) ;SEARCH AND RETURN SELECTED MESSAGES +"RTN","CWMAIL",127,0) + ; +"RTN","CWMAIL",128,0) + D %MSGSRC^CWMAILA(.CWDATA,CWINPUT,.CWTEXT),RETGNAM +"RTN","CWMAIL",129,0) + Q +"RTN","CWMAIL",130,0) +%MSGISRC(CWDATA,CWINPUT,CWTEXT) ;SEARCH FOR A SPECIFIC MESSAGE NUMBER +"RTN","CWMAIL",131,0) + ; +"RTN","CWMAIL",132,0) + D %MSGISRC^CWMAILF(.CWDATA,CWINPUT),RETGNAM +"RTN","CWMAIL",133,0) + Q +"RTN","CWMAIL",134,0) + ; +"RTN","CWMAIL0") +0^3^B20950040 +"RTN","CWMAIL0",1,0) +CWMAIL0 ;INDPLS/PLS- DELPHI MAIL SERVER, CONT'D ;04-Jun-1999 14:54;PS +"RTN","CWMAIL0",2,0) + ;;2.1;CWMA GuiMail;;Jan 06, 1999 +"RTN","CWMAIL0",3,0) + Q ;ROUTINE CAN'T BE CALLED DIRECTLY +"RTN","CWMAIL0",4,0) + ; +"RTN","CWMAIL0",5,0) +PROCMS(CWDATA,CWMSGN,CWNMFLG) ;PROCESS MAIL MESSAGE THREAD +"RTN","CWMAIL0",6,0) + N CWRE,CWCNT,CWRSP,CWNWMSG,CWDATT,CWLCNT,CWLP,CWCONFRM,CW +"RTN","CWMAIL0",7,0) + N CWIM,CWIU,CWINSTR,CWFLAGS,CWIR +"RTN","CWMAIL0",8,0) + D INMSG^XMXUTIL2(XMDUZ,$$BSKT^XMXUTIL2(XMDUZ,CWMSGN),CWMSGN,,"F",.CWIM,.CWINSTR,.CWIU) ;SET-UP MESSAGE INFO +"RTN","CWMAIL0",9,0) + S CWDATA=$NA(^TMP($J,"CWMAIL")) +"RTN","CWMAIL0",10,0) + S CWNWMSG=$G(CWIM("FROM"))["@" ;NETWORK MESSAGE +"RTN","CWMAIL0",11,0) + S CWCNT=2,CWLCNT=0 +"RTN","CWMAIL0",12,0) + S @CWDATA@(CWCNT)="Mail Message From: "_$G(CWIM("FROM NAME"))_" "_"Dated: "_$$FMDTE^CWMAIL4(CWIM("DATE FM"),"5MZ") +"RTN","CWMAIL0",13,0) + S CWCNT=$$INCNT(CWCNT),@CWDATA@(CWCNT)="Subject: "_$G(CWIM("SUBJ")) +"RTN","CWMAIL0",14,0) + S CWCNT=$$INCNT(CWCNT),@CWDATA@(CWCNT)="" +"RTN","CWMAIL0",15,0) + ;I 'CWNMFLG!(CWNMFLG&($G(CWIM("RESP"))<1))!(CWNMFLG&(+$G(CWIM("RESP"))=+$G(CWIM("RESPS")))) +"RTN","CWMAIL0",16,0) + I 'CWNMFLG!(CWNMFLG&(+$G(CWIU("RESP"))<1))!(CWNMFLG&(+$G(CWIU("RESP"))=+$G(CWIM("RESPS")))) D READM(.CWDATA,CWMSGN,.CWCNT) +"RTN","CWMAIL0",17,0) + S CWCONFRM="" +"RTN","CWMAIL0",18,0) + D LASTACC(CWMSGN,$$BSKT^XMXUTIL2(XMDUZ,CWMSGN),0,.CWCONFRM) ;UPDATE LAST ACCESS DATE/TIME +"RTN","CWMAIL0",19,0) + ;PROCESS RESPONSES +"RTN","CWMAIL0",20,0) + I $G(CWIM("RESPS"))>0 D +"RTN","CWMAIL0",21,0) + . S CWLP=$S(+$G(CWIU("RESP"))=+$G(CWIM("RESPS")):1,+$G(CWIU("RESP"))<1:1,CWNMFLG:+$G(CWIU("RESP")),1:1) F CWLP=CWLP:1:CWIM("RESPS") D +"RTN","CWMAIL0",22,0) + . . D INRESP^XMXUTIL2(CWMSGN,CWLP,"F",.CWIR) ;gather details on specific response +"RTN","CWMAIL0",23,0) + . . S CWCNT=$$INCNT(CWCNT),@CWDATA@(CWCNT)="" +"RTN","CWMAIL0",24,0) + . . S CWCNT=$$INCNT(CWCNT),@CWDATA@(CWCNT)="Response: "_CWLP_") "_$G(CWIR("FROM NAME"))_" "_$$FMDTE^CWMAIL4($G(CWIR("DATE FM")),"5MZ") +"RTN","CWMAIL0",25,0) + . . S CWCNT=$$INCNT(CWCNT),@CWDATA@(CWCNT)="" +"RTN","CWMAIL0",26,0) + . . D READM(.CWDATA,CWIR("XMZ"),.CWCNT) +"RTN","CWMAIL0",27,0) + . . D LASTACC(CWMSGN,$$BSKT^XMXUTIL2(XMDUZ,CWMSGN),CWLP) ;UPDATES LAST RESPONSE READ +"RTN","CWMAIL0",28,0) + D NONEW^XMXUTIL(XMDUZ,$$BSKT^XMXUTIL2(XMDUZ,CWMSGN),CWMSGN,1) ;UNNEW MESSAGE +"RTN","CWMAIL0",29,0) + I +CWCONFRM D ;SEND CONFIRMATION IF NEEDED +"RTN","CWMAIL0",30,0) + . S CWCNT=$$INCNT(CWCNT),@CWDATA@(CWCNT)="" +"RTN","CWMAIL0",31,0) + . S CWCNT=$$INCNT(CWCNT),@CWDATA@(CWCNT)=">>Confirmation Message Sent to Sender.<<" +"RTN","CWMAIL0",32,0) + I $O(@CWDATA@(1)) D +"RTN","CWMAIL0",33,0) + . S @CWDATA@(1)="1^^DATA HAS BEEN FOUND" +"RTN","CWMAIL0",34,0) + E S @CWDATA@(1)="1^^Message text could not be found." +"RTN","CWMAIL0",35,0) + S $P(@CWDATA@(1),U,2)=CWCNT-2 +"RTN","CWMAIL0",36,0) + Q +"RTN","CWMAIL0",37,0) + ; +"RTN","CWMAIL0",38,0) +LASTACC(XMZ,CWBIEN,CWLRSP,XMCONFRM) ;UPDATE LAST RESPONSE READ DATE +"RTN","CWMAIL0",39,0) + ;INPUT XMZ = MESSAGE NUMBER +"RTN","CWMAIL0",40,0) + ; CWBIEN = BASKET IEN +"RTN","CWMAIL0",41,0) + ; CWLRSP = LAST RESPONSE READ +"RTN","CWMAIL0",42,0) + ; +"RTN","CWMAIL0",43,0) + N CWIM,CWIU,CWINSTR,CWXINSTR,CWFLAGS +"RTN","CWMAIL0",44,0) + D INMSG1^XMXUTIL2(XMDUZ,XMZ,,.CWFLAGS,.CWIM,.CWIU) ;SET-UP FOR CALL +"RTN","CWMAIL0",45,0) + D INMSG2^XMXUTIL2(XMDUZ,XMZ,,.CWIM,.CWXINSTR,.CWIU) +"RTN","CWMAIL0",46,0) + S CWINSTR("FLAGS")=$S($G(CWXINSTR("FLAGS"))["R":"R",1:"") +"RTN","CWMAIL0",47,0) + D LASTACC^XMXUTIL(XMDUZ,CWBIEN,XMZ,CWLRSP,.CWIM,.CWINSTR,.CWIU,.XMCONFRM) +"RTN","CWMAIL0",48,0) + Q +"RTN","CWMAIL0",49,0) + ; +"RTN","CWMAIL0",50,0) +READM(CWDATA,CWINPUT,CWCNT) ;OUTPUT MAIL MESSAGE IN ARRAY +"RTN","CWMAIL0",51,0) + S $ZT="READMER^CWMAIL" +"RTN","CWMAIL0",52,0) + N CWRDATA,XMZ,CWMTYPE,CWTFLG,XMER,XMPOS +"RTN","CWMAIL0",53,0) + S XMZ=+$G(CWINPUT),CWTFLG=0,CWMTYPE=$G(CWINSTR("TYPE")) +"RTN","CWMAIL0",54,0) + F S CWRDATA=$$READ^XMGAPI1() Q:XMER<0!(CWTFLG) S CWCNT=CWCNT+1,@CWDATA@(CWCNT)=CWRDATA I CWMTYPE="K"!(CWMTYPE="X") S:CWRDATA["$END TXT" CWTFLG=1 +"RTN","CWMAIL0",55,0) + ; +"RTN","CWMAIL0",56,0) +READMER Q +"RTN","CWMAIL0",57,0) + ; +"RTN","CWMAIL0",58,0) +INCNT(CWCNT) ;INCREMENT COUNTER +"RTN","CWMAIL0",59,0) + Q CWCNT+1 +"RTN","CWMAIL0",60,0) + ; +"RTN","CWMAIL0",61,0) +ADDMP(CWXMZ,CWVAL) ;set data into DAT based on subscripted CWVAL +"RTN","CWMAIL0",62,0) + ;INPUT - CWXMZ = message ien +"RTN","CWMAIL0",63,0) + ; CWVAL = input array (i.e. CWVAL(1)=first piece...CWVAL(n)=last piece +"RTN","CWMAIL0",64,0) + ;OUTPUT - data string holding delimited ('^') data +"RTN","CWMAIL0",65,0) + S CWXMZ=$G(CWXMZ,0) +"RTN","CWMAIL0",66,0) + I +$G(CWXMZ) D +"RTN","CWMAIL0",67,0) + . N X,CWCONFRM,CWTYPE,CWCLOSED,CWINFO,CWCONFID,CWSDRDUZ,CWBRDCAS,CWSDRNAM,CWTRECPT,CWTREPLY +"RTN","CWMAIL0",68,0) + . N CWIM,CWIU,CWINSTR,CWPMSG,CWLP,CWDAT +"RTN","CWMAIL0",69,0) + . D INMSG^XMXUTIL2(XMDUZ,$$BSKT^XMXUTIL2(XMDUZ,CWXMZ),CWXMZ,,"F",.CWIM,.CWINSTR,.CWIU) ;SET-UP MESSAGE INFO +"RTN","CWMAIL0",70,0) + . S CWVAL(6)=$$UP^XLFSTR($G(CWINSTR("TYPE"))) ;message type(s) +"RTN","CWMAIL0",71,0) + . S:$G(CWINSTR("FLAGS"))["P" CWVAL(6)="P"_CWVAL(6) ;add priority flag as a type +"RTN","CWMAIL0",72,0) + . S CWVAL(7)=$G(CWINSTR("FLAGS"))["R" ;confirmation flag +"RTN","CWMAIL0",73,0) + . S CWVAL(8)=$G(CWINSTR("FLAGS"))["X" ;closed flag +"RTN","CWMAIL0",74,0) + . S CWVAL(9)=$G(CWINSTR("FLAGS"))["I" ;informational flag +"RTN","CWMAIL0",75,0) + . S CWVAL(10)=$G(CWINSTR("FLAGS"))["C" ;confidential flag +"RTN","CWMAIL0",76,0) + . S CWVAL(11)=$G(CWIM("FROM DUZ")) ;sender ien +"RTN","CWMAIL0",77,0) + . S CWVAL(13)=$G(CWIM("FROM NAME")) ;sender full name +"RTN","CWMAIL0",78,0) + . S CWVAL(12)=$$BCAST^XMXSEC(CWXMZ) ;broadcast flag +"RTN","CWMAIL0",79,0) + . S CWVAL(14)=$G(CWIM("RECIPS")) ;total # of recipients +"RTN","CWMAIL0",80,0) + . S CWVAL(15)=$G(CWIM("RESPS")) ;total # of replies +"RTN","CWMAIL0",81,0) + . S CWVAL(16)=$G(CWINSTR("FLAGS"))["P" ;priority flag +"RTN","CWMAIL0",82,0) + . S CWVAL(17)=+$G(CWIU("RESP")) ;# of last response read +"RTN","CWMAIL0",83,0) + . S CWVAL(20)=+$$ANSWER^XMXSEC(XMDUZ,CWXMZ,$$ZNODE^XMXUTIL2(CWXMZ)) ;can user answer message +"RTN","CWMAIL0",84,0) + ;set data into node +"RTN","CWMAIL0",85,0) + S CWLP="" F S CWLP=$O(CWVAL(CWLP)) Q:CWLP<1 D +"RTN","CWMAIL0",86,0) + . S $P(CWDAT,U,CWLP)=CWVAL(CWLP) +"RTN","CWMAIL0",87,0) + Q CWDAT +"RTN","CWMAIL1") +0^4^B14471507 +"RTN","CWMAIL1",1,0) +CWMAIL1 ;INDPLS/PLS- GUI MAIL UTILITIES ;30-Jul-1999 09:30;PS +"RTN","CWMAIL1",2,0) + ;;2.1;CWMA GuiMail;;Jan 06, 1999 +"RTN","CWMAIL1",3,0) + ;MODIFIED FOR XM*7.1*50 +"RTN","CWMAIL1",4,0) +LATER(CWXMZ,CWXMA) ;LATER A MESSAGE +"RTN","CWMAIL1",5,0) + S $ZT="LATERE^CWMAIL1" +"RTN","CWMAIL1",6,0) + N CWFLG,X,Y,%H,NOW,CWINSTR,CWXMMSG,CWTMDF +"RTN","CWMAIL1",7,0) + S CWFLG=0 +"RTN","CWMAIL1",8,0) + G:'CWXMZ!('$G(CWXMA)) LATERE +"RTN","CWMAIL1",9,0) + ;S CWTMDF=$G(^XMB("TIMEDIFF")) ;get time diff for site +"RTN","CWMAIL1",10,0) + ;I CWXMA[":" D +"RTN","CWMAIL1",11,0) + ;. I '$L(CWTMDF) S CWXMA=$P(CWXMA," ") ;use date and not date/time +"RTN","CWMAIL1",12,0) + ;. E S CWXMA=CWXMA_" "_CWTMDF ;append time zone diff +"RTN","CWMAIL1",13,0) + S CWXMA=$$CONVERT^XMXUTIL1(CWXMA,$S(CWXMA[":":1,1:0)) ;convert to fileman date/time +"RTN","CWMAIL1",14,0) +CK S NOW=$$NOW^XLFDT S CWXMA=$S(CWXMA>NOW:CWXMA,1:(NOW+.0010)) ;DEFAULT TO 10 MINUTES IN FUTURE +"RTN","CWMAIL1",15,0) + I CWXMA>0 D +"RTN","CWMAIL1",16,0) + . S CWINSTR("LATER")=CWXMA +"RTN","CWMAIL1",17,0) + . D LATERMSG^XMXAPI(XMDUZ,"",CWXMZ,.CWINSTR,.CWXMMSG) +"RTN","CWMAIL1",18,0) + . I CWXMMSG S CWFLG=1 +"RTN","CWMAIL1",19,0) +LATERE ; +"RTN","CWMAIL1",20,0) + Q CWFLG +"RTN","CWMAIL1",21,0) + ; +"RTN","CWMAIL1",22,0) + ; +"RTN","CWMAIL1",23,0) +NETINFO(CWDAT,XMZ) ;RETRIEVE NETWORK TRANMISSION INFORMATION +"RTN","CWMAIL1",24,0) + ; +"RTN","CWMAIL1",25,0) + K CWDAT +"RTN","CWMAIL1",26,0) + S CWDAT=$NA(^TMP($J,"CWMAIL")) +"RTN","CWMAIL1",27,0) + S $ZT="NETINFOE^CWMAIL1" +"RTN","CWMAIL1",28,0) + N CWLP,CWCNT +"RTN","CWMAIL1",29,0) + S CWLP=0,CWCNT=2 +"RTN","CWMAIL1",30,0) + D QN^XMXUTIL3(XMZ,,,) ;DEFAULTS TO ALL LINES;START AT 0 AND SET TO ^TMP("XMLIST",$J) +"RTN","CWMAIL1",31,0) + F S CWLP=$O(^TMP("XMLIST",$J,CWLP)) Q:CWLP<1 D +"RTN","CWMAIL1",32,0) + . S @CWDAT@(CWCNT)=^TMP("XMLIST",$J,CWLP),CWCNT=CWCNT+1 +"RTN","CWMAIL1",33,0) +NETINFOE ; +"RTN","CWMAIL1",34,0) + I $O(@CWDAT@(1)) D +"RTN","CWMAIL1",35,0) + . S @CWDAT@(1)="1^^DATA HAS BEEN FOUND" +"RTN","CWMAIL1",36,0) + E S @CWDAT@(1)="1^^There was no Transmission Information available." +"RTN","CWMAIL1",37,0) + S $P(@CWDAT@(1),U,2)=CWCNT-2 +"RTN","CWMAIL1",38,0) + Q +"RTN","CWMAIL1",39,0) + ; +"RTN","CWMAIL1",40,0) +ADRSTO(CWDAT,XMZ) ;RETRIEVE ADDRESSED TO INFO +"RTN","CWMAIL1",41,0) + ; +"RTN","CWMAIL1",42,0) + K CWDAT +"RTN","CWMAIL1",43,0) + S CWDAT=$NA(^TMP($J,"CWMAIL")) +"RTN","CWMAIL1",44,0) + N CWLP,CWCNT +"RTN","CWMAIL1",45,0) + S CWLP=0,CWCNT=2 +"RTN","CWMAIL1",46,0) + D Q^XMXUTIL3(XMZ) ;DEFAULTS TO ALL LINES;START AT 0 AND SET TO ^TMP("XMLIST",$J) +"RTN","CWMAIL1",47,0) + F S CWLP=$O(^TMP("XMLIST",$J,CWLP)) Q:CWLP<1 D +"RTN","CWMAIL1",48,0) + . S @CWDAT@(CWCNT)=$G(^TMP("XMLIST",$J,CWLP,"TO NAME")),CWCNT=CWCNT+1 +"RTN","CWMAIL1",49,0) + I $O(@CWDAT@(1)) D +"RTN","CWMAIL1",50,0) + . S @CWDAT@(1)="1^^DATA HAS BEEN FOUND" +"RTN","CWMAIL1",51,0) + E S @CWDAT@(1)="1^^There was no ADDRESSED TO recipients found." +"RTN","CWMAIL1",52,0) + S $P(@CWDAT@(1),U,2)=CWCNT-2 +"RTN","CWMAIL1",53,0) +ADRSTOE Q +"RTN","CWMAIL1",54,0) + ; +"RTN","CWMAIL1",55,0) +RECPT(CWDAT,XMZ) ;BUILD RECIPIENT LIST +"RTN","CWMAIL1",56,0) + K CWDAT +"RTN","CWMAIL1",57,0) + S CWDAT=$NA(^TMP($J,"CWMAIL")) +"RTN","CWMAIL1",58,0) + N CWLP,CWCNT,CWIM,CWIU,CWINSTR +"RTN","CWMAIL1",59,0) + N CWRECPT,CWLR,CWLRSPRD,CWFR,CWFWD,CWTERM,CWRMI,CWNTT,CWSNT +"RTN","CWMAIL1",60,0) + S CWLP=0,CWCNT=2 +"RTN","CWMAIL1",61,0) + D QD^XMXUTIL3(XMZ) ; +"RTN","CWMAIL1",62,0) + F S CWLP=$O(^TMP("XMLIST",$J,CWLP)) Q:CWLP<1 D +"RTN","CWMAIL1",63,0) + . S CWRECPT=$G(^TMP("XMLIST",$J,CWLP,"TO NAME")) ;recipient name +"RTN","CWMAIL1",64,0) + . S CWLR=$$FMDTE^CWMAIL4($G(^("LREAD")),"5MZ") ;last read date/time +"RTN","CWMAIL1",65,0) + . S CWLRSPRD=$G(^("RESP")) ;last response read +"RTN","CWMAIL1",66,0) + . S CWFR=$$FMDTE^CWMAIL4($G(^("FREAD")),"5MZ") ;first read date/time +"RTN","CWMAIL1",67,0) + . S CWFWD=$S($D(^("FWD ON")):"*",1:"") ;forwarded message +"RTN","CWMAIL1",68,0) + . S CWTERM=$S($D(^("TERM")):"*",1:"") ;terminated message +"RTN","CWMAIL1",69,0) + . S CWRMI=$G(^("ID")) ;remote message id +"RTN","CWMAIL1",70,0) + . S CWNTT=$G(^("SECS")) ;network trans time +"RTN","CWMAIL1",71,0) + . S CWSNT=$$FMDTE^CWMAIL4($G(^("XDATE")),"5MZ") ;network sent date/time +"RTN","CWMAIL1",72,0) + . S @CWDAT@(CWCNT)=U_CWRECPT_U_CWLR_U_CWFR_U_CWFWD_U_CWTERM_U_CWRMI_U_CWNTT_U_CWSNT_U_CWLRSPRD_U +"RTN","CWMAIL1",73,0) + . S CWCNT=CWCNT+1 +"RTN","CWMAIL1",74,0) + D INMSG1^XMXUTIL2(XMDUZ,XMZ,,"F",.CWIM,.CWIU) ;retrieve total recipients +"RTN","CWMAIL1",75,0) + D INMSG2^XMXUTIL2(XMDUZ,XMZ,,.CWIM,.CWINSTR,.CWIU) ;and responses. +"RTN","CWMAIL1",76,0) +RECPTE I $O(@CWDAT@(1)) D +"RTN","CWMAIL1",77,0) + . S @CWDAT@(1)="1^^DATA HAS BEEN FOUND"_U_+$G(CWIM("RECIPS"))_U_+$G(CWIM("RESPS")) +"RTN","CWMAIL1",78,0) + E S @CWDAT@(1)="1^^There were no recipients found."_U_0_U_0 +"RTN","CWMAIL1",79,0) + S $P(@CWDAT@(1),U,2)=CWCNT-2 +"RTN","CWMAIL1",80,0) + Q +"RTN","CWMAIL2") +0^5^B22772090 +"RTN","CWMAIL2",1,0) +CWMAIL2 ;INDPLS/PLS- DELPHI VISTA MAIL SERVER, CONT'D ;20-Sep-1999 08:00;PS +"RTN","CWMAIL2",2,0) + ;;2.1;CWMA GuiMail;;Jan 06, 1999 +"RTN","CWMAIL2",3,0) + ;Input - CWINPUT : 1 - Subject +"RTN","CWMAIL2",4,0) + ; : 2 - Flags +"RTN","CWMAIL2",5,0) + ; : 3 - Attachment Flag +"RTN","CWMAIL2",6,0) + ; +"RTN","CWMAIL2",7,0) + Q ;ROUTINE CAN'T BE CALLED DIRECTLY +"RTN","CWMAIL2",8,0) +%CREATE(CWDATA,CWINPUT,CWTEXT) ;CREATE A NEW MESSAGE +"RTN","CWMAIL2",9,0) + N CWSDATA,CWSEDATA,CWLP,CWTXTARY,DA,DIE,DR,Y,XMTEXT,CWMSGABS,CWTMP,CWFILE,CWIEN,CWNAM +"RTN","CWMAIL2",10,0) + N XMBODY,XMSUBJ,XMY,XMINSTR,XMZ +"RTN","CWMAIL2",11,0) + S CWDATA(1)="0^99- UNDEFINED ERROR" +"RTN","CWMAIL2",12,0) + ;INPUT CONTAINS SUBJECT;PARAMETER ARRAY (IE. TESTING API;PCSI +"RTN","CWMAIL2",13,0) + ;P=PRIORITY, X=CLOSED, C=CONFIDENTIAL, I=INFORMATIONAL, R=CONFIRMATION +"RTN","CWMAIL2",14,0) + ;TEXT ARRAY CONTAINS RECIPIENT LIST AND MESSAGE TEXT LOADED FROM BMSGD call +"RTN","CWMAIL2",15,0) + ;BUILD XMY ARRAY +"RTN","CWMAIL2",16,0) + S CWTEXT=$NA(^TMP($J,"CWMAILLOAD")) +"RTN","CWMAIL2",17,0) + S CWSDATA=$G(@CWTEXT@(-9902),"[START XMY]"),CWSEDATA=$G(@CWTEXT@(-9903),"[END XMY]") +"RTN","CWMAIL2",18,0) + S CWLP=-1 D GFNDLP^CWMAILB(.CWLP,CWSDATA) +"RTN","CWMAIL2",19,0) + I $G(CWLP)="" S CWDATA(1)="0^1- NO RECIPIENTS LISTED" G CRTEND +"RTN","CWMAIL2",20,0) + ;RETRIEVE RECIPIENTS +"RTN","CWMAIL2",21,0) + F S CWLP=$O(@CWTEXT@(CWLP)) Q:CWLP="" Q:@CWTEXT@(CWLP)=CWSEDATA D +"RTN","CWMAIL2",22,0) + .S CWTMP=$G(@CWTEXT@(CWLP)) Q:CWTMP="" +"RTN","CWMAIL2",23,0) + .S CWFILE=+$P(CWTMP,"^"),CWIEN=+$P(CWTMP,"^",2),CWNAM=$P(CWTMP,"^",3) +"RTN","CWMAIL2",24,0) + .I CWFILE=200 S XMY(CWIEN)="" +"RTN","CWMAIL2",25,0) + .E I CWFILE=3.8 S XMY("G."_CWNAM)="" +"RTN","CWMAIL2",26,0) + .E S XMY(CWNAM)="" +"RTN","CWMAIL2",27,0) + I '$D(XMY) S CWDATA(1)="0^1- NO RECIPIENTS LISTED" G CRTEND ; NO RECIPIENTS LISTED +"RTN","CWMAIL2",28,0) + ;BUILD MESSAGE @TEXT@ ARRAY +"RTN","CWMAIL2",29,0) + S CWSDATA=$G(@CWTEXT@(-9900),"[START DATA]"),CWSEDATA=$G(@CWTEXT@(-9901),"[END DATA]") +"RTN","CWMAIL2",30,0) + S CWLP=-1 D GFNDLP^CWMAILB(.CWLP,CWSDATA) +"RTN","CWMAIL2",31,0) + I $G(CWLP)="" S CWDATA(1)="0^3- NO MESSAGE TEXT" G CRTEND +"RTN","CWMAIL2",32,0) + F S CWLP=$O(@CWTEXT@(CWLP)) Q:CWLP="" Q:@CWTEXT@(CWLP)=CWSEDATA D +"RTN","CWMAIL2",33,0) + .S ^TMP($J,"CWMAILOUT",CWLP)=$G(@CWTEXT@(CWLP)) +"RTN","CWMAIL2",34,0) + I '$D(^TMP($J,"CWMAILOUT")) S CWDATA(1)="0^3- NO MESSAGE TEXT" G CRTEND ;NO MESSAGE @CWTEXT@ +"RTN","CWMAIL2",35,0) + ;I '$L($P($G(CWINPUT),";")) S CWDATA(1)="0^4- MESSAGE SUBJECT NOT GIVEN" G CRTEND +"RTN","CWMAIL2",36,0) + ;E +"RTN","CWMAIL2",37,0) + S XMSUBJ=$P($G(CWINPUT),";") +"RTN","CWMAIL2",38,0) + ;subject can be null or between 3-65 characters. Length is handled on client side. +"RTN","CWMAIL2",39,0) + I $L(XMSUBJ),$L(XMSUBJ)<3 S XMSUBJ=XMSUBJ_$E("__",1,3-$L(XMSUBJ)) +"RTN","CWMAIL2",40,0) + ;PROCESS MESSAGE +"RTN","CWMAIL2",41,0) + S XMBODY=$NA(^TMP($J,"CWMAILOUT")) +"RTN","CWMAIL2",42,0) + D CNVTAB(XMBODY) ;convert tabs to spaces +"RTN","CWMAIL2",43,0) + S XMINSTR("FLAGS")=$P(CWINPUT,";",2) ;GET MESSAGE ATTRIBUTES +"RTN","CWMAIL2",44,0) + I '$P($G(CWINPUT),";",3) D +"RTN","CWMAIL2",45,0) + . D SENDMSG^XMXAPI(XMDUZ,XMSUBJ,XMBODY,.XMY,.XMINSTR,.XMZ) +"RTN","CWMAIL2",46,0) + E D +"RTN","CWMAIL2",47,0) + . D CRE8XMZ^XMXAPI(XMSUBJ,.XMZ) ;create message stub +"RTN","CWMAIL2",48,0) + . I +$G(XMZ) D +"RTN","CWMAIL2",49,0) + . . D TEXT^XMXEDIT(XMZ,XMBODY) ;stuff message text +"RTN","CWMAIL2",50,0) + . . D BLDNETI(XMZ,XMSUBJ) ;stuff network header information +"RTN","CWMAIL2",51,0) + . . D ADDRNSND^XMXAPI(XMDUZ,XMZ,.XMY,.XMINSTR) ;send message +"RTN","CWMAIL2",52,0) + I +$G(XMZ)<1 S CWDATA(1)="0^5- MESSAGE CREATION FAILED" G CRTEND +"RTN","CWMAIL2",53,0) + I +$G(XMZ)>0 S CWDATA(1)="1^^"_$G(XMZ) +"RTN","CWMAIL2",54,0) +CRTEND K ^TMP($J,"CWMAILOUT"),^TMP($J,"CWMAILLOAD") +"RTN","CWMAIL2",55,0) + Q +"RTN","CWMAIL2",56,0) +CNVTAB(CWSRC) ;Convert TABS to spaces (use 6 char per tab) +"RTN","CWMAIL2",57,0) + ;PASS $NA() VARIABLE NAME CONTAINING DATA +"RTN","CWMAIL2",58,0) + N CWLP,CWLINE +"RTN","CWMAIL2",59,0) + S CWLP=+$G(CWLP) +"RTN","CWMAIL2",60,0) + F S CWLP=$O(@CWSRC@(CWLP)) Q:CWLP="" D +"RTN","CWMAIL2",61,0) + . S CWLINE=@CWSRC@(CWLP) +"RTN","CWMAIL2",62,0) + . S @CWSRC@(CWLP)=$$LNCNV(CWLINE) +"RTN","CWMAIL2",63,0) + Q +"RTN","CWMAIL2",64,0) +LNCNV(CWL) ; data line tab extracter +"RTN","CWMAIL2",65,0) + N CWTMP,CWTMPL,CWP,CWPR,CWPADL +"RTN","CWMAIL2",66,0) + Q:'$F(CWL,$C(9)) CWL ; no tabs to convert +"RTN","CWMAIL2",67,0) + S CWTMP=CWL,CWTMPL="" +"RTN","CWMAIL2",68,0) + F D Q:CWTMP'[$C(9) +"RTN","CWMAIL2",69,0) + . S CWP=$P(CWTMP,$C(9)) ; left portion of string +"RTN","CWMAIL2",70,0) + . S CWPR=$P(CWTMP,$C(9),2,999) ; remainder of string +"RTN","CWMAIL2",71,0) + . S CWPADL=6-($L(CWP)#6) ; pad length +"RTN","CWMAIL2",72,0) + . I ($L(CWP)+CWPADL+$L(CWPR))>250 Q ;line is to long +"RTN","CWMAIL2",73,0) + . S CWTMP=CWP_$$REPEAT^XLFSTR(" ",CWPADL)_CWPR +"RTN","CWMAIL2",74,0) + Q CWTMP +"RTN","CWMAIL2",75,0) + ; +"RTN","CWMAIL2",76,0) +BLDNETI(CWXMZ,CWSUBJ) ;build network header information +"RTN","CWMAIL2",77,0) + ;From: +"RTN","CWMAIL2",78,0) + ;Subject: +"RTN","CWMAIL2",79,0) + ;Date: 9 Jul 1999 09:02:27 -0500 (EST) +"RTN","CWMAIL2",80,0) + ;X-Mailer: VISTA Mail +"RTN","CWMAIL2",81,0) + N CWCNT +"RTN","CWMAIL2",82,0) + I $L($$ZNODE^XMXUTIL2(CWXMZ)) D +"RTN","CWMAIL2",83,0) + . S ^XMB(3.9,CWXMZ,2,.001,0)="From: "_$$LOW^XLFSTR($G(XMV("NETNAME"))) +"RTN","CWMAIL2",84,0) + . ;S ^XMB(3.9,CWXMZ,2,.002,0)="To:" ;refet to bldnetit api +"RTN","CWMAIL2",85,0) + . S ^XMB(3.9,CWXMZ,2,.003,0)="Subject: "_$G(CWSUBJ) +"RTN","CWMAIL2",86,0) + . S ^XMB(3.9,CWXMZ,2,.004,0)="Date:"_$$INDT^XMXUTIL1($$NOW^XLFDT) +"RTN","CWMAIL2",87,0) + . S ^XMB(3.9,CWXMZ,2,.005,0)="X-Mailer: Vista GuiMail" ;VISTA MAIL" +"RTN","CWMAIL2",88,0) + . S ^XMB(3.9,CWXMZ,2,.006,0)="Encoding: x-uuencode" ;X-UUENCODE" +"RTN","CWMAIL2",89,0) + . S CWCNT=.007 +"RTN","CWMAIL2",90,0) + . D BLDNETIT(CWXMZ,.XMY,.CWCNT) +"RTN","CWMAIL2",91,0) + Q +"RTN","CWMAIL2",92,0) +BLDNETIT(CWXMZ,CWXMY,CWCTN) ; build To: section +"RTN","CWMAIL2",93,0) + ;Input - CWXMZ - Message Number +"RTN","CWMAIL2",94,0) + ; CWXMY - Array of Recipients +"RTN","CWMAIL2",95,0) + ; CWCTN - Counter +"RTN","CWMAIL2",96,0) + ; +"RTN","CWMAIL2",97,0) + N LP,CWINSTR,CWFULL,CWSET,CWTO,CWTO1,CWRHDR +"RTN","CWMAIL2",98,0) + K ^TMP($J,"CWNETH") +"RTN","CWMAIL2",99,0) + S CWINSTR("ADDR FLAGS")="RX" +"RTN","CWMAIL2",100,0) + S CWFLG=0,CWTO="To: ",CWTO1=" ",CWRHDR="" +"RTN","CWMAIL2",101,0) + S LP="" F S LP=$O(CWXMY(LP)) Q:LP="" D +"RTN","CWMAIL2",102,0) + . D TOWHOM^XMXAPI(XMDUZ,,"S",LP,.CWINSTR,.CWFULL) +"RTN","CWMAIL2",103,0) + . I $L($G(CWFULL)) D +"RTN","CWMAIL2",104,0) + . . I CWFULL'["@" D +"RTN","CWMAIL2",105,0) + . . .S CWFULL=$TR(CWFULL,", .","._+") ; set internet naming convention +"RTN","CWMAIL2",106,0) + . . .S CWFULL=CWFULL_"@"_$G(^XMB("NETNAME")) +"RTN","CWMAIL2",107,0) + . . I ($L(CWRHDR)+$L(CWFULL)+1)<140 D ;line not full +"RTN","CWMAIL2",108,0) + . . . S CWRHDR=CWRHDR_$S($L(CWRHDR)>0&($E(CWRHDR,$L(CWRHDR))'=","):",",1:"")_CWFULL +"RTN","CWMAIL2",109,0) + . . E D +"RTN","CWMAIL2",110,0) + . . . S ^TMP($J,"CWNETH",CWCTN)=CWRHDR +"RTN","CWMAIL2",111,0) + . . . S CWCTN=CWCTN+.001 +"RTN","CWMAIL2",112,0) + . . . S CWRHDR=CWFULL +"RTN","CWMAIL2",113,0) + I $L(CWRHDR) S ^TMP($J,"CWNETH",CWCTN)=CWRHDR ;set remaining data +"RTN","CWMAIL2",114,0) + S LP=0 F S LP=$O(^TMP($J,"CWNETH",LP)) Q:LP<.001 D +"RTN","CWMAIL2",115,0) + . S ^XMB(3.9,CWXMZ,2,LP,0)=$S(CWFLG:" "_^TMP($J,"CWNETH",LP),1:"To: "_^TMP($J,"CWNETH",LP)) +"RTN","CWMAIL2",116,0) + K ^TMP($J,"CWNETH") ;KILL TEMP GLOBAL BUFFER +"RTN","CWMAIL2",117,0) + Q +"RTN","CWMAIL3") +0^6^B5161423 +"RTN","CWMAIL3",1,0) +CWMAIL3 ;INDPLS/PLS- DELPHI VISTA MAIL SERVER, CON'T ;03-Jun-1999 13:24;PS +"RTN","CWMAIL3",2,0) + ;;2.1;CWMA GuiMail;;Jan 06, 1999 +"RTN","CWMAIL3",3,0) + Q ;ROUTINE CAN'T BE CALLED DIRECTLY +"RTN","CWMAIL3",4,0) + ; +"RTN","CWMAIL3",5,0) +GRPINFO(CWDAT,CWPARAM) ;Mail Group Information +"RTN","CWMAIL3",6,0) + ;CWPARAM = Mail Group IEN +"RTN","CWMAIL3",7,0) + N CWFILE,IO,IOP,POP,DIC,DA,X,Y,CWFLG,CWNXT,IOSL,CWDEFDIR,CWDATFIL +"RTN","CWMAIL3",8,0) + S CWFILE="CWMAILGRP"_$J_".TXT" +"RTN","CWMAIL3",9,0) + S CWDEFDIR=$$PWD^%ZISH +"RTN","CWMAIL3",10,0) + D OPEN^%ZISH("CWDATFIL",CWDEFDIR,CWFILE,"W") +"RTN","CWMAIL3",11,0) + G:POP GRPINFOE +"RTN","CWMAIL3",12,0) + U IO S IOSL=99999 +"RTN","CWMAIL3",13,0) + D DISPLAY^XMHIG(+CWPARAM) +"RTN","CWMAIL3",14,0) + D CLOSE^%ZISH("CWDATFIL") +"RTN","CWMAIL3",15,0) + I $$FTG^%ZISH(CWDEFDIR,CWFILE,$NA(CWDAT(2)),1) D +"RTN","CWMAIL3",16,0) + .S CWFILE(CWFILE)="" +"RTN","CWMAIL3",17,0) + .S X=$$DEL^%ZISH(CWDEFDIR,$NA(CWFILE)) +"RTN","CWMAIL3",18,0) + .I $O(CWDAT(0))>0 D +"RTN","CWMAIL3",19,0) + ..S CWFLG=0,CWNXT=1 +"RTN","CWMAIL3",20,0) + ..F S CWNXT=$O(CWDAT(CWNXT)) Q:CWNXT<1!(CWFLG) D +"RTN","CWMAIL3",21,0) + ...I '$L(CWDAT(CWNXT)),'CWFLG K CWDAT(CWNXT) +"RTN","CWMAIL3",22,0) + ...E I $A(CWDAT(CWNXT))=12 K CWDAT(CWNXT) +"RTN","CWMAIL3",23,0) + ...E S CWDAT(CWNXT)=$$CTRL^XMXUTIL1(CWDAT(CWNXT)),CWFLG=1 ;remove control characters +"RTN","CWMAIL3",24,0) + .S CWDAT(-9900)=$O(CWDAT(9999999),-1)+1 +"RTN","CWMAIL3",25,0) + E S CWDAT(-9900)=2 +"RTN","CWMAIL3",26,0) +GRPINFOE D CLOSE^%ZISH("CWDATFIL") +"RTN","CWMAIL3",27,0) + Q $O(CWDAT(1)) +"RTN","CWMAIL3",28,0) +USRINFO(CWDAT,CWPARAM) ;Mail User Information +"RTN","CWMAIL3",29,0) + ;CWPARAM = Mail User IEN +"RTN","CWMAIL3",30,0) + N CWFILE,%ZIS,IOP,POP,IO,Y,X,CWDEFDIR,CWDATFIL,IOSL +"RTN","CWMAIL3",31,0) + N CWFLG,CWNXT +"RTN","CWMAIL3",32,0) + S CWFILE="CWMAILUSR"_$J_".TXT" +"RTN","CWMAIL3",33,0) + S CWDEFDIR=$$PWD^%ZISH +"RTN","CWMAIL3",34,0) + D OPEN^%ZISH("CWDATFIL",CWDEFDIR,CWFILE,"W") +"RTN","CWMAIL3",35,0) + G:POP USRINFOE +"RTN","CWMAIL3",36,0) + U IO S IOSL=99999 +"RTN","CWMAIL3",37,0) + D DISPUSER^XMHIU(+CWPARAM) +"RTN","CWMAIL3",38,0) + D CLOSE^%ZISH("CWDATFIL") +"RTN","CWMAIL3",39,0) +FLG I $$FTG^%ZISH(CWDEFDIR,CWFILE,$NA(CWDAT(2)),1) D +"RTN","CWMAIL3",40,0) + .S CWFILE(CWFILE)="" +"RTN","CWMAIL3",41,0) + .S X=$$DEL^%ZISH(CWDEFDIR,$NA(CWFILE)) +"RTN","CWMAIL3",42,0) + .I $O(CWDAT(0))>0 D +"RTN","CWMAIL3",43,0) + ..S CWFLG=0,CWNXT=1 +"RTN","CWMAIL3",44,0) + ..F S CWNXT=$O(CWDAT(CWNXT)) Q:CWNXT<1!(CWFLG) D +"RTN","CWMAIL3",45,0) + ...I '$L(CWDAT(CWNXT)),'CWFLG K CWDAT(CWNXT) +"RTN","CWMAIL3",46,0) + ...E I $A(CWDAT(CWNXT))=12 K CWDAT(CWNXT) +"RTN","CWMAIL3",47,0) + ...E S CWDAT(CWNXT)=$$CTRL^XMXUTIL1(CWDAT(CWNXT)),CWFLG=1 ;remove control characters +"RTN","CWMAIL3",48,0) + .S CWDAT(-9900)=$O(CWDAT(9999999),-1)+1 +"RTN","CWMAIL3",49,0) + E S CWDAT(-9900)=2 +"RTN","CWMAIL3",50,0) +USRINFOE D CLOSE^%ZISH("CWDATFIL") +"RTN","CWMAIL3",51,0) + Q $O(CWDAT(1)) +"RTN","CWMAIL4") +0^7^B1346202 +"RTN","CWMAIL4",1,0) +CWMAIL4 ;INDPLS/PLS- DELPHI VISTA MAIL SERVER, CON'T ;05-May-1999 14:03;PS +"RTN","CWMAIL4",2,0) + ;;2.1;CWMA GuiMail;;Jan 06, 1999 +"RTN","CWMAIL4",3,0) + Q ;ROUTINE CAN'T BE CALLED DIRECTLY +"RTN","CWMAIL4",4,0) + ; +"RTN","CWMAIL4",5,0) +GETMSGL(DAT,CWDUZ,CWBSK,CWSRC) ; +"RTN","CWMAIL4",6,0) + ;API NOT CURRENTLY USED +"RTN","CWMAIL4",7,0) + ;INPUT +"RTN","CWMAIL4",8,0) + ; DAT : RETURN ARRAY +"RTN","CWMAIL4",9,0) + ;CWDUZ : USER +"RTN","CWMAIL4",10,0) + ;CWBSK : BASKET IEN OR NAME +"RTN","CWMAIL4",11,0) + ;CWSRC : LOOKUP TYPE 0(IEN); 1("C" X-REF) ; DEFAULT TO ZERO +"RTN","CWMAIL4",12,0) + Q:'CWDUZ 0 +"RTN","CWMAIL4",13,0) + I +CWBSK'=CWBSK D +"RTN","CWMAIL4",14,0) + . S CWBSK=+$O(^XMB(3.7,CWDUZ,2,"B",CWBSK,0)) +"RTN","CWMAIL4",15,0) + S CWSRC=+$G(CWSRC,0) +"RTN","CWMAIL4",16,0) + N CWMSG,CWSEQ +"RTN","CWMAIL4",17,0) + S (CWSEQ,CWMSG)=0 +"RTN","CWMAIL4",18,0) + I 'CWSRC D +"RTN","CWMAIL4",19,0) + . F S CWMSG=$O(^XMB(3.7,CWDUZ,2,CWBSK,1,CWMSG)) Q:CWMSG<1 S DAT(CWMSG)="" +"RTN","CWMAIL4",20,0) +ELSE E D +"RTN","CWMAIL4",21,0) + . F S CWSEQ=$O(^XMB(3.7,CWDUZ,2,CWBSK,1,"C",CWSEQ)) Q:CWSEQ<1 D +"RTN","CWMAIL4",22,0) + . . F S CWMSG=$O(^XMB(3.7,CWDUZ,2,CWBSK,1,"C",CWSEQ,CWMSG)) Q:CWMSG<1 D +"RTN","CWMAIL4",23,0) + . . . S DAT(CWMSG)="" +"RTN","CWMAIL4",24,0) + Q $O(DAT(0))>0 +"RTN","CWMAIL4",25,0) + ; +"RTN","CWMAIL4",26,0) +FMDTE(CWDT,CWPRM) ;API TO RETURN A FORMATTED DATE +"RTN","CWMAIL4",27,0) + ;replaces '@' with " " between date and time +"RTN","CWMAIL4",28,0) + Q $TR($$FMTE^XLFDT(CWDT,CWPRM),"@"," ") +"RTN","CWMAILA") +0^8^B23618442 +"RTN","CWMAILA",1,0) +CWMAILA ;INDPLS/PLS- DELPHI VISTA MAIL SERVER CONT'D ;02-Jul-1999 14:45;PS +"RTN","CWMAILA",2,0) + ;;2.1;CWMA GuiMail;;Jan 06, 1999 +"RTN","CWMAILA",3,0) + ;MODIFIED FOR XM*7.1*50 +"RTN","CWMAILA",4,0) + Q ;ROUTINE CAN'T BE CALLED DIRECTLY +"RTN","CWMAILA",5,0) +%READ(CWDATA,CWINPUT) ; +"RTN","CWMAILA",6,0) + ;CWINPUT FORMAT - DELIMITER ';' +"RTN","CWMAILA",7,0) + ; 1st - IEN of message +"RTN","CWMAILA",8,0) + ; 4th - New message (value >0 indicates new messages only) +"RTN","CWMAILA",9,0) + K CWDATA +"RTN","CWMAILA",10,0) + N CWMSGN,CWNMFLG +"RTN","CWMAILA",11,0) + S CWMSGN=$P(CWINPUT,";") +"RTN","CWMAILA",12,0) + S CWNMFLG=+$P(CWINPUT,";",4) +"RTN","CWMAILA",13,0) + D:CWMSGN PROCMS^CWMAIL0(.CWDATA,CWMSGN,CWNMFLG) +"RTN","CWMAILA",14,0) + Q +"RTN","CWMAILA",15,0) +%LIST(CWDATA,CWINPUT) ; +"RTN","CWMAILA",16,0) + ;CWINPUT - MAIL TYPE OR MAILBOX NUMBER - DELIMITER ';' +"RTN","CWMAILA",17,0) + ; 2nd - IEN of MailBasket or non-numeric for new mail +"RTN","CWMAILA",18,0) + ;CWARY format: piece value +"RTN","CWMAILA",19,0) + ; 1 message basket +"RTN","CWMAILA",20,0) + ; 2 message ien +"RTN","CWMAILA",21,0) + ; 3 message subject +"RTN","CWMAILA",22,0) + ; 4 message date sent +"RTN","CWMAILA",23,0) + ; 5 not used +"RTN","CWMAILA",24,0) + ; 6 message type +"RTN","CWMAILA",25,0) + ; 7 confirmation flag +"RTN","CWMAILA",26,0) + ; 8 closed flag +"RTN","CWMAILA",27,0) + ; 9 info flag +"RTN","CWMAILA",28,0) + ; 10 confidential flag +"RTN","CWMAILA",29,0) + ; 11 sender ien +"RTN","CWMAILA",30,0) + ; 12 broadcast flag +"RTN","CWMAILA",31,0) + ; 13 sender name +"RTN","CWMAILA",32,0) + ; 14 total # of recipients +"RTN","CWMAILA",33,0) + ; 15 total # of replies +"RTN","CWMAILA",34,0) + ; 16 priority flag +"RTN","CWMAILA",35,0) + ; 17 last response read +"RTN","CWMAILA",36,0) + ; 18 message basket sequence number +"RTN","CWMAILA",37,0) + ; 19 new message flag +"RTN","CWMAILA",38,0) + ; 20 answer message flag +"RTN","CWMAILA",39,0) + ; +"RTN","CWMAILA",40,0) + S CWDATA(1)="0^AN ERROR HAS OCCURRED" +"RTN","CWMAILA",41,0) + N CWVAL,CWMSG,CWMSGSUB,CWMSGDT,CWDCNT,CWMAIB,CWMSGBX,CWMSGLP +"RTN","CWMAILA",42,0) + N CWARY +"RTN","CWMAILA",43,0) + S CWVAL=$P(CWINPUT,";",2) +"RTN","CWMAILA",44,0) + S CWMSG=0,CWDCNT=2,CWMSGLP=0 +"RTN","CWMAILA",45,0) + S CWMAIB=CWVAL +"RTN","CWMAILA",46,0) + ;CALL API TO RETRIEVE MESSAGES +"RTN","CWMAILA",47,0) + I CWVAL=+CWVAL D +"RTN","CWMAILA",48,0) + . D LISTMSGS^XMXAPIB(XMDUZ,+CWMAIB,"BSKT;SUBJ;DATE;SEQN;NEW") ; data put in ^TMP("XMLIST",$J +"RTN","CWMAILA",49,0) + . Q:'+$P($G(^TMP("XMLIST",$J,0)),U,1) ;NO DATA FOUND +"RTN","CWMAILA",50,0) + . D BLDLST^CWMAILF(.CWDATA,$NA(^TMP("XMLIST",$J)),.CWDCNT) +"RTN","CWMAILA",51,0) + E D ;PROCESS NEW MESSAGE REQUEST +"RTN","CWMAILA",52,0) + . D LISTMSGS^XMXAPIB(XMDUZ,"*","BSKT;SUBJ;DATE;NEW","N") ;SEQN;NEW","N") +"RTN","CWMAILA",53,0) + . Q:'+$P($G(^TMP("XMLIST",$J,0)),U,1) ;NO DATA FOUND +"RTN","CWMAILA",54,0) + . D BLDLST^CWMAILF(.CWDATA,$NA(^TMP("XMLIST",$J)),.CWDCNT) +"RTN","CWMAILA",55,0) + I $O(CWDATA(1)) S CWDATA(1)="1^^DATA HAS BEEN FOUND" +"RTN","CWMAILA",56,0) + E S CWDATA(1)=$S(+CWVAL:"1^^No Messages Found in Specified Mail Box",1:"1^^"_"You have no NEW Messages") +"RTN","CWMAILA",57,0) + S $P(CWDATA(1),U,2)=CWDCNT-2 +"RTN","CWMAILA",58,0) + Q +"RTN","CWMAILA",59,0) + ; +"RTN","CWMAILA",60,0) +%DELETE(CWDATA,CWINPUT) ; +"RTN","CWMAILA",61,0) + ;CWINPUT - DELIMITER ';' +"RTN","CWMAILA",62,0) + ; 1st - IEN of message +"RTN","CWMAILA",63,0) + ; 2nd - IEN of mail basket +"RTN","CWMAILA",64,0) + N XMZ,XMDUZ,XMK,XMKZA,XMMSG +"RTN","CWMAILA",65,0) + S XMZ=$P(CWINPUT,";") +"RTN","CWMAILA",66,0) + S XMDUZ=DUZ +"RTN","CWMAILA",67,0) + S XMK=$P(CWINPUT,";",2) +"RTN","CWMAILA",68,0) + S XMKZA(XMZ)="" +"RTN","CWMAILA",69,0) + D DELMSG^XMXAPI(XMDUZ,"",.XMKZA,.XMMSG) +"RTN","CWMAILA",70,0) + I +$G(XMMSG) D +"RTN","CWMAILA",71,0) + . S CWDATA(1)="1^0^Message Deleted" +"RTN","CWMAILA",72,0) + E S CWDATA(1)="0^0^Unable to delete message" +"RTN","CWMAILA",73,0) + Q +"RTN","CWMAILA",74,0) +%SAVE(CWDATA,CWINPUT) ; +"RTN","CWMAILA",75,0) + ;CWINPUT - DELIMITER ';' +"RTN","CWMAILA",76,0) + ; 1st - IEN of message +"RTN","CWMAILA",77,0) + ; 2nd - IEN of mail basket +"RTN","CWMAILA",78,0) + ; 3rd - IEN of new mail basket +"RTN","CWMAILA",79,0) + N XMZ,XMK,XMKM,XMMSG,XMKZA +"RTN","CWMAILA",80,0) + S XMZ=$P(CWINPUT,";"),XMK=$P(CWINPUT,";",2) +"RTN","CWMAILA",81,0) + S XMKZA(XMZ)="" +"RTN","CWMAILA",82,0) + S XMKM=$P(CWINPUT,";",3) +"RTN","CWMAILA",83,0) + D MOVEMSG^XMXAPI(XMDUZ,"",.XMKZA,XMKM,.XMMSG) +"RTN","CWMAILA",84,0) + S CWDATA(1)=+$G(XMMSG) ;Return Status +"RTN","CWMAILA",85,0) + Q +"RTN","CWMAILA",86,0) +%MAKNEW(CWDATA,CWINPUT) ; +"RTN","CWMAILA",87,0) + ;CWINPUT - DELIMITER ';' +"RTN","CWMAILA",88,0) + ; 1st - IEN of message +"RTN","CWMAILA",89,0) + ; 2nd - IEN of mail basket +"RTN","CWMAILA",90,0) + N XMZ,XMK,XMKZA,XMMSG +"RTN","CWMAILA",91,0) + S CWDATA(1)=0 +"RTN","CWMAILA",92,0) + S XMZ=$P(CWINPUT,";") +"RTN","CWMAILA",93,0) + S XMK=+$P(CWINPUT,";",2) +"RTN","CWMAILA",94,0) + D MAKENEW^XMXUTIL(XMDUZ,XMK,XMZ,1) +"RTN","CWMAILA",95,0) + I XMK<.6 D ;MUST MOVE MESSAGE FROM WASTE BASKET TO IN BASKET +"RTN","CWMAILA",96,0) + . S XMKZA(XMZ)="" +"RTN","CWMAILA",97,0) + . D MOVEMSG^XMXAPI(XMDUZ,"",.XMKZA,1,.XMMSG) +"RTN","CWMAILA",98,0) + S CWDATA(1)="1^1" ;FORCE TO SUCCESS +"RTN","CWMAILA",99,0) + Q +"RTN","CWMAILA",100,0) +%NEWBSK(CWDATA,CWINPUT) ;CREATE A NEW MAIL BASKET +"RTN","CWMAILA",101,0) + ;CWINPUT - DELIMITER ';' +"RTN","CWMAILA",102,0) + ; 1st Piece - New basket name +"RTN","CWMAILA",103,0) + N CWBASKET,CWBSKN,CWMSG +"RTN","CWMAILA",104,0) + S CWBASKET=$$UP^XLFSTR($P(CWINPUT,";")) ;FORCE TO UPPER CASE +"RTN","CWMAILA",105,0) + D CRE8BSKT^XMXAPIB(XMDUZ,CWBASKET,.CWBSKN) +"RTN","CWMAILA",106,0) + I +$G(CWBSKN)>0 D +"RTN","CWMAILA",107,0) + . D QBSKT^XMXAPIB(XMDUZ,+CWBSKN,.CWMSG) +"RTN","CWMAILA",108,0) + . S CWDATA(1)="1"_U_CWBSKN_U_$P($G(CWMSG),U,2) +"RTN","CWMAILA",109,0) + E S CWDATA(1)=0_U_"Error-unable to create basket." +"RTN","CWMAILA",110,0) + Q +"RTN","CWMAILA",111,0) +%RESEQ(CWDATA,CWINPUT) ;RESEQUENCE A VISTA MAIL BASKET +"RTN","CWMAILA",112,0) + ;CWINPUT - DELIMITER ';' +"RTN","CWMAILA",113,0) + ; 2nd - IEN of mail basket +"RTN","CWMAILA",114,0) + N CWBASKET,CWDATT +"RTN","CWMAILA",115,0) + S CWBASKET=$P(CWINPUT,";",2) +"RTN","CWMAILA",116,0) + G:'CWBASKET RESEQE +"RTN","CWMAILA",117,0) + D RSEQBSKT^XMXAPIB(XMDUZ,CWBASKET,.CWDATT) +"RTN","CWMAILA",118,0) + I $L(CWDATT) S CWDATA(1)="1^1" +"RTN","CWMAILA",119,0) + E S CWDATA(1)="0^0^Error-unable to resequence messages." +"RTN","CWMAILA",120,0) +RESEQE Q +"RTN","CWMAILA",121,0) + ; +"RTN","CWMAILA",122,0) +%MSGSRC(CWDATA,CWINPUT,CWTEXT) ;MESSAGE SEARCH +"RTN","CWMAILA",123,0) + ;INPUT - CWINPUT AND CWTEXT ARRAY HOLD CRITERIA +"RTN","CWMAILA",124,0) + ;OUTPUT - REFER TO %LIST +"RTN","CWMAILA",125,0) + S CWDATA(1)="0^AN ERROR HAS OCCURRED" +"RTN","CWMAILA",126,0) + N CWVAL,CWMSG,CWMSGSUB,CWMSGDT,CWDCNT,CWMAIB,CWMSGBX,CWMSGLP +"RTN","CWMAILA",127,0) + N CWARY,CWFLAGS +"RTN","CWMAILA",128,0) + S CWFLAGS=$P(CWINPUT,";") ;Processing Flags +"RTN","CWMAILA",129,0) + S CWMAIB=$P(CWINPUT,";",2) ;MailBasket +"RTN","CWMAILA",130,0) + S CWMSG=0,CWDCNT=2,CWMSGLP=0 +"RTN","CWMAILA",131,0) + S CWMAIB=$S($L(CWMAIB):CWMAIB,1:"*") +"RTN","CWMAILA",132,0) + ;Convert External dates to FM Dates +"RTN","CWMAILA",133,0) + I $G(CWTEXT("FDATE")) D +"RTN","CWMAILA",134,0) + . S CWTEXT("FDATE")=$$CONVERT^XMXUTIL1(CWTEXT("FDATE")) +"RTN","CWMAILA",135,0) + I $G(CWTEXT("TDATE")) D +"RTN","CWMAILA",136,0) + . S CWTEXT("TDATE")=$$CONVERT^XMXUTIL1(CWTEXT("TDATE")) +"RTN","CWMAILA",137,0) + ;CALL API TO RETRIEVE MESSAGES +"RTN","CWMAILA",138,0) + D LISTMSGS^XMXAPIB(XMDUZ,CWMAIB,"BSKT;SUBJ;DATE;NEW",CWFLAGS,,,.CWTEXT) ; data put in ^TMP("XMLIST",$J +"RTN","CWMAILA",139,0) + I +$P($G(^TMP("XMLIST",$J,0)),U,1) D ; +"RTN","CWMAILA",140,0) + . D BLDLST^CWMAILF(.CWDATA,$NA(^TMP("XMLIST",$J)),.CWDCNT) +"RTN","CWMAILA",141,0) + I $O(CWDATA(1)) S CWDATA(1)="1^^DATA HAS BEEN FOUND" +"RTN","CWMAILA",142,0) + E S CWDATA(1)="1^^No Messages Found In Search" +"RTN","CWMAILA",143,0) + S $P(CWDATA(1),U,2)=CWDCNT-2 +"RTN","CWMAILA",144,0) +MSGSRCE Q +"RTN","CWMAILB") +0^9^B21615660 +"RTN","CWMAILB",1,0) +CWMAILB ;INDPLS/PLS- DELPHI VISTA MAIL SERVER CON'T ;03-Jun-1999 13:29;PS +"RTN","CWMAILB",2,0) + ;;2.1;CWMA GuiMail;;Jan 06, 1999 +"RTN","CWMAILB",3,0) +%FORWARD(CWDATA,CWINPUT,CWTEXT) ; +"RTN","CWMAILB",4,0) + ;Input: 1st Piece of CWINPUT holds IEN of Message +"RTN","CWMAILB",5,0) + ; CWTEXT holds recipient list +"RTN","CWMAILB",6,0) + ; +"RTN","CWMAILB",7,0) + N XMZ,XMY,CWLP,CWSDATA,CWSEDATA,CWTMP,CWFILE,CWIEN,CWNAM,XMINSTR,CWMSG +"RTN","CWMAILB",8,0) + N XMKZA +"RTN","CWMAILB",9,0) + S XMZ=$P(CWINPUT,";") +"RTN","CWMAILB",10,0) + S CWDATA(1)="0^^AN ERROR HAS OCCURRED" +"RTN","CWMAILB",11,0) + G:'$G(XMZ) FOREND +"RTN","CWMAILB",12,0) + S CWSDATA=$G(CWTEXT(-9902),"[START DATA]"),CWSEDATA=$G(CWTEXT(-9903),"[END DATA]") +"RTN","CWMAILB",13,0) + S CWLP=-1 D FNDLP(.CWLP,CWSDATA) +"RTN","CWMAILB",14,0) + G:$G(CWLP)="" FOREND +"RTN","CWMAILB",15,0) + F S CWLP=$O(CWTEXT(CWLP)) Q:CWLP="" Q:CWTEXT(CWLP)=CWSEDATA D +"RTN","CWMAILB",16,0) + .S CWTMP=$G(CWTEXT(CWLP)) Q:CWTMP="" +"RTN","CWMAILB",17,0) + .S CWFILE=+$P(CWTMP,"^"),CWIEN=+$P(CWTMP,"^",2),CWNAM=$P(CWTMP,"^",3) +"RTN","CWMAILB",18,0) + .I CWFILE=200 S XMY(CWIEN)="" +"RTN","CWMAILB",19,0) + .E I CWFILE=3.8 S XMY("G."_CWNAM)="" +"RTN","CWMAILB",20,0) + .E S XMY(CWNAM)="" +"RTN","CWMAILB",21,0) + I $D(XMY) D +"RTN","CWMAILB",22,0) + . S XMKZA(XMZ)="" +"RTN","CWMAILB",23,0) + . D FWDMSG^XMXAPI(XMDUZ,"",.XMKZA,.XMY,.XMINSTR,.CWMSG) +"RTN","CWMAILB",24,0) + ;RETURNS forwarded. +"RTN","CWMAILB",25,0) + S CWDATA(1)=+CWMSG_U_U_XMZ ;FORCE TO SUCCESS +"RTN","CWMAILB",26,0) +FOREND Q +"RTN","CWMAILB",27,0) + ; +"RTN","CWMAILB",28,0) +%TERMIN(CWDATA,CWINPUT) ;TERMINATE A MESSAGE THREAD +"RTN","CWMAILB",29,0) + ;Input: 1st piece = IEN of Message +"RTN","CWMAILB",30,0) + ; 2nd piece = IEN of Mail Basket +"RTN","CWMAILB",31,0) + ; +"RTN","CWMAILB",32,0) + N XMRC,XMZ,XMK,Y,CWMSGNM,CWMSGR +"RTN","CWMAILB",33,0) + S CWDATA(1)="0^^AN ERROR HAS OCCURRED" +"RTN","CWMAILB",34,0) + S XMZ=$P($G(CWINPUT),";"),XMK=$P($G(CWINPUT),";",2) +"RTN","CWMAILB",35,0) + S CWMSGNM(XMZ)="" +"RTN","CWMAILB",36,0) + D TERMMSG^XMXAPI(XMDUZ,"",.CWMSGNM,.CWMSGR) +"RTN","CWMAILB",37,0) + ;RETURNS terminated. +"RTN","CWMAILB",38,0) + S CWDATA(1)=+CWMSGR_U_U ;return 1 for success or 0 +"RTN","CWMAILB",39,0) + Q +"RTN","CWMAILB",40,0) +FNDLP(CWLP,X) ;FIND A CHARACTER STRING ENTRY +"RTN","CWMAILB",41,0) + F S CWLP=$O(CWTEXT(CWLP)) Q:CWLP="" Q:CWTEXT(CWLP)=X +"RTN","CWMAILB",42,0) + Q +"RTN","CWMAILB",43,0) + ; +"RTN","CWMAILB",44,0) +INCNT(CWCNT) ;INCREMENT COUNTER +"RTN","CWMAILB",45,0) + Q CWCNT+1 +"RTN","CWMAILB",46,0) + ; +"RTN","CWMAILB",47,0) +%CREATE(DATA,INPUT,TEXT) ;CREATE A NEW MESSAGE +"RTN","CWMAILB",48,0) + ;BUILD RETURN CODES FOR ERROR MESSAGING +"RTN","CWMAILB",49,0) + D %CREATE^CWMAIL2 +"RTN","CWMAILB",50,0) + Q +"RTN","CWMAILB",51,0) + ; +"RTN","CWMAILB",52,0) +%REPLY(CWDATA,CWINPUT,CWTEXT) ; This API uses global array for text +"RTN","CWMAILB",53,0) + ;INPUT - Piece 1 : Message Number +"RTN","CWMAILB",54,0) + ; Piece 2-4 : Not Used +"RTN","CWMAILB",55,0) + ; Piece 5 : Network Reply Flag (0 = no; 1 = yes) +"RTN","CWMAILB",56,0) + ; +"RTN","CWMAILB",57,0) + N CWMSGN,CWRESULT,CWSDATA,CWSEDATA,CWTMP,CWNWCHK,CWDATT +"RTN","CWMAILB",58,0) + N CWMSGT,XMZR,CWLP,XMINSTR +"RTN","CWMAILB",59,0) + S CWMSGN=$P(CWINPUT,";") +"RTN","CWMAILB",60,0) + S CWNWCHK=$P(CWINPUT,";",5) +"RTN","CWMAILB",61,0) + S CWDATA(1)="0^UNDEFINED ERROR" +"RTN","CWMAILB",62,0) + S CWTEXT=$NA(^TMP($J,"CWMAILLOAD")) +"RTN","CWMAILB",63,0) + G:'$G(CWMSGN) REPEND +"RTN","CWMAILB",64,0) + S CWSDATA=$G(@CWTEXT@(-9900),"[START DATA]"),CWSEDATA=$G(@CWTEXT@(-9901),"[END DATA]") +"RTN","CWMAILB",65,0) + S CWLP=-1 D GFNDLP(.CWLP,CWSDATA) +"RTN","CWMAILB",66,0) + G:$G(CWLP)="" REPEND +"RTN","CWMAILB",67,0) + F S CWLP=$O(@CWTEXT@(CWLP)) Q:CWLP="" Q:@CWTEXT@(CWLP)=CWSEDATA D +"RTN","CWMAILB",68,0) + .S ^TMP($J,"CWMAILOUT",CWLP)=$G(@CWTEXT@(CWLP)) +"RTN","CWMAILB",69,0) + G:'$D(^TMP($J,"CWMAILOUT")) REPEND +"RTN","CWMAILB",70,0) + S CWMSGT=$NA(^TMP($J,"CWMAILOUT")) +"RTN","CWMAILB",71,0) + S XMINSTR("NET REPLY")=$S(+$G(CWNWCHK):1,1:0) +"RTN","CWMAILB",72,0) + D REPLYMSG^XMXAPI(XMDUZ,"",CWMSGN,CWMSGT,.XMINSTR,.XMZR) +"RTN","CWMAILB",73,0) + I +$G(XMZR)>0 S CWDATA(1)=$S(CWNWCHK:2,1:1)_"^NO ERRORS"_U_CWMSGN ;SUCCESS +"RTN","CWMAILB",74,0) + E S CWDATA(1)="0^"_$G(CWDATA)_U_CWMSGN ;RETURN ERROR MESSAGE +"RTN","CWMAILB",75,0) +REPEND K ^TMP($J,"CWMAILLOAD"),^TMP($J,"CWMAILOUT") +"RTN","CWMAILB",76,0) + Q +"RTN","CWMAILB",77,0) +GFNDLP(CWLP,X) ;FIND A CHARACTER STRING ENTRY IN GLOBAL +"RTN","CWMAILB",78,0) + F S CWLP=$O(@CWTEXT@(CWLP)) Q:CWLP="" Q:@CWTEXT@(CWLP)=X +"RTN","CWMAILB",79,0) + Q +"RTN","CWMAILB",80,0) + ; +"RTN","CWMAILB",81,0) +%ANSWER(CWDATA,CWINPUT,CWTEXT) ; This API uses global array for text to answer a message +"RTN","CWMAILB",82,0) + ;INPUT - CWINPUT : Piece 1 : Message Number +"RTN","CWMAILB",83,0) + ; Piece 2 : Not Used +"RTN","CWMAILB",84,0) + ; Piece 3 : Message Attributes +"RTN","CWMAILB",85,0) + ; Pieces 4-5 : Not Used +"RTN","CWMAILB",86,0) + ; CWTEXT : Holds list of additional recipients +"RTN","CWMAILB",87,0) + ; +"RTN","CWMAILB",88,0) + N CWSDATA,CWSEDATA,CWLP,CWTXTARY,DA,DIE,DR,Y,XMTEXT +"RTN","CWMAILB",89,0) + N CWMSGABS,CWTMP,CWFILE,CWIEN,CWNAM +"RTN","CWMAILB",90,0) + N XMBODY,CWMSGN,XMY,XMZ,XMINSTR +"RTN","CWMAILB",91,0) + S CWMSGN=$P(CWINPUT,";") ;MESSAGE NUMBER +"RTN","CWMAILB",92,0) + I $G(CWMSGN)<1 S CWDATA(1)="0^98- No message number given" G ANSEND +"RTN","CWMAILB",93,0) + S CWDATA(1)="0^99- UNDEFINED ERROR" +"RTN","CWMAILB",94,0) + ;TEXT ARRAY CONTAINS RECIPIENT LIST AND MESSAGE TEXT LOADED FROM BMSGD call +"RTN","CWMAILB",95,0) + ;BUILD XMY ARRAY +"RTN","CWMAILB",96,0) + S CWTEXT=$NA(^TMP($J,"CWMAILLOAD")) +"RTN","CWMAILB",97,0) + S CWSDATA=$G(@CWTEXT@(-9902),"[START XMY]"),CWSEDATA=$G(@CWTEXT@(-9903),"[END XMY]") +"RTN","CWMAILB",98,0) + S CWLP=-1 D GFNDLP^CWMAILB(.CWLP,CWSDATA) +"RTN","CWMAILB",99,0) + ;RETRIEVE RECIPIENTS +"RTN","CWMAILB",100,0) + I $G(CWLP)'="" D +"RTN","CWMAILB",101,0) + . F S CWLP=$O(@CWTEXT@(CWLP)) Q:CWLP="" Q:@CWTEXT@(CWLP)=CWSEDATA D +"RTN","CWMAILB",102,0) + . . S CWTMP=$G(@CWTEXT@(CWLP)) Q:CWTMP="" +"RTN","CWMAILB",103,0) + . . S CWFILE=+$P(CWTMP,"^"),CWIEN=+$P(CWTMP,"^",2),CWNAM=$P(CWTMP,"^",3) +"RTN","CWMAILB",104,0) + . . I CWFILE=200 S XMY(CWIEN)="" +"RTN","CWMAILB",105,0) + . . E I CWFILE=3.8 S XMY("G."_CWNAM)="" +"RTN","CWMAILB",106,0) + . . E S XMY(CWNAM)="" ;treat address as internet address +"RTN","CWMAILB",107,0) + ;BUILD MESSAGE @TEXT@ ARRAY +"RTN","CWMAILB",108,0) + S CWSDATA=$G(@CWTEXT@(-9900),"[START DATA]"),CWSEDATA=$G(@CWTEXT@(-9901),"[END DATA]") +"RTN","CWMAILB",109,0) + S CWLP=-1 D GFNDLP^CWMAILB(.CWLP,CWSDATA) +"RTN","CWMAILB",110,0) + I $G(CWLP)="" S CWDATA(1)="0^3- NO MESSAGE TEXT" G ANSEND +"RTN","CWMAILB",111,0) + F S CWLP=$O(@CWTEXT@(CWLP)) Q:CWLP="" Q:@CWTEXT@(CWLP)=CWSEDATA D +"RTN","CWMAILB",112,0) + .S ^TMP($J,"CWMAILOUT",CWLP)=$G(@CWTEXT@(CWLP)) +"RTN","CWMAILB",113,0) + ;I '$D(^TMP($J,"CWMAILOUT")) S CWDATA(1)="0^3- NO MESSAGE TEXT" G ANSEND ;NO MESSAGE @CWTEXT@ +"RTN","CWMAILB",114,0) + ;I '$L($P($G(CWINPUT),";")) S CWDATA(1)="0^4- MESSAGE SUBJECT NOT GIVEN" G ANSEND +"RTN","CWMAILB",115,0) + ;E S XMSUBJ=$P($G(CWINPUT),";") +"RTN","CWMAILB",116,0) + ;PROCESS MESSAGE +"RTN","CWMAILB",117,0) + S XMBODY=$NA(^TMP($J,"CWMAILOUT")) +"RTN","CWMAILB",118,0) + S XMINSTR("FLAGS")=$P(CWINPUT,";",3) ;GET MESSAGE ATTRIBUTES +"RTN","CWMAILB",119,0) + D ANSRMSG^XMXAPI(XMDUZ,"",CWMSGN,"",XMBODY,.XMY,.XMINSTR,.XMZ) +"RTN","CWMAILB",120,0) + I $G(XMZ)<1 S CWDATA(1)="0^5- MESSAGE ANSWER FAILED" G ANSEND +"RTN","CWMAILB",121,0) + I +$G(XMZ)>0 S CWDATA(1)="1^^"_$G(XMZ) +"RTN","CWMAILB",122,0) +ANSEND K ^TMP($J,"CWMAILOUT"),^TMP($J,"CWMAILLOAD") +"RTN","CWMAILB",123,0) + Q +"RTN","CWMAILC") +0^10^B12646738 +"RTN","CWMAILC",1,0) +CWMAILC ;INDPLS/PLS- DELPHI VISTA MAIL SERVER CONT'D ;03-Jun-1999 13:29;PS +"RTN","CWMAILC",2,0) + ;;2.1;CWMA GuiMail;;Jan 06, 1999 +"RTN","CWMAILC",3,0) + ;MODIFIED FOR XM*7.1*50 +"RTN","CWMAILC",4,0) + Q ;ROUTINE CAN'T BE CALLED DIRECTLY +"RTN","CWMAILC",5,0) + ; +"RTN","CWMAILC",6,0) +%LATER(CWDATA,CWINPUT) ;LATER A MESSAGE +"RTN","CWMAILC",7,0) + ;CWINPUT - HOLDS MESSAGE NUMBER AND LATER DATE/TIME - DELIMITER ';' +"RTN","CWMAILC",8,0) + ; 1st - IEN of message +"RTN","CWMAILC",9,0) + ; 2nd - Later date +"RTN","CWMAILC",10,0) + N XMZ,XMDUZ,XMA +"RTN","CWMAILC",11,0) + S CWDATA(1)="0^^AN ERROR HAS OCCURRED" +"RTN","CWMAILC",12,0) + S XMZ=$P(CWINPUT,";") +"RTN","CWMAILC",13,0) + S XMDUZ=DUZ +"RTN","CWMAILC",14,0) + S XMA=$P(CWINPUT,";",2) +"RTN","CWMAILC",15,0) + G:'XMZ!('$G(XMA)) LATERE +"RTN","CWMAILC",16,0) + I $$LATER^CWMAIL1(XMZ,XMA) D +"RTN","CWMAILC",17,0) + .S CWDATA(1)="1^1^Message has been latered" +"RTN","CWMAILC",18,0) + E S CWDATA(1)="0^0^Unable to Later Message Number: "_XMZ +"RTN","CWMAILC",19,0) +LATERE Q +"RTN","CWMAILC",20,0) + ; +"RTN","CWMAILC",21,0) +%MBOX(CWDATA,CWINPUT) ;RETRIEVE MAILBOXES +"RTN","CWMAILC",22,0) + ;CWINPUT NOT USED +"RTN","CWMAILC",23,0) + ;VARIABLES : CWNMSG = NEW MESSAGES +"RTN","CWMAILC",24,0) + ; CWTMSG = TOTAL MESSAGE COUNT +"RTN","CWMAILC",25,0) + K ^TMP($J,"CWMBSKT") +"RTN","CWMAILC",26,0) + D LISTBSKT^XMXAPIB(XMDUZ,,,,,"^TMP($J,""CWMBSKT"")") +"RTN","CWMAILC",27,0) + N CWLP,CWLP1,CWCNT,CWNMSG,CWTMSG,CWFPES,CWHSN,CWBNAME,CWBIEN +"RTN","CWMAILC",28,0) + S CWDATA(1)="0^^AN ERROR HAS OCCURRED",CWCNT=2 +"RTN","CWMAILC",29,0) + S CWLP=0 F S CWLP=$O(^TMP($J,"CWMBSKT","XMLIST",CWLP)) Q:CWLP="" D +"RTN","CWMAILC",30,0) + . S CWBIEN=+$G(^TMP($J,"CWMBSKT","XMLIST",CWLP)) +"RTN","CWMAILC",31,0) + . I CWBIEN D +"RTN","CWMAILC",32,0) + . . S CWDATA(CWCNT)=$G(^TMP($J,"CWMBSKT","XMLIST",CWLP)) +"RTN","CWMAILC",33,0) + . . S CWCNT=CWCNT+1 +"RTN","CWMAILC",34,0) + I $O(CWDATA(1)) S CWDATA(1)="1^^DATA HAS BEEN FOUND" +"RTN","CWMAILC",35,0) + E S CWDATA(1)="1^^No Mail Boxes could be found" +"RTN","CWMAILC",36,0) + S $P(CWDATA(1),U,2)=CWCNT-2 +"RTN","CWMAILC",37,0) +MBOXE K ^TMP($J,"CWMBSKT") +"RTN","CWMAILC",38,0) + Q +"RTN","CWMAILC",39,0) +%PMBOX(CWDATA,CWINPUT) ;PURGE ENTIRE MAIL BOX +"RTN","CWMAILC",40,0) + ;CWINPUT = MAIL BOX IEN +"RTN","CWMAILC",41,0) + N CWLP,XMZ,XMK,CWX,CWY,XMKZA,XMMSG,CWCNT +"RTN","CWMAILC",42,0) + S XMK=$P(CWINPUT,";",2) +"RTN","CWMAILC",43,0) + G PMBOXE:'XMK +"RTN","CWMAILC",44,0) + S CWDATA(1)="0^^AN ERROR HAS OCCURRED",CWCNT=2 +"RTN","CWMAILC",45,0) + ;delete basket regardless of content +"RTN","CWMAILC",46,0) + D DELBSKT^XMXAPIB(XMDUZ,XMK,"D") +"RTN","CWMAILC",47,0) + S CWDATA(1)="1^1" +"RTN","CWMAILC",48,0) + ;E S CWDATA(1)="0^0" +"RTN","CWMAILC",49,0) +PMBOXE Q +"RTN","CWMAILC",50,0) +%RNMBOX(CWDATA,CWINPUT) ;RENAME EXISTING MAILBOX +"RTN","CWMAILC",51,0) + ;CWINPUT - DELIMITER ';' +"RTN","CWMAILC",52,0) + ; 1st - IEN of mailbox +"RTN","CWMAILC",53,0) + ; 2nd - New name of mailbox +"RTN","CWMAILC",54,0) + D NAMEBSKT^XMXAPIB(XMDUZ,$P(CWINPUT,";"),$P(CWINPUT,";",2)) +"RTN","CWMAILC",55,0) + S CWDATA(1)="1^1^MAILBOX NAME WAS CHANGED" ;FORCE TO SUCCESS +"RTN","CWMAILC",56,0) +RNMBOXE Q +"RTN","CWMAILC",57,0) +%MSGRCP(CWDATA,CWINPUT) ; RETURNS A LIST OF MESSAGE RECIPIENTS +"RTN","CWMAILC",58,0) + ;CWINPUT = IEN of message +"RTN","CWMAILC",59,0) + N CWDAT,CWI,XMZ +"RTN","CWMAILC",60,0) + K CWDATA +"RTN","CWMAILC",61,0) + S XMZ=+$P($G(CWINPUT),";",2) +"RTN","CWMAILC",62,0) + D RECPT^CWMAIL1(.CWDATA,XMZ) +"RTN","CWMAILC",63,0) +MSGRCPE Q +"RTN","CWMAILC",64,0) +%NETINFO(CWDATA,CWINPUT) ; RETURNS NETWORK TRANSMISSION INFO +"RTN","CWMAILC",65,0) + ;INPUT - IEN of message +"RTN","CWMAILC",66,0) + N CWDAT,CWI,XMZ +"RTN","CWMAILC",67,0) + K CWDATA +"RTN","CWMAILC",68,0) + S XMZ=+$P($G(CWINPUT),";",2) +"RTN","CWMAILC",69,0) + D NETINFO^CWMAIL1(.CWDATA,XMZ) +"RTN","CWMAILC",70,0) +NETINFOE Q +"RTN","CWMAILC",71,0) + ; +"RTN","CWMAILC",72,0) +%ADRSTO(CWDATA,CWINPUT) ;RETURNS ARRAY OF ADDRESSED TO +"RTN","CWMAILC",73,0) + ;CWINPUT - IEN of message +"RTN","CWMAILC",74,0) + N CWDAT,CWI,XMZ +"RTN","CWMAILC",75,0) + K CWDATA +"RTN","CWMAILC",76,0) + S XMZ=+$P($G(CWINPUT),";",2) +"RTN","CWMAILC",77,0) + D ADRSTO^CWMAIL1(.CWDATA,XMZ) +"RTN","CWMAILC",78,0) +ADRSTOE Q +"RTN","CWMAILC",79,0) +%GRPINF(CWDATA,CWINPUT) ;MAIL GROUP INFO +"RTN","CWMAILC",80,0) + ;CWINPUT - IEN of mail group +"RTN","CWMAILC",81,0) + N CWDAT,CWI,XMZ +"RTN","CWMAILC",82,0) + K CWDATA +"RTN","CWMAILC",83,0) + S CWI=2 +"RTN","CWMAILC",84,0) + S CWIEN=+$P($G(CWINPUT),";",2) +"RTN","CWMAILC",85,0) + I $$GRPINFO^CWMAIL3(.CWDAT,CWIEN) D +"RTN","CWMAILC",86,0) + .S CWI=+$G(CWDAT(-9900)) K CWDAT(-9900) +"RTN","CWMAILC",87,0) + .M CWDATA=CWDAT +"RTN","CWMAILC",88,0) + .S CWDATA(1)="1^^DATA HAS BEEN FOUND" +"RTN","CWMAILC",89,0) + E S CWDATA(1)="1^^There was no Mail Group information found." +"RTN","CWMAILC",90,0) + S $P(CWDATA(1),U,2)=CWI-2 +"RTN","CWMAILC",91,0) +GRPINFE Q +"RTN","CWMAILC",92,0) +%USRINF(CWDATA,CWINPUT) ;MAIL USER INFO +"RTN","CWMAILC",93,0) + ;CWINPUT - IEN of mail user +"RTN","CWMAILC",94,0) + N CWDAT,CWI,CWIEN +"RTN","CWMAILC",95,0) + K CWDATA +"RTN","CWMAILC",96,0) + S CWI=2 +"RTN","CWMAILC",97,0) + S CWIEN=+$P($G(CWINPUT),";",2) +"RTN","CWMAILC",98,0) + ;G:'CWIEN USRINFE +"RTN","CWMAILC",99,0) + I $$USRINFO^CWMAIL3(.CWDAT,CWIEN) D +"RTN","CWMAILC",100,0) + .S CWI=+$G(CWDAT(-9900)) K CWDAT(-9900) +"RTN","CWMAILC",101,0) + .M CWDATA=CWDAT +"RTN","CWMAILC",102,0) + .S CWDATA(1)="1^^DATA HAS BEEN FOUND" +"RTN","CWMAILC",103,0) + E S CWDATA(1)="1^^There was no Mail User information found." +"RTN","CWMAILC",104,0) + S $P(CWDATA(1),U,2)=CWI-2 +"RTN","CWMAILC",105,0) +USRINFE Q +"RTN","CWMAILC",106,0) +MBOXD(CWDAT,CWUSR,CWIEN) ;RETURN DATA FOR MAILBOX +"RTN","CWMAILC",107,0) + ;API NOT CURRENTLY USED +"RTN","CWMAILC",108,0) + ;INPUT CWDAT = RETURN ARRAY +"RTN","CWMAILC",109,0) + ; CWIEN = MAILBASKET IEN TO 3.7 FOR USER +"RTN","CWMAILC",110,0) + ;OUTPUT CWDAT("NAME") +"RTN","CWMAILC",111,0) + ; CWDAT("TMSG") +"RTN","CWMAILC",112,0) + ; CWDAT("NMSG") +"RTN","CWMAILC",113,0) + ; CWDAT("IEN") +"RTN","CWMAILC",114,0) + N CWDATT +"RTN","CWMAILC",115,0) + D QBSKT^XMXAPIB(CWUSR,CWIEN,.CWDATT) +"RTN","CWMAILC",116,0) + S CWDAT("IEN")=$P(CWDATT,U) +"RTN","CWMAILC",117,0) + S CWDAT("NAME")=$P(CWDATT,U,2) +"RTN","CWMAILC",118,0) + S CWDAT("TMSG")=+$P(CWDATT,U,3) +"RTN","CWMAILC",119,0) + S CWDAT("NMSG")=+$P(CWDATT,U,4) +"RTN","CWMAILC",120,0) + Q +"RTN","CWMAILD") +0^11^B18697748 +"RTN","CWMAILD",1,0) +CWMAILD ;INDPLS/PLS- DELPHI VISTA MAIL SERVER CONT'D ;16-Jul-1999 11:13;PS +"RTN","CWMAILD",2,0) + ;;2.1;CWMA GuiMail;;Jan 06, 1999 +"RTN","CWMAILD",3,0) + Q ;ROUTINE CAN'T BE CALLED DIRECTLY +"RTN","CWMAILD",4,0) + ; +"RTN","CWMAILD",5,0) +%BMSGD(CWDATA,CWINPUT,CWTEXT) ;BUILD MESSAGE DATA INTO GLOBAL +"RTN","CWMAILD",6,0) + ;USE CREATE OR REPLY TO SEND ACTUAL MESSAGE OR REPLY +"RTN","CWMAILD",7,0) + M ^TMP($J,"CWMAILLOAD")=CWTEXT +"RTN","CWMAILD",8,0) + S CWDATA(1)="1^1^DATA SET" +"RTN","CWMAILD",9,0) +BMSGDE Q +"RTN","CWMAILD",10,0) + ; +"RTN","CWMAILD",11,0) +%PERPREF(CWDATA,CWPARAM) ;retrieve personal preferences +"RTN","CWMAILD",12,0) + ;CWPARAM is not used +"RTN","CWMAILD",13,0) + N CWNAME,CWCNT +"RTN","CWMAILD",14,0) + S CWCNT=2 +"RTN","CWMAILD",15,0) + S CWDATA(1)="0^^AN ERROR HAS OCCURRED" +"RTN","CWMAILD",16,0) + I $$GETPKPM^CWMAILE(.CWDATA) D +"RTN","CWMAILD",17,0) + .S CWCNT=$G(CWDATA(-9900)) +"RTN","CWMAILD",18,0) + .K CWDATA(-9900) +"RTN","CWMAILD",19,0) + .S CWDATA(1)="1^1^Preferences have been retrieved" +"RTN","CWMAILD",20,0) + E S CWDATA(1)="0^0^Unable to retrieve preferences" +"RTN","CWMAILD",21,0) + S $P(CWDATA(1),U,2)=CWCNT-2 +"RTN","CWMAILD",22,0) +PERPREFE Q +"RTN","CWMAILD",23,0) + ; +"RTN","CWMAILD",24,0) +%USRLOG(CWDATA,DUZ) ;SET-UP USER PARTITION +"RTN","CWMAILD",25,0) + ; +"RTN","CWMAILD",26,0) + I +DUZ>0 D +"RTN","CWMAILD",27,0) + . N XMDISPI,XMDUN,XMDUZ,CWNAME,CWNKNM,CWNMAIL,CWPMAIL +"RTN","CWMAILD",28,0) + . S CWNKNM=$P($G(^VA(200,DUZ,.1)),U,4) +"RTN","CWMAILD",29,0) + . D INIT^XMVVITAE +"RTN","CWMAILD",30,0) + . S CWNMAIL=+$P($G(^XMB(3.7,DUZ,0)),U,6) +"RTN","CWMAILD",31,0) + . S CWDATA(1)="1^" +"RTN","CWMAILD",32,0) + . S $P(CWDATA(1),U,2)=XMV("DUZ NAME") ; SET USER NAME +"RTN","CWMAILD",33,0) + . S $P(CWDATA(1),U,3)=CWNKNM ;SET USER NICKNAME +"RTN","CWMAILD",34,0) + . S $P(CWDATA(1),U,4)=XMV("NEW MSGS") ;SET # OF NEW MSGS +"RTN","CWMAILD",35,0) + . S $P(CWDATA(1),U,5)=$G(XMV("WARNING",1))="Priority Mail" ;SET PRIORITY MAIL FLAG +"RTN","CWMAILD",36,0) + . S $P(CWDATA(1),U,6)=$P($G(XMV("NETNAME")),"@",2) ;get domain name for mail server +"RTN","CWMAILD",37,0) + ;$G(^XMB("NETNAME")) ;get domain name for mail server +"RTN","CWMAILD",38,0) + E S CWDATA(1)="0^USER NOT FOUND" +"RTN","CWMAILD",39,0) +USRLOGE Q +"RTN","CWMAILD",40,0) +%CHKMAIL(CWDATA,DUZ) ;CHECK FOR NEW MAIL +"RTN","CWMAILD",41,0) + ; +"RTN","CWMAILD",42,0) + N CWPMAIL,CWNMAIL,CWDAT +"RTN","CWMAILD",43,0) + I +DUZ>0 D +"RTN","CWMAILD",44,0) + . S CWDAT=$$NEWS^XMXUTIL(DUZ) ;FORMAT #NEWMSGS^PRIORITY^#NMSGIN^DT LAST MSG^ +"RTN","CWMAILD",45,0) + . S CWDATA(1)="1^"_U_U_+CWDAT_U_+$P(CWDAT,U,2) +"RTN","CWMAILD",46,0) + E S CWDATA(1)="0^USER NOT FOUND" +"RTN","CWMAILD",47,0) +CHKMAILE Q +"RTN","CWMAILD",48,0) + ; +"RTN","CWMAILD",49,0) +%PRTMSG(CWDATA,CWINPUT) ;PRINT A MESSAGE +"RTN","CWMAILD",50,0) + ; CWINPUT - 1st piece: XMZ message number +"RTN","CWMAILD",51,0) + ; 2nd piece: XMK message basket number +"RTN","CWMAILD",52,0) + ; 3rd piece: Print from response number 0=all +"RTN","CWMAILD",53,0) + ; 4th piece: null = no recpts 0=summary; 1=detail +"RTN","CWMAILD",54,0) + ; 5th piece: printer name +"RTN","CWMAILD",55,0) + ; 6th piece: 1=header, 0=headerless +"RTN","CWMAILD",56,0) + N XMZ,XMK,XMKN +"RTN","CWMAILD",57,0) + N XMINSTR,CWDAT1,CWDAT2,CWRESP,CWRECP,CWPRTN,XMMSG,XMTASK +"RTN","CWMAILD",58,0) + S XMZ=+$P(CWINPUT,";") +"RTN","CWMAILD",59,0) + S CWRESP=$P(CWINPUT,";",3) +"RTN","CWMAILD",60,0) + S CWRECP=$P(CWINPUT,";",4),CWRECP=$S($L(CWRECP):+CWRECP,1:-1) +"RTN","CWMAILD",61,0) + S CWPRTN=$P(CWINPUT,";",5) +"RTN","CWMAILD",62,0) + ;D INMSG1^XMXUTIL2(XMDUZ,XMZ,,.CWDAT1,.CWDAT2) ;GET # OF RESPONSES - NOT CURRENTLY NEEDED +"RTN","CWMAILD",63,0) + S XMINSTR("HDR")=$S('$L($P(CWINPUT,";",6)):1,1:+$P(CWINPUT,";",6)) ;DEFAULT TO PRINTING HEADER +"RTN","CWMAILD",64,0) + S XMINSTR("RESPS")=$S(+CWRESP:+CWRESP_"-",1:"*") ;DEFINE RANGE TO PRINT +$G((CWDAT("RESPS"))) HOLDS TOTAL # OF RESPONSES +"RTN","CWMAILD",65,0) + I CWRECP>-1 D +"RTN","CWMAILD",66,0) + . S XMINSTR("RECIPS")=$S(+CWRECP:2,1:1) ;CONVERT CWMA TO XM NOMENCLATURE +"RTN","CWMAILD",67,0) + E S XMINSTR("RECIPS")=0 ;Don't print recipient list +"RTN","CWMAILD",68,0) + D:$L($G(CWPRTN)) PRTMSG^XMXAPI(XMDUZ,,XMZ,CWPRTN,.XMINSTR,,.XMTASK) +"RTN","CWMAILD",69,0) + I +$G(XMTASK) S CWDATA(1)="1^1^"_$G(XMTASK) +"RTN","CWMAILD",70,0) + E S CWDATA(1)="1^0^Message could not be printed" +"RTN","CWMAILD",71,0) +PRTMSGE Q +"RTN","CWMAILD",72,0) + ; +"RTN","CWMAILD",73,0) +%SUPREF(CWDATA,CWINPUT,CWTEXT) ;Set user preferences +"RTN","CWMAILD",74,0) + ; +"RTN","CWMAILD",75,0) + N CWSDATA,CWSEDATA,CWLP +"RTN","CWMAILD",76,0) + N CWPRM,CWVAL,CWLP1,CWERR +"RTN","CWMAILD",77,0) + S CWDATA(1)="0^^AN ERROR HAS OCCURRED" +"RTN","CWMAILD",78,0) + S CWSDATA=$G(CWTEXT(-9902),"[START DATA]"),CWSEDATA=$G(CWTEXT(-9903),"[END DATA]") +"RTN","CWMAILD",79,0) + S CWLP=-1 D FNDLP^CWMAILB(.CWLP,CWSDATA) +"RTN","CWMAILD",80,0) + G:$G(CWLP)="" SUPREND +"RTN","CWMAILD",81,0) + F S CWLP=$O(CWTEXT(CWLP)) Q:CWLP="" Q:CWTEXT(CWLP)=CWSEDATA D +"RTN","CWMAILD",82,0) + . I CWTEXT(CWLP)'?1"[".E1"]" D +"RTN","CWMAILD",83,0) + . . S CWPRM=$$GETPRM^CWMAILE($P(CWTEXT(CWLP),"=")) ;get parameter +"RTN","CWMAILD",84,0) + . . I $L(CWPRM) D +"RTN","CWMAILD",85,0) + . . . S CWVAL=$P(CWTEXT(CWLP),"=",2) ;get value +"RTN","CWMAILD",86,0) + . . . S CWERR=$$SETPARM(XMDUZ,CWPRM,CWVAL) ;set value into parameter +"RTN","CWMAILD",87,0) + S CWDATA(1)="1^1^Preferences have been stored" +"RTN","CWMAILD",88,0) +SUPREND Q +"RTN","CWMAILD",89,0) + ; +"RTN","CWMAILD",90,0) +SETPARM(CWDUZ,CWPARM,CWVALUE) ;Set value into parameter instance +"RTN","CWMAILD",91,0) + ;Input: CWPARM - holds the return value of $$GETPRM^CWMAILE +"RTN","CWMAILD",92,0) + ; CWVALUE - value to stuff (single value or comma delimited string) +"RTN","CWMAILD",93,0) + ; CWDUZ - user +"RTN","CWMAILD",94,0) + Q:'CWDUZ 1 ;must have a valid user +"RTN","CWMAILD",95,0) + K CWERR +"RTN","CWMAILD",96,0) + I 'CWPARM D ;single instance +"RTN","CWMAILD",97,0) + . D EN^XPAR("USR.`"_CWDUZ,$P(CWPARM,"|",2),1,CWVALUE,.CWERR) +"RTN","CWMAILD",98,0) + E D ;multiple instances +"RTN","CWMAILD",99,0) + . N CWLP,CWX,CWXA +"RTN","CWMAILD",100,0) + . S CWX=CWVALUE,CWLP=0 +"RTN","CWMAILD",101,0) + . F Q:$L(CWX,";")<(CWLP+1) D +"RTN","CWMAILD",102,0) + . . S CWLP=CWLP+1 +"RTN","CWMAILD",103,0) + . . S CWXA=$P(CWX,";",CWLP) ;CWXA holds the column,width pair +"RTN","CWMAILD",104,0) + . . D EN^XPAR("USR.`"_CWDUZ,$P(CWPARM,"|",2),CWLP,CWXA,.CWERR) ;stuff value +"RTN","CWMAILD",105,0) + Q CWERR +"RTN","CWMAILD",106,0) + ; +"RTN","CWMAILD",107,0) +%GETSVER(CWDATA,CWPARAM) ;GET SERVER VERSION +"RTN","CWMAILD",108,0) + S CWDATA(1)="1^1^"_+$$VERSION^XPDUTL("CWMA") +"RTN","CWMAILD",109,0) + Q +"RTN","CWMAILE") +0^12^B13183521 +"RTN","CWMAILE",1,0) +CWMAILE ;INDPLS/PLS- DELPHI VISTA MAIL SERVER CONT'D ;07-Sep-1999 14:08;PS +"RTN","CWMAILE",2,0) + ;;2.1;CWMA GuiMail;;Jan 06, 1999 +"RTN","CWMAILE",3,0) + Q ;ROUTINE CAN'T BE CALLED DIRECTLY +"RTN","CWMAILE",4,0) + ; +"RTN","CWMAILE",5,0) +GETPKPM(CWDAT) ;get package parameters and return in CWDAT +"RTN","CWMAILE",6,0) + ;called by CWMAILD +"RTN","CWMAILE",7,0) + ;This API uses the PRECEDENCE field of each parameter +"RTN","CWMAILE",8,0) + N CWCNT,CWLP +"RTN","CWMAILE",9,0) + S CWCNT=2 +"RTN","CWMAILE",10,0) + S CWDAT(CWCNT)="[Sound]",CWCNT=CWCNT+1 +"RTN","CWMAILE",11,0) + S CWDAT(CWCNT)="Sound="_+$$GET^XPAR("ALL","CWMA SOUND ENABLED"),CWCNT=CWCNT+1 +"RTN","CWMAILE",12,0) + S CWDAT(CWCNT)="Message Open="_$$GET^XPAR("ALL","CWMA SOUND MESSAGE OPEN"),CWCNT=CWCNT+1 +"RTN","CWMAILE",13,0) + S CWDAT(CWCNT)="Message Close="_$$GET^XPAR("ALL","CWMA SOUND MESSAGE CLOSE"),CWCNT=CWCNT+1 +"RTN","CWMAILE",14,0) + S CWDAT(CWCNT)="New Mail="_$$GET^XPAR("ALL","CWMA SOUND NEW MAIL"),CWCNT=CWCNT+1 +"RTN","CWMAILE",15,0) + S CWDAT(CWCNT)="Priority Mail="_$$GET^XPAR("ALL","CWMA SOUND PRIORITY MAIL"),CWCNT=CWCNT+1 +"RTN","CWMAILE",16,0) + S CWDAT(CWCNT)="[StartUp]",CWCNT=CWCNT+1 +"RTN","CWMAILE",17,0) + S CWDAT(CWCNT)="StartUpNewMail="_$$GET^XPAR("ALL","CWMA STARTUP NEW MAIL",1,"E"),CWCNT=CWCNT+1 +"RTN","CWMAILE",18,0) + S CWDAT(CWCNT)="StartUpOpenMailBox="_$$GET^XPAR("ALL","CWMA STARTUP OPEN MAIL BOX",1,"E"),CWCNT=CWCNT+1 +"RTN","CWMAILE",19,0) + S CWDAT(CWCNT)="StartUpOpenMailBoxName="_$$GET^XPAR("ALL","CWMA STARTUP MAIL BOX NAME"),CWCNT=CWCNT+1 +"RTN","CWMAILE",20,0) + S CWDAT(CWCNT)="[General]",CWCNT=CWCNT+1 +"RTN","CWMAILE",21,0) + S CWDAT(CWCNT)="CreateMessageAttributes="_$$GET^XPAR("ALL","CWMA GENERAL CMA STYLE"),CWCNT=CWCNT+1 +"RTN","CWMAILE",22,0) + S CWDAT(CWCNT)="MessagePropertiesDefaultTab="_$$GET^XPAR("ALL","CWMA GENERAL MPD TAB"),CWCNT=CWCNT+1 +"RTN","CWMAILE",23,0) + S CWDAT(CWCNT)="NewMailPollingFrequency="_$$GET^XPAR("ALL","CWMA GENERAL NMP FREQ"),CWCNT=CWCNT+1 +"RTN","CWMAILE",24,0) + S CWDAT(CWCNT)="MessageDisplayCount="_$$GET^XPAR("ALL","CWMA GENERAL MD COUNT"),CWCNT=CWCNT+1 +"RTN","CWMAILE",25,0) + S CWDAT(CWCNT)="DefaultVistaPrinter="_$$GET^XPAR("ALL","CWMA GENERAL VISTA PRT"),CWCNT=CWCNT+1 +"RTN","CWMAILE",26,0) + S CWDAT(CWCNT)="DefaultPrintMode="_+$$GET^XPAR("ALL","CWMA GENERAL PRINTMODE"),CWCNT=CWCNT+1 +"RTN","CWMAILE",27,0) + S CWDAT(CWCNT)="MessageDisplayColumns="_$$GETCOL,CWCNT=CWCNT+1 ;get column information +"RTN","CWMAILE",28,0) + S CWDAT(CWCNT)="AllowAttachments="_$$GET^XPAR("ALL","CWMA ALLOW ATTACHMENTS",1,"E"),CWCNT=CWCNT+1 +"RTN","CWMAILE",29,0) + S CWDAT(-9900)=CWCNT +"RTN","CWMAILE",30,0) + Q $O(CWDAT(1)) +"RTN","CWMAILE",31,0) + ; +"RTN","CWMAILE",32,0) +GETCOL() ;retrieve column information for message display +"RTN","CWMAILE",33,0) + N CWLP,CWDAA,CWTMP +"RTN","CWMAILE",34,0) + S CWTMP="" +"RTN","CWMAILE",35,0) + D GETLST^XPAR(.CWDAA,"ALL","CWMA GENERAL MD COL") +"RTN","CWMAILE",36,0) + S CWLP=0 F S CWLP=$O(CWDAA(CWLP)) Q:CWLP<1 D +"RTN","CWMAILE",37,0) + . S CWTMP=CWTMP_$P(CWDAA(CWLP),U,2)_";" +"RTN","CWMAILE",38,0) + Q CWTMP +"RTN","CWMAILE",39,0) + ; +"RTN","CWMAILE",40,0) +GETPRM(CWVAR) ;lookup parameter for a given variable +"RTN","CWMAILE",41,0) + ;returns set procedure|parameter +"RTN","CWMAILE",42,0) + ; set procedure: 0=single instance, 1=multiple instances +"RTN","CWMAILE",43,0) + Q:CWVAR="Sound" "0|CWMA SOUND ENABLED" +"RTN","CWMAILE",44,0) + Q:CWVAR="Message Open" "0|CWMA SOUND MESSAGE OPEN" +"RTN","CWMAILE",45,0) + Q:CWVAR="Message Close" "0|CWMA SOUND MESSAGE CLOSE" +"RTN","CWMAILE",46,0) + Q:CWVAR="Priority Mail" "0|CWMA SOUND PRIORITY MAIL" +"RTN","CWMAILE",47,0) + Q:CWVAR="New Mail" "0|CWMA SOUND NEW MAIL" +"RTN","CWMAILE",48,0) + Q:CWVAR="StartUpNewMail" "0|CWMA STARTUP NEW MAIL" +"RTN","CWMAILE",49,0) + Q:CWVAR="StartUpOpenMailBox" "0|CWMA STARTUP OPEN MAIL BOX" +"RTN","CWMAILE",50,0) + Q:CWVAR="StartUpOpenMailBoxName" "0|CWMA STARTUP MAIL BOX NAME" +"RTN","CWMAILE",51,0) + Q:CWVAR="CreateMessageAttributes" "0|CWMA GENERAL CMA STYLE" +"RTN","CWMAILE",52,0) + Q:CWVAR="MessagePropertiesDefaultTab" "0|CWMA GENERAL MPD TAB" +"RTN","CWMAILE",53,0) + Q:CWVAR="NewMailPollingFrequency" "0|CWMA GENERAL NMP FREQ" +"RTN","CWMAILE",54,0) + Q:CWVAR="MessageDisplayCount" "0|CWMA GENERAL MD COUNT" +"RTN","CWMAILE",55,0) + Q:CWVAR="DefaultVistaPrinter" "0|CWMA GENERAL VISTA PRT" +"RTN","CWMAILE",56,0) + Q:CWVAR="DefaultPrintMode" "0|CWMA GENERAL PRINTMODE" +"RTN","CWMAILE",57,0) + Q:CWVAR="MessageDisplayColumns" "1|CWMA GENERAL MD COL" +"RTN","CWMAILE",58,0) + Q "" +"RTN","CWMAILE",59,0) + ; +"RTN","CWMAILF") +0^18^B6688838 +"RTN","CWMAILF",1,0) +CWMAILF ;INDPLS/PLS- DELPHI VISTA MAIL SERVER CONT'D ;02-Jul-1999 15:53;PS +"RTN","CWMAILF",2,0) + ;;2.1;CWMA GuiMail;;Jan 06, 1999 +"RTN","CWMAILF",3,0) + ;MODIFIED FOR XM*7.1*50 +"RTN","CWMAILF",4,0) + Q ;ROUTINE CAN'T BE CALLED DIRECTLY +"RTN","CWMAILF",5,0) +BLDLST(CWDATA,CWDATSRC,CWDCNT) ; build list of messages - called by CWMAILA +"RTN","CWMAILF",6,0) + ;Input: CWDATA - pass by reference +"RTN","CWMAILF",7,0) + ; CWDATSRC - $NA containing data +"RTN","CWMAILF",8,0) + ; CWDCNT - node counter +"RTN","CWMAILF",9,0) + ;Return: CWDATA array +"RTN","CWMAILF",10,0) + ;CWARY format: piece value +"RTN","CWMAILF",11,0) + ; 1 message basket +"RTN","CWMAILF",12,0) + ; 2 message ien +"RTN","CWMAILF",13,0) + ; 3 message subject +"RTN","CWMAILF",14,0) + ; 4 message date sent +"RTN","CWMAILF",15,0) + ; 5 not used +"RTN","CWMAILF",16,0) + ; 6 message type +"RTN","CWMAILF",17,0) + ; 7 confirmation flag +"RTN","CWMAILF",18,0) + ; 8 closed flag +"RTN","CWMAILF",19,0) + ; 9 info flag +"RTN","CWMAILF",20,0) + ; 10 confidential flag +"RTN","CWMAILF",21,0) + ; 11 sender ien +"RTN","CWMAILF",22,0) + ; 12 broadcast flag +"RTN","CWMAILF",23,0) + ; 13 sender name +"RTN","CWMAILF",24,0) + ; 14 total # of recipients +"RTN","CWMAILF",25,0) + ; 15 total # of replies +"RTN","CWMAILF",26,0) + ; 16 priority flag +"RTN","CWMAILF",27,0) + ; 17 last response read +"RTN","CWMAILF",28,0) + ; 18 message basket sequence number +"RTN","CWMAILF",29,0) + ; 19 new message flag +"RTN","CWMAILF",30,0) + ; 20 answer message flag +"RTN","CWMAILF",31,0) + ; +"RTN","CWMAILF",32,0) + S CWDATA(1)="0^AN ERROR HAS OCCURRED" +"RTN","CWMAILF",33,0) + N CWVAL,CWMSG,CWMSGSUB,CWMSGDT,CWMAIB,CWMSGBX,CWMSGLP +"RTN","CWMAILF",34,0) + N CWARY +"RTN","CWMAILF",35,0) + S CWMSG=0,CWDCNT=2,CWMSGLP=0 +"RTN","CWMAILF",36,0) + ;CALL API TO RETRIEVE MESSAGES +"RTN","CWMAILF",37,0) + F S CWMSGLP=$O(@CWDATSRC@(CWMSGLP)) Q:CWMSGLP<1 D +"RTN","CWMAILF",38,0) + . S CWARY(1)=+$G(@CWDATSRC@(CWMSGLP,"BSKT")) +"RTN","CWMAILF",39,0) + . S CWARY(2)=+$G(@CWDATSRC@(CWMSGLP)) +"RTN","CWMAILF",40,0) + . S CWARY(3)=$G(@CWDATSRC@(CWMSGLP,"SUBJ")) +"RTN","CWMAILF",41,0) + . S CWARY(4)=$P($G(@CWDATSRC@(CWMSGLP,"DATE")),U) +"RTN","CWMAILF",42,0) + . I CWARY(4)?1.N1".".N S CWARY(4)=$$FMDTE^CWMAIL4(CWARY(4),"5MZ") +"RTN","CWMAILF",43,0) + . E S CWARY(4)=$$FMDTE^CWMAIL4($$CONVERT^XMXUTIL1(CWARY(4),1),"5MZ") +"RTN","CWMAILF",44,0) + . S CWARY(18)=$G(@CWDATSRC@(CWMSGLP,"SEQN")) +"RTN","CWMAILF",45,0) + . S CWARY(19)=+$G(@CWDATSRC@(CWMSGLP,"NEW")) +"RTN","CWMAILF",46,0) + . S CWDATA(CWDCNT)=$$ADDMP^CWMAIL0(CWARY(2),.CWARY) +"RTN","CWMAILF",47,0) + . S CWDCNT=CWDCNT+1 +"RTN","CWMAILF",48,0) + Q +"RTN","CWMAILF",49,0) + ; +"RTN","CWMAILF",50,0) +%MSGISRC(CWDATA,CWINPUT) ;SEARCH FOR A PARTICULAR MESSAGE NUMBER +"RTN","CWMAILF",51,0) + ;CWINPUT - IEN of Message +"RTN","CWMAILF",52,0) + N CWI,CWMIEN,CWDATT,CWDCNT +"RTN","CWMAILF",53,0) + K CWDATA +"RTN","CWMAILF",54,0) + S CWDCNT=2 +"RTN","CWMAILF",55,0) + S CWMIEN=+$P($G(CWINPUT),";") +"RTN","CWMAILF",56,0) + I $$ACCESS^XMXSEC(XMDUZ,CWMIEN) D +"RTN","CWMAILF",57,0) + . D MSGINIT(CWMIEN,.CWDATT) +"RTN","CWMAILF",58,0) + . D BLDLST(.CWDATA,$NA(CWDATT),.CWDCNT) +"RTN","CWMAILF",59,0) + . ;S CWDATA(1)="1^^DATA HAS BEEN FOUND" +"RTN","CWMAILF",60,0) + ;E S CWDATA(1)="1^^Message not found or you don't have access to it." +"RTN","CWMAILF",61,0) + I $O(CWDATA(1)) S CWDATA(1)="1^^DATA HAS BEEN FOUND" +"RTN","CWMAILF",62,0) + E S CWDATA(1)="1^^Message not found or you lack access to it." +"RTN","CWMAILF",63,0) + S $P(CWDATA(1),U,2)=CWDCNT-2 +"RTN","CWMAILF",64,0) +MSGISRCE Q +"RTN","CWMAILF",65,0) + ; +"RTN","CWMAILF",66,0) +MSGINIT(CWMIEN,CWDATT) ;Individual Message Pre-processor +"RTN","CWMAILF",67,0) + N CWIM,CWINSTR,CWIU +"RTN","CWMAILF",68,0) + D INMSG^XMXUTIL2(XMDUZ,"",CWMIEN,,,.CWIM,.CWINSTR,.CWIU) +"RTN","CWMAILF",69,0) + S CWDATT(1)=CWMIEN +"RTN","CWMAILF",70,0) + S CWDATT(1,"DATE")=$G(CWIM("DATE")) +"RTN","CWMAILF",71,0) + S CWDATT(1,"SUBJ")=$G(CWIM("SUBJ")) +"RTN","CWMAILF",72,0) + S CWDATT(1,"SEQN")="" +"RTN","CWMAILF",73,0) + S CWDATT(1,"BSKT")=$$BSKT^XMXUTIL2(XMDUZ,CWMIEN,1) +"RTN","CWMAILF",74,0) + S CWDATT(1,"NEW")=$G(CWIU("NEW"))>0 +"RTN","CWMAILF",75,0) + Q +"RTN","CWMAILSN") +1^19 +"RTN","CWMAILSU") +1^20 +"RTN","CWMAINI") +0^15^B8244845 +"RTN","CWMAINI",1,0) +CWMAINI ;INDPLS/PLS - KIDS INITS FOR GUIMail INSTALL ;30-Jul-1999 10:42;PS; +"RTN","CWMAINI",2,0) + ;;2.1;CWMA GuiMail;;Jan 06, 1999 +"RTN","CWMAINI",3,0) + ; Environment Check +"RTN","CWMAINI",4,0) +EC D VCHK("RPC BROKER",1.1) ;RPC Broker +"RTN","CWMAINI",5,0) + D PCHK("DI*21.0*34") ;Fileman/Delphi Components +"RTN","CWMAINI",6,0) + D PCHK("XM*7.1*50") ;MailMan Patch +"RTN","CWMAINI",7,0) + D PCHK("XM*7.1*73") ;MailMan Patch to $$CONVERT^XMXUTIL1 +"RTN","CWMAINI",8,0) + D PCHK("XU*8.0*71") ;Kernel date formatting patch +"RTN","CWMAINI",9,0) + D PCHK("XT*7.3*26") ;Kernel Tool-Kit Generic Parameters +"RTN","CWMAINI",10,0) + S:$G(XPDENV) XPDDIQ("XPZ1")=0 ;force Disable Options/Protocols prompt to NO +"RTN","CWMAINI",11,0) + Q +"RTN","CWMAINI",12,0) +VCHK(CWP,CWV) ;CHECK VERSION OF PASSED PACKAGE +"RTN","CWMAINI",13,0) + D:$$VERSION^XPDUTL(CWP)40!($L(X)<1) X +"^DD",8989.51,8989.51,.02,1,0) +^.1 +"^DD",8989.51,8989.51,.02,1,1,0) +8989.51^C^MUMPS +"^DD",8989.51,8989.51,.02,1,1,1) +S ^XTV(8989.51,"C",$$UPPER^XPARDD1(X),DA)="" +"^DD",8989.51,8989.51,.02,1,1,2) +K ^XTV(8989.51,"C",$$UPPER^XPARDD1(X),DA) +"^DD",8989.51,8989.51,.02,1,1,"%D",0) +^^2^2^2970606^ +"^DD",8989.51,8989.51,.02,1,1,"%D",1,0) +Cross references display text for lookup. Display text is put in upper +"^DD",8989.51,8989.51,.02,1,1,"%D",2,0) +case so lookup will be case insensitive. +"^DD",8989.51,8989.51,.02,1,1,"DT") +2960409 +"^DD",8989.51,8989.51,.02,3) +Answer must be 1-40 characters in length. +"^DD",8989.51,8989.51,.02,21,0) +^^2^2^2960207^ +"^DD",8989.51,8989.51,.02,21,1,0) +This is the displayable name for the parameter (allows mixed case, +"^DD",8989.51,8989.51,.02,21,2,0) +non-namespaced names). +"^DD",8989.51,8989.51,.02,"DT") +2960409 +"^DD",8989.51,8989.51,.03,0) +MULTIPLE VALUED^S^1:Yes;0:No;^0;3^Q +"^DD",8989.51,8989.51,.03,3) +Enter 'Yes' if multiple instances of the parameter are allowed for any single entity. +"^DD",8989.51,8989.51,.03,21,0) +^^3^3^2980705^ +"^DD",8989.51,8989.51,.03,21,1,0) +If this field is set to 'Yes', multiple instances of the parameter will be +"^DD",8989.51,8989.51,.03,21,2,0) +allowed for a single entity. Otherwise, the value of the instance field +"^DD",8989.51,8989.51,.03,21,3,0) +for a given Entity-Parameter combination will always be '1'. +"^DD",8989.51,8989.51,.03,"DT") +2960207 +"^DD",8989.51,8989.51,.04,0) +INSTANCE TERM^F^^0;4^K:$L(X)>40!($L(X)<1) X +"^DD",8989.51,8989.51,.04,3) +Answer must be 1-40 characters in length. +"^DD",8989.51,8989.51,.04,21,0) +^^3^3^2960207^ +"^DD",8989.51,8989.51,.04,21,1,0) +This is a free text term that can be used when prompting for a new instance of +"^DD",8989.51,8989.51,.04,21,2,0) +the parameter (in the case where the parameter in multiple valued). If not +"^DD",8989.51,8989.51,.04,21,3,0) +entered, the word "Instance" will be used. +"^DD",8989.51,8989.51,.04,"DT") +2960207 +"^DD",8989.51,8989.51,.05,0) +VALUE TERM^F^^0;5^K:$L(X)>40!($L(X)<1) X +"^DD",8989.51,8989.51,.05,3) +Answer must be 1-40 characters in length. +"^DD",8989.51,8989.51,.05,21,0) +^^2^2^2970626^ +"^DD",8989.51,8989.51,.05,21,1,0) +This contains text that is issued as a prompt for the value. If nothing +"^DD",8989.51,8989.51,.05,21,2,0) +is here, the prompt will be the word 'Value:'. +"^DD",8989.51,8989.51,.05,"DT") +2960612 +"^DD",8989.51,8989.51,.06,0) +PROHIBIT EDITING^S^1:Yes;0:No;^0;6^Q +"^DD",8989.51,8989.51,.06,3) +Choose 'Disallow Editing' if editing of this field should not be allowed. +"^DD",8989.51,8989.51,.06,21,0) +^^2^2^2970306^ +"^DD",8989.51,8989.51,.06,21,1,0) +This field prevents the parameter value from being edited with Fileman or +"^DD",8989.51,8989.51,.06,21,2,0) +any Parameters tools. +"^DD",8989.51,8989.51,.06,"DT") +2970317 +"^DD",8989.51,8989.51,1.1,0) +VALUE DATA TYPE^S^D:date/time;F:free text;N:numeric;S:set of codes;Y:yes/no;P:pointer;W:word processing;M:M code;C:constant;^1;1^Q +"^DD",8989.51,8989.51,1.1,3) +Enter the type of data this parameter will contain. +"^DD",8989.51,8989.51,1.1,21,0) +^^2^2^2960207^ +"^DD",8989.51,8989.51,1.1,21,1,0) +This is the type of data this parameter will contain. This field is used to +"^DD",8989.51,8989.51,1.1,21,2,0) +define a call to the reader (^DIR) in most cases. +"^DD",8989.51,8989.51,1.1,"DT") +2960528 +"^DD",8989.51,8989.51,1.2,0) +VALUE DOMAIN^F^^1;2^K:$L(X)>100!($L(X)<1) X +"^DD",8989.51,8989.51,1.2,3) +Enter up to 100 characters to further define the data type (used by ^DIR). +"^DD",8989.51,8989.51,1.2,21,0) +^^3^3^2960207^ +"^DD",8989.51,8989.51,1.2,21,1,0) +This is a string that may be used to further specify the data type. The +"^DD",8989.51,8989.51,1.2,21,2,0) +string stored here should be appropriate for the second ^-piece of DIR(0) +"^DD",8989.51,8989.51,1.2,21,3,0) +when used with the data type field. +"^DD",8989.51,8989.51,1.2,"DT") +2960207 +"^DD",8989.51,8989.51,1.3,0) +VALUE HELP^F^^1;3^K:$L(X)>80!($L(X)<1) X +"^DD",8989.51,8989.51,1.3,3) +Enter a line of help text to be displayed when entering a parameter value. +"^DD",8989.51,8989.51,1.3,21,0) +^^3^3^2960207^ +"^DD",8989.51,8989.51,1.3,21,1,0) +This field contains a line of help text that is displayed when the user +"^DD",8989.51,8989.51,1.3,21,2,0) +requests help or encounters an error while entering the VALUE field in the +"^DD",8989.51,8989.51,1.3,21,3,0) +PARAMETERS file. +"^DD",8989.51,8989.51,1.3,"DT") +2960207 +"^DD",8989.51,8989.51,2,0) +VALUE VALIDATION CODE^K^^2;E1,245^K:$L(X)>245 X D:$D(X) ^DIM +"^DD",8989.51,8989.51,2,3) +This is M code used by DIR (3rd piece of DIR(0)). +"^DD",8989.51,8989.51,2,9) +@ +"^DD",8989.51,8989.51,2,21,0) +^^2^2^2980705^ +"^DD",8989.51,8989.51,2,21,1,0) +This field contains the M code that is placed in the third piece of DIR(0) +"^DD",8989.51,8989.51,2,21,2,0) +when validating a value in the PARAMETERS file. +"^DD",8989.51,8989.51,2,"DT") +2960207 +"^DD",8989.51,8989.51,3,0) +VALUE SCREEN CODE^K^^3;E1,245^K:$L(X)>245 X D:$D(X) ^DIM +"^DD",8989.51,8989.51,3,3) +This is M code placed in DIR("S"). +"^DD",8989.51,8989.51,3,9) +@ +"^DD",8989.51,8989.51,3,21,0) +^^3^3^2960207^ +"^DD",8989.51,8989.51,3,21,1,0) +This field contains M code that is used to screen allowable entries for the +"^DD",8989.51,8989.51,3,21,2,0) +VALUE field in the PARAMETERS file. The code is placed in DIR("S") when +"^DD",8989.51,8989.51,3,21,3,0) +validating the entry. +"^DD",8989.51,8989.51,3,"DT") +2960207 +"^DD",8989.51,8989.51,6.1,0) +INSTANCE DATA TYPE^S^D:date/time;F:free text;N:numeric;S:set of codes;Y:yes/no;P:pointer;^6;1^Q +"^DD",8989.51,8989.51,6.1,3) +Enter the type of data allowed for the INSTANCE field of the parameter. +"^DD",8989.51,8989.51,6.1,21,0) +^^3^3^2960207^ +"^DD",8989.51,8989.51,6.1,21,1,0) +This is the type of data that is contained in the INSTANCE field of the +"^DD",8989.51,8989.51,6.1,21,2,0) +PARAMETERS file, if multiple parameter instances per entity are allowed. +"^DD",8989.51,8989.51,6.1,21,3,0) +This field is used to define a call to the reader. +"^DD",8989.51,8989.51,6.1,"DT") +2960207 +"^DD",8989.51,8989.51,6.2,0) +INSTANCE DOMAIN^F^^6;2^K:$L(X)>100!($L(X)<1) X +"^DD",8989.51,8989.51,6.2,3) +Enter up to 100 characters to further define the data type (used by ^DIR). +"^DD",8989.51,8989.51,6.2,21,0) +^^3^3^2960207^ +"^DD",8989.51,8989.51,6.2,21,1,0) +This may be used to further define the data type for the INSTANCE field of +"^DD",8989.51,8989.51,6.2,21,2,0) +the parameter. The string stored here should be appropriate for the second +"^DD",8989.51,8989.51,6.2,21,3,0) +^-piece of DIR(0) when used with the data type field. +"^DD",8989.51,8989.51,6.2,"DT") +2960207 +"^DD",8989.51,8989.51,6.3,0) +INSTANCE HELP^F^^6;3^K:$L(X)>80!($L(X)<1) X +"^DD",8989.51,8989.51,6.3,3) +Enter a line of help text to be displayed when entering the parameter instance. +"^DD",8989.51,8989.51,6.3,21,0) +^^3^3^2960207^ +"^DD",8989.51,8989.51,6.3,21,1,0) +This field contains a line of help text that is displayed when the user +"^DD",8989.51,8989.51,6.3,21,2,0) +requests help or encounters an error while entering the INSTANCE field of +"^DD",8989.51,8989.51,6.3,21,3,0) +the PARAMETERS file. +"^DD",8989.51,8989.51,6.3,"DT") +2960207 +"^DD",8989.51,8989.51,7,0) +INSTANCE VALIDATION CODE^K^^7;E1,245^K:$L(X)>245 X D:$D(X) ^DIM +"^DD",8989.51,8989.51,7,3) +This is M code used by DIR (3rd piece of DIR(0)). +"^DD",8989.51,8989.51,7,9) +@ +"^DD",8989.51,8989.51,7,21,0) +^^2^2^2960207^ +"^DD",8989.51,8989.51,7,21,1,0) +This field contains M code that is placed in the third piece of DIR(0) when +"^DD",8989.51,8989.51,7,21,2,0) +validating the INSTANCE field in the PARAMETERS file. +"^DD",8989.51,8989.51,7,"DT") +2960207 +"^DD",8989.51,8989.51,8,0) +INSTANCE SCREEN CODE^K^^8;E1,245^K:$L(X)>245 X D:$D(X) ^DIM +"^DD",8989.51,8989.51,8,3) +This is M code placed in DIR("S"). +"^DD",8989.51,8989.51,8,9) +@ +"^DD",8989.51,8989.51,8,21,0) +^^3^3^2960207^ +"^DD",8989.51,8989.51,8,21,1,0) +This field contains M code that is used to screen allowable entries for the +"^DD",8989.51,8989.51,8,21,2,0) +INSTANCE field in the PARAMETERS file. The code is placed in DIR("S") when +"^DD",8989.51,8989.51,8,21,3,0) +validating the entry. +"^DD",8989.51,8989.51,8,"DT") +2960207 +"^DD",8989.51,8989.51,20,0) +DESCRIPTION^8989.512^^20;0 +"^DD",8989.51,8989.51,20,21,0) +^^1^1^2970626^ +"^DD",8989.51,8989.51,20,21,1,0) +A description of the parameter may be entered here. +"^DD",8989.51,8989.51,30,0) +ALLOWABLE ENTITIES^8989.513I^^30;0 +"^DD",8989.51,8989.51,30,21,0) +^^2^2^2960213^^ +"^DD",8989.51,8989.51,30,21,1,0) +This multiple contains a list of entities (pointers to files) for which the +"^DD",8989.51,8989.51,30,21,2,0) +parameter may be validly set. +"^DD",8989.51,8989.512,0) +DESCRIPTION SUB-FIELD^^.01^1 +"^DD",8989.51,8989.512,0,"DT") +2960207 +"^DD",8989.51,8989.512,0,"NM","DESCRIPTION") + +"^DD",8989.51,8989.512,0,"UP") +8989.51 +"^DD",8989.51,8989.512,.01,0) +DESCRIPTION^WL^^0;1^Q +"^DD",8989.51,8989.512,.01,3) +Enter a description of the parameter and how it is used. +"^DD",8989.51,8989.512,.01,21,0) +^^1^1^2960207^ +"^DD",8989.51,8989.512,.01,21,1,0) +This is text that describes the purpose and use of the parameter. +"^DD",8989.51,8989.512,.01,"DT") +2960207 +"^DD",8989.51,8989.513,0) +ALLOWABLE ENTITIES SUB-FIELD^^.02^2 +"^DD",8989.51,8989.513,0,"DT") +2970621 +"^DD",8989.51,8989.513,0,"ID",.02) +S %I=Y,Y=$S('$D(^(0)):"",$D(^DIC(+$P(^(0),U,2),0))#2:$P(^(0),U,1),1:""),C=$P(^DD(1,.01,0),U,2) D Y^DIQ:Y]"" W " ",Y,@("$E("_DIC_"%I,0),0)") S Y=%I K %I +"^DD",8989.51,8989.513,0,"IX","B",8989.513,.01) + +"^DD",8989.51,8989.513,0,"NM","ALLOWABLE ENTITIES") + +"^DD",8989.51,8989.513,0,"UP") +8989.51 +"^DD",8989.51,8989.513,.01,0) +PRECEDENCE^MRNJ6,2^^0;1^K:+X'=X!(X>999.99)!(X<0)!(X?.E1"."3N.N) X +"^DD",8989.51,8989.513,.01,1,0) +^.1 +"^DD",8989.51,8989.513,.01,1,1,0) +8989.513^B +"^DD",8989.51,8989.513,.01,1,1,1) +S ^XTV(8989.51,DA(1),30,"B",$E(X,1,30),DA)="" +"^DD",8989.51,8989.513,.01,1,1,2) +K ^XTV(8989.51,DA(1),30,"B",$E(X,1,30),DA) +"^DD",8989.51,8989.513,.01,3) +Type a Number between 0 and 999.99, 2 Decimal Digits +"^DD",8989.51,8989.513,.01,21,0) +^^6^6^2960213^^^ +"^DD",8989.51,8989.513,.01,21,1,0) +A single parameter may be set for several different types of entities. This +"^DD",8989.51,8989.513,.01,21,2,0) +lists the order in which entities are searched for a defined value. For +"^DD",8989.51,8989.513,.01,21,3,0) +example, if a parameter may be set for a package, a location, and a user, +"^DD",8989.51,8989.513,.01,21,4,0) +and the respective precedents are 3, 2, 1, the value of the user parameter +"^DD",8989.51,8989.513,.01,21,5,0) +would be returned. If it did not exist, the value of the location +"^DD",8989.51,8989.513,.01,21,6,0) +parameter. If that did not exist, then the value of the package parameter. +"^DD",8989.51,8989.513,.01,"DT") +2960213 +"^DD",8989.51,8989.513,.02,0) +ENTITY FILE^RP8989.518'^XTV(8989.518,^0;2^Q +"^DD",8989.51,8989.513,.02,1,0) +^.1 +"^DD",8989.51,8989.513,.02,1,1,0) +8989.51^AG^MUMPS +"^DD",8989.51,8989.513,.02,1,1,1) +D AGS^XPARDD1 +"^DD",8989.51,8989.513,.02,1,1,2) +D AGK^XPARDD1 +"^DD",8989.51,8989.513,.02,1,1,"%D",0) +^^5^5^2980422^ +"^DD",8989.51,8989.513,.02,1,1,"%D",1,0) +The AG x-ref has the format ^XTV(8989.51,PARAM,30,"AG",GLOBAL REF,DA)="". +"^DD",8989.51,8989.513,.02,1,1,"%D",2,0) + +"^DD",8989.51,8989.513,.02,1,1,"%D",3,0) +It is used to screen the parameters that may be selected for a given entity +"^DD",8989.51,8989.513,.02,1,1,"%D",4,0) +in the PARAMETERS file. The global root is used because the entity is a +"^DD",8989.51,8989.513,.02,1,1,"%D",5,0) +variable pointer. +"^DD",8989.51,8989.513,.02,1,1,"DT") +2960207 +"^DD",8989.51,8989.513,.02,3) +Choose a file from which entities for this parameter are identified. +"^DD",8989.51,8989.513,.02,21,0) +^^3^3^2980422^ +"^DD",8989.51,8989.513,.02,21,1,0) +This identifies an entity for which the parameter can be legally entered. +"^DD",8989.51,8989.513,.02,21,2,0) +Entities are simply variable pointers. The files which are eligible to be +"^DD",8989.51,8989.513,.02,21,3,0) +entities are listed in the PARAMETER ENTITY file. +"^DD",8989.51,8989.513,.02,"DT") +2970621 +"^DD",8989.52,8989.52,0) +FIELD^^10^5 +"^DD",8989.52,8989.52,0,"DDA") +N +"^DD",8989.52,8989.52,0,"DT") +2970619 +"^DD",8989.52,8989.52,0,"ID","WRITE") +N X S X=^(0) D EN^DDIOL($P(X,U,2),"","?36") +"^DD",8989.52,8989.52,0,"IX","B",8989.52,.01) + +"^DD",8989.52,8989.52,0,"NM","PARAMETER TEMPLATE") + +"^DD",8989.52,8989.52,0,"VRPK") +XT +"^DD",8989.52,8989.52,.01,0) +NAME^RFX^^0;1^D VALID01^XPARDD2 +"^DD",8989.52,8989.52,.01,1,0) +^.1 +"^DD",8989.52,8989.52,.01,1,1,0) +8989.52^B +"^DD",8989.52,8989.52,.01,1,1,1) +S ^XTV(8989.52,"B",$E(X,1,30),DA)="" +"^DD",8989.52,8989.52,.01,1,1,2) +K ^XTV(8989.52,"B",$E(X,1,30),DA) +"^DD",8989.52,8989.52,.01,3) +Name must be 3-30 characters, unique, and namespaced. +"^DD",8989.52,8989.52,.01,21,0) +^^2^2^2980705^ +"^DD",8989.52,8989.52,.01,21,1,0) +This field contains the name of the parameter template. The template +"^DD",8989.52,8989.52,.01,21,2,0) +names must be namespaced. +"^DD",8989.52,8989.52,.01,"DT") +2970318 +"^DD",8989.52,8989.52,.02,0) +DISPLAY TEXT^F^^0;2^K:$L(X)>30!($L(X)<3) X +"^DD",8989.52,8989.52,.02,3) +Answer must be 3-30 characters in length. +"^DD",8989.52,8989.52,.02,12) +Only files defined as variable pointers in PARAMETERS (8989.5) are allowed. +"^DD",8989.52,8989.52,.02,12.1) +S DIC("S")="I $$ALLOW^XPARDD1(Y)" +"^DD",8989.52,8989.52,.02,21,0) +^^1^1^2970606^^^ +"^DD",8989.52,8989.52,.02,21,1,0) +This is the display name (non-namespaced) for the template. +"^DD",8989.52,8989.52,.02,"DT") +2970318 +"^DD",8989.52,8989.52,.03,0) +USE ENTITY FROM^*P1'^DIC(^0;3^S DIC("S")="I $$ALLOW^XPARDD1(Y)" D ^DIC K DIC S DIC=DIE,X=+Y K:Y<0 X +"^DD",8989.52,8989.52,.03,3) +Choose the file which identifies the entity for which parameters will be entered. +"^DD",8989.52,8989.52,.03,12) +Only files defined as variable pointer in PARAMETERS (8989.5) are allowed. +"^DD",8989.52,8989.52,.03,12.1) +S DIC("S")="I $$ALLOW^XPARDD1(Y)" +"^DD",8989.52,8989.52,.03,21,0) +^^2^2^2970318^ +"^DD",8989.52,8989.52,.03,21,1,0) +This identifies the file from which an entity will be selected. The +"^DD",8989.52,8989.52,.03,21,2,0) +parameters in this template will apply to that entity. +"^DD",8989.52,8989.52,.03,"DT") +2970318 +"^DD",8989.52,8989.52,.04,0) +USE INSTANCE FROM^P8989.51'^XTV(8989.51,^0;4^Q +"^DD",8989.52,8989.52,.04,3) +The parameter identified here will be used to prompt for an instance which will be used for the multiple parameters in the template. +"^DD",8989.52,8989.52,.04,21,0) +^^3^3^2970619^ +"^DD",8989.52,8989.52,.04,21,1,0) +This allows a parameter to be chosen which will be used to prompt for an +"^DD",8989.52,8989.52,.04,21,2,0) +instance value. This instance value will be used for all other parameters +"^DD",8989.52,8989.52,.04,21,3,0) +in the template that are a multiple type. +"^DD",8989.52,8989.52,.04,"DT") +2970619 +"^DD",8989.52,8989.52,10,0) +PARAMETERS^8989.521IA^^10;0 +"^DD",8989.52,8989.52,10,21,0) +^^1^1^2970317^ +"^DD",8989.52,8989.52,10,21,1,0) +This lists the parameters that make up the template. +"^DD",8989.52,8989.521,0) +PARAMETERS SUB-FIELD^^.02^2 +"^DD",8989.52,8989.521,0,"DT") +2970317 +"^DD",8989.52,8989.521,0,"ID","WRITE") +N X S X=^(0) I $P(X,U,2) D EN^DDIOL($P(^XTV(8989.51,+$P(X,U,2),0),U),"","?10") +"^DD",8989.52,8989.521,0,"IX","B",8989.521,.01) + +"^DD",8989.52,8989.521,0,"NM","PARAMETERS") + +"^DD",8989.52,8989.521,0,"UP") +8989.52 +"^DD",8989.52,8989.521,.01,0) +SEQUENCE^MNJ7,3^^0;1^K:+X'=X!(X>999)!(X<1)!(X?.E1"."4N.N) X +"^DD",8989.52,8989.521,.01,1,0) +^.1 +"^DD",8989.52,8989.521,.01,1,1,0) +8989.521^B +"^DD",8989.52,8989.521,.01,1,1,1) +S ^XTV(8989.52,DA(1),10,"B",$E(X,1,30),DA)="" +"^DD",8989.52,8989.521,.01,1,1,2) +K ^XTV(8989.52,DA(1),10,"B",$E(X,1,30),DA) +"^DD",8989.52,8989.521,.01,3) +Type a Number between 1 and 999, 3 Decimal Digits +"^DD",8989.52,8989.521,.01,21,0) +^^2^2^2970317^ +"^DD",8989.52,8989.521,.01,21,1,0) +This is the sequence in which the value(s) for this parameter should be +"^DD",8989.52,8989.521,.01,21,2,0) +prompted. +"^DD",8989.52,8989.521,.01,"DT") +2970317 +"^DD",8989.52,8989.521,.02,0) +PARAMETER^P8989.51'^XTV(8989.51,^0;2^Q +"^DD",8989.52,8989.521,.02,3) +Enter the parameter that should be prompted at this sequence number. +"^DD",8989.52,8989.521,.02,21,0) +^^2^2^2970317^ +"^DD",8989.52,8989.521,.02,21,1,0) +This points to the parameter that should be prompted for at this sequence +"^DD",8989.52,8989.521,.02,21,2,0) +in the template. +"^DD",8989.52,8989.521,.02,"DT") +2970317 +"^DIC",8989.51,8989.51,0) +PARAMETER DEFINITION^8989.51 +"^DIC",8989.51,8989.51,0,"GL") +^XTV(8989.51, +"^DIC",8989.51,8989.51,"%D",0) +^^3^3^2980920^ +"^DIC",8989.51,8989.51,"%D",1,0) +This file contains the characteristics of parameters. Entries in this +"^DIC",8989.51,8989.51,"%D",2,0) +file must be namespaced and they are exported by the package which owns +"^DIC",8989.51,8989.51,"%D",3,0) +them. +"^DIC",8989.51,"B","PARAMETER DEFINITION",8989.51) + +"^DIC",8989.52,8989.52,0) +PARAMETER TEMPLATE^8989.52 +"^DIC",8989.52,8989.52,0,"GL") +^XTV(8989.52, +"^DIC",8989.52,8989.52,"%",0) +^1.005^^0 +"^DIC",8989.52,8989.52,"%D",0) +^^4^4^2980920^ +"^DIC",8989.52,8989.52,"%D",1,0) +This file contains templates which allow developers to group entries in +"^DIC",8989.52,8989.52,"%D",2,0) +the PARAMETER DEFINITION file (#8989.51) together for editing. Entries in +"^DIC",8989.52,8989.52,"%D",3,0) +this file must be namespaced and they are exported by the package which +"^DIC",8989.52,8989.52,"%D",4,0) +owns them. +"^DIC",8989.52,"B","PARAMETER TEMPLATE",8989.52) + +**END** +**END** diff --git a/p/CWMACPPI.m b/p/CWMACPPI.m new file mode 100644 index 0000000..7e4c266 --- /dev/null +++ b/p/CWMACPPI.m @@ -0,0 +1,35 @@ +CWMACPPI ;RVAMC/PLS - Convert Personal Preferences to Parameters Utility;26-Aug-1999 12:44;PS + ;;2.1;CWMA GuiMail;;Jan 06, 1999 + ;Call EN to convert Personal Preferences from File 890 + ;to the Kernel Toolkit Parameter File. +EN ;entry point + N CWLP,CWCNT,DTOUT,DUOUT,DIR,X,Y + ;check for existing CWMAIL1 global containing preferences + I '$D(^CWMAIL1) D BMES^XPDUTL("CWMAIL1 Global doesn't exist! Conversion of preferences not needed.") Q + S (CWCNT,CWLP)=0 F S CWLP=$O(^CWMAIL1(CWLP)) Q:CWLP<1 D + . I $D(^CWMAIL1(CWLP,1,1,0)) S CWCNT=CWCNT+1 + D BMES^XPDUTL("There are "_CWCNT_" user(s) to convert") + D UPDATE^XPDID(0) ;init progress bar + D MES^XPDUTL("Beginning conversion of preferences...") + D LOOP + Q +LOOP ;loop thru users + N CWUSR,CWLP,CWTXT,CWVAL,CWPREF,CWCNTC,XPDIDTOT + S CWUSR=0 + S XPDIDTOT=CWCNT ;set total number + F S CWUSR=$O(^CWMAIL1(CWUSR)) Q:CWUSR<1 D + . S CWCNTC=+$G(CWCNTC)+1 + . I CWCNTC#10=0 D UPDATE^XPDID(CWCNTC) + . S CWPREF=$O(^CWMAIL1(CWUSR,1,"B","PREFERENCES",0)) ;get node + . Q:'CWPREF ;no preferences stored + . S CWLP=0 F S CWLP=$O(^CWMAIL1(CWUSR,1,CWPREF,1,CWLP)) Q:CWLP<1 D + . . S CWTXT=^CWMAIL1(CWUSR,1,CWPREF,1,CWLP,0) ;get node text + . . I CWTXT'?1"[".E1"]" D + . . . S CWPRM=$$GETPRM^CWMAILE($P(CWTXT,"=")) ;get parameter + . . . I $L(CWPRM) D + . . . . S CWVAL=$$STRIP^XLFSTR($P(CWTXT,"=",2)," ") ;get value + . . . . I CWPRM="1|CWMA GENERAL MD COL" D + . . . . . S CWVAL=CWVAL_$S($E(CWVAL,$L(CWVAL))=";":"6,38",1:";6,38") ;add data for new column + . . . . S CWERR=$$SETPARM^CWMAILD(CWUSR,CWPRM,CWVAL) ;set value into parameter + D BMES^XPDUTL("Preference conversion is finished.") + Q diff --git a/p/CWMAIL.m b/p/CWMAIL.m new file mode 100644 index 0000000..872a186 --- /dev/null +++ b/p/CWMAIL.m @@ -0,0 +1,134 @@ +CWMAIL ;INDPLS/PLS- DELPHI VISTA MAIL SERVER ;16-Sep-1999 07:47;PS + ;;2.1;CWMA GuiMail;;Jan 06, 1999 + Q ;ROUTINE CAN'T BE CALLED DIRECTLY +ENTRY(CWDATA,CWINPUT,CWTEXT) ;CALL WITH CWINPUT=CALL;DUZ;MSG;BASKET;NEW BASKET;NEWMAIL, TEXT=TEXT ARRAY + N CWCALL,X,DUZ,CWMHDR,CWMST,U,CWSVER + ;REMOVED XMDUZ FROM BEING NEW STATEMENT + I $$NEWERR^%ZTER N $ET S $ET="" + S U="^" + S $ZT="ERR^CWMAIL" + K CWDATA + S CWDATA(1)="0^^AN ERROR HAS OCCURRED" + S CWCALL="%"_$$UP^XLFSTR($P(CWINPUT,";")) ;HOLDS TAG + S DUZ=$P(CWINPUT,";",2) + D DUZ^XUP(DUZ) ;SETUP DUZ ARRAY + D INIT^XMVVITAE ;UPDATE MAILMAN STATUS + S CWINPUT=$P(CWINPUT,";",3,999) + D PURGNAM + I CWCALL?1"%"1.7A,$T(@CWCALL)'="" D @(CWCALL_"(.CWDATA,CWINPUT,.CWTEXT)") + Q +ERR D @^%ZOSF("ERRTN") + D RETGNAM + Q ; +%READ(CWDATA,CWINPUT,CWTEXT) ; + D %READ^CWMAILA(.CWDATA,CWINPUT) + Q +%LIST(CWDATA,CWINPUT,CWTEXT) ; + ;CWINPUT = MAIL TYPE OR MAILBOX NUMBER; + D %LIST^CWMAILA(.CWDATA,CWINPUT),RETGNAM + Q +%DELETE(CWDATA,CWINPUT,CWTEXT) ; + D %DELETE^CWMAILA(.CWDATA,CWINPUT),RETGNAM + Q +%SAVE(CWDATA,CWINPUT,CWTEXT) ; + D %SAVE^CWMAILA(.CWDATA,CWINPUT),RETGNAM + Q +%MAKNEW(CWDATA,CWINPUT,CWTEXT) ; + D %MAKNEW^CWMAILA(.CWDATA,CWINPUT),RETGNAM + Q +%NEWBSK(CWDATA,CWINPUT,CWTEXT) ;CREATE A NEW MAIL BASKET + D %NEWBSK^CWMAILA(.CWDATA,CWINPUT),RETGNAM + Q +%RESEQ(CWDATA,CWINPUT,CWTEXT) ;RESEQUENCE A VISTA MAIL BASKET + D %RESEQ^CWMAILA(.CWDATA,CWINPUT),RETGNAM + Q +%REPLY(CWDATA,CWINPUT,CWTEXT) ; + D %REPLY^CWMAILB(.CWDATA,CWINPUT,.CWTEXT),RETGNAM + Q +%FORWARD(CWDATA,CWINPUT,CWTEXT) ; + ;M ^TMP("CWMAIL","FORWARD",$H)=CWTEXT + ;S ^TMP("CWMAIL","CWINPUT",$J)=CWINPUT + D %FORWARD^CWMAILB(.CWDATA,CWINPUT,.CWTEXT),RETGNAM + Q +%ANSWER(CWDATA,CWINPUT,CWTEXT) ; + D %ANSWER^CWMAILB(.CWDATA,CWINPUT,.CWTEXT),RETGNAM + Q +%TERMIN(CWDATA,CWINPUT,CWTEXT) ;TERMINATE A MESSAGE THREAD + D %TERMIN^CWMAILB(.CWDATA,CWINPUT),RETGNAM + Q +%CREATE(CWDATA,CWINPUT,CWTEXT) ;CREATE A NEW MESSAGE + D %CREATE^CWMAIL2(.CWDATA,CWINPUT,.CWTEXT),RETGNAM + Q +%LATER(CWDATA,CWINPUT,CWTEXT) ;LATER A MESSAGE + D %LATER^CWMAILC(.CWDATA,CWINPUT),RETGNAM + Q + ; +%MBOX(CWDATA,CWINPUT,CWTEXT) ;RETRIEVE MAILBOXES + D %MBOX^CWMAILC(.CWDATA,CWINPUT),RETGNAM + Q +%PMBOX(CWDATA,CWINPUT,CWTEXT) ;PURGE ENTIRE MAIL BOX + D %PMBOX^CWMAILC(.CWDATA,CWINPUT),RETGNAM + Q +%RNMBOX(CWDATA,CWINPUT,CWTEXT) ;RENAME EXISTING MAILBOX + D %RNMBOX^CWMAILC(.CWDATA,CWINPUT),RETGNAM + Q +%MSGRCP(CWDATA,CWINPUT,CWTEXT) ; RETURNS A LIST OF MESSAGE RECIPIENTS + D %MSGRCP^CWMAILC(.CWDATA,CWINPUT) ;,RETGNAM + Q +%NETINFO(CWDATA,CWINPUT,CWTEXT) ; RETURNS NETWORK TRANSMISSION INFO + D %NETINFO^CWMAILC(.CWDATA,CWINPUT) ;,RETGNAM + Q +%ADRSTO(CWDATA,CWINPUT,CWTEXT) ;RETURNS ARRAY OF ADDRESSED TO + D %ADRSTO^CWMAILC(.CWDATA,CWINPUT) ;,RETGNAM + Q +%GRPINF(CWDATA,CWINPUT,CWTEXT) ;MAIL GROUP INFO + D %GRPINF^CWMAILC(.CWDATA,CWINPUT),RETGNAM + Q +%USRINF(CWDATA,CWINPUT,CWTEXT) ; MAIL USER INFO + ;CWINPUT = MAIL USER IEN + D %USRINF^CWMAILC(.CWDATA,CWINPUT),RETGNAM + Q +%PERPREF(CWDATA,CWINPUT,CWTEXT) ;RETRIEVE PERSONAL PREFERENCES + ;CWINPUT = MAIL USER IEN;SAVE NAME + D %PERPREF^CWMAILD(.CWDATA,CWINPUT),RETGNAM + Q +%USRLOG(CWDATA,CWINPUT,CWTEXT) ;LOG USER INTO GUI MAIL LOG + ;CWINPUT = DUZ + D %USRLOG^CWMAILD(.CWDATA,DUZ),RETGNAM + Q +%BMSGD(CWDATA,CWINPUT,CWTEXT) ;BUILD MSG INFO INTO GLOBAL + ; + D %BMSGD^CWMAILD(.CWDATA,CWINPUT,.CWTEXT),RETGNAM + Q +%SUPREF(CWDATA,CWINPUT,CWTEXT) ;SET USER PREFERENCES + ; + D %SUPREF^CWMAILD(.CWDATA,CWINPUT,.CWTEXT),RETGNAM + Q +RETGNAM ;RETURNS A $NAME FOR GLOBAL AFTER MERGING + M ^TMP($J,"CWMAIL")=CWDATA + K CWDATA S CWDATA=$NA(^TMP($J,"CWMAIL")) + Q +PURGNAM ;PURGE GLOBAL ARRAY USED FOR DATA RETURN + K ^TMP($J,"CWMAIL") + Q +%CHKMAIL(CWDATA,CWINPUT,CWTEXT) ;CHECK FOR NEW MAIL + ;CWINPUT = DUZ + D %CHKMAIL^CWMAILD(.CWDATA,DUZ),RETGNAM + Q +%PRINT(CWDATA,CWINPUT,CWTEXT) ;PRINT A MESSAGE + ; + D %PRTMSG^CWMAILD(.CWDATA,CWINPUT),RETGNAM + Q +%GETSVER(CWDATA,CWINPUT,CWTEXT) ;GET SERVER VERSION + ; + D %GETSVER^CWMAILD(.CWDATA,CWINPUT),RETGNAM + Q +%MSGSRC(CWDATA,CWINPUT,CWTEXT) ;SEARCH AND RETURN SELECTED MESSAGES + ; + D %MSGSRC^CWMAILA(.CWDATA,CWINPUT,.CWTEXT),RETGNAM + Q +%MSGISRC(CWDATA,CWINPUT,CWTEXT) ;SEARCH FOR A SPECIFIC MESSAGE NUMBER + ; + D %MSGISRC^CWMAILF(.CWDATA,CWINPUT),RETGNAM + Q + ; diff --git a/p/CWMAIL0.m b/p/CWMAIL0.m new file mode 100644 index 0000000..a0be4f2 --- /dev/null +++ b/p/CWMAIL0.m @@ -0,0 +1,87 @@ +CWMAIL0 ;INDPLS/PLS- DELPHI MAIL SERVER, CONT'D ;04-Jun-1999 14:54;PS + ;;2.1;CWMA GuiMail;;Jan 06, 1999 + Q ;ROUTINE CAN'T BE CALLED DIRECTLY + ; +PROCMS(CWDATA,CWMSGN,CWNMFLG) ;PROCESS MAIL MESSAGE THREAD + N CWRE,CWCNT,CWRSP,CWNWMSG,CWDATT,CWLCNT,CWLP,CWCONFRM,CW + N CWIM,CWIU,CWINSTR,CWFLAGS,CWIR + D INMSG^XMXUTIL2(XMDUZ,$$BSKT^XMXUTIL2(XMDUZ,CWMSGN),CWMSGN,,"F",.CWIM,.CWINSTR,.CWIU) ;SET-UP MESSAGE INFO + S CWDATA=$NA(^TMP($J,"CWMAIL")) + S CWNWMSG=$G(CWIM("FROM"))["@" ;NETWORK MESSAGE + S CWCNT=2,CWLCNT=0 + S @CWDATA@(CWCNT)="Mail Message From: "_$G(CWIM("FROM NAME"))_" "_"Dated: "_$$FMDTE^CWMAIL4(CWIM("DATE FM"),"5MZ") + S CWCNT=$$INCNT(CWCNT),@CWDATA@(CWCNT)="Subject: "_$G(CWIM("SUBJ")) + S CWCNT=$$INCNT(CWCNT),@CWDATA@(CWCNT)="" + ;I 'CWNMFLG!(CWNMFLG&($G(CWIM("RESP"))<1))!(CWNMFLG&(+$G(CWIM("RESP"))=+$G(CWIM("RESPS")))) + I 'CWNMFLG!(CWNMFLG&(+$G(CWIU("RESP"))<1))!(CWNMFLG&(+$G(CWIU("RESP"))=+$G(CWIM("RESPS")))) D READM(.CWDATA,CWMSGN,.CWCNT) + S CWCONFRM="" + D LASTACC(CWMSGN,$$BSKT^XMXUTIL2(XMDUZ,CWMSGN),0,.CWCONFRM) ;UPDATE LAST ACCESS DATE/TIME + ;PROCESS RESPONSES + I $G(CWIM("RESPS"))>0 D + . S CWLP=$S(+$G(CWIU("RESP"))=+$G(CWIM("RESPS")):1,+$G(CWIU("RESP"))<1:1,CWNMFLG:+$G(CWIU("RESP")),1:1) F CWLP=CWLP:1:CWIM("RESPS") D + . . D INRESP^XMXUTIL2(CWMSGN,CWLP,"F",.CWIR) ;gather details on specific response + . . S CWCNT=$$INCNT(CWCNT),@CWDATA@(CWCNT)="" + . . S CWCNT=$$INCNT(CWCNT),@CWDATA@(CWCNT)="Response: "_CWLP_") "_$G(CWIR("FROM NAME"))_" "_$$FMDTE^CWMAIL4($G(CWIR("DATE FM")),"5MZ") + . . S CWCNT=$$INCNT(CWCNT),@CWDATA@(CWCNT)="" + . . D READM(.CWDATA,CWIR("XMZ"),.CWCNT) + . . D LASTACC(CWMSGN,$$BSKT^XMXUTIL2(XMDUZ,CWMSGN),CWLP) ;UPDATES LAST RESPONSE READ + D NONEW^XMXUTIL(XMDUZ,$$BSKT^XMXUTIL2(XMDUZ,CWMSGN),CWMSGN,1) ;UNNEW MESSAGE + I +CWCONFRM D ;SEND CONFIRMATION IF NEEDED + . S CWCNT=$$INCNT(CWCNT),@CWDATA@(CWCNT)="" + . S CWCNT=$$INCNT(CWCNT),@CWDATA@(CWCNT)=">>Confirmation Message Sent to Sender.<<" + I $O(@CWDATA@(1)) D + . S @CWDATA@(1)="1^^DATA HAS BEEN FOUND" + E S @CWDATA@(1)="1^^Message text could not be found." + S $P(@CWDATA@(1),U,2)=CWCNT-2 + Q + ; +LASTACC(XMZ,CWBIEN,CWLRSP,XMCONFRM) ;UPDATE LAST RESPONSE READ DATE + ;INPUT XMZ = MESSAGE NUMBER + ; CWBIEN = BASKET IEN + ; CWLRSP = LAST RESPONSE READ + ; + N CWIM,CWIU,CWINSTR,CWXINSTR,CWFLAGS + D INMSG1^XMXUTIL2(XMDUZ,XMZ,,.CWFLAGS,.CWIM,.CWIU) ;SET-UP FOR CALL + D INMSG2^XMXUTIL2(XMDUZ,XMZ,,.CWIM,.CWXINSTR,.CWIU) + S CWINSTR("FLAGS")=$S($G(CWXINSTR("FLAGS"))["R":"R",1:"") + D LASTACC^XMXUTIL(XMDUZ,CWBIEN,XMZ,CWLRSP,.CWIM,.CWINSTR,.CWIU,.XMCONFRM) + Q + ; +READM(CWDATA,CWINPUT,CWCNT) ;OUTPUT MAIL MESSAGE IN ARRAY + S $ZT="READMER^CWMAIL" + N CWRDATA,XMZ,CWMTYPE,CWTFLG,XMER,XMPOS + S XMZ=+$G(CWINPUT),CWTFLG=0,CWMTYPE=$G(CWINSTR("TYPE")) + F S CWRDATA=$$READ^XMGAPI1() Q:XMER<0!(CWTFLG) S CWCNT=CWCNT+1,@CWDATA@(CWCNT)=CWRDATA I CWMTYPE="K"!(CWMTYPE="X") S:CWRDATA["$END TXT" CWTFLG=1 + ; +READMER Q + ; +INCNT(CWCNT) ;INCREMENT COUNTER + Q CWCNT+1 + ; +ADDMP(CWXMZ,CWVAL) ;set data into DAT based on subscripted CWVAL + ;INPUT - CWXMZ = message ien + ; CWVAL = input array (i.e. CWVAL(1)=first piece...CWVAL(n)=last piece + ;OUTPUT - data string holding delimited ('^') data + S CWXMZ=$G(CWXMZ,0) + I +$G(CWXMZ) D + . N X,CWCONFRM,CWTYPE,CWCLOSED,CWINFO,CWCONFID,CWSDRDUZ,CWBRDCAS,CWSDRNAM,CWTRECPT,CWTREPLY + . N CWIM,CWIU,CWINSTR,CWPMSG,CWLP,CWDAT + . D INMSG^XMXUTIL2(XMDUZ,$$BSKT^XMXUTIL2(XMDUZ,CWXMZ),CWXMZ,,"F",.CWIM,.CWINSTR,.CWIU) ;SET-UP MESSAGE INFO + . S CWVAL(6)=$$UP^XLFSTR($G(CWINSTR("TYPE"))) ;message type(s) + . S:$G(CWINSTR("FLAGS"))["P" CWVAL(6)="P"_CWVAL(6) ;add priority flag as a type + . S CWVAL(7)=$G(CWINSTR("FLAGS"))["R" ;confirmation flag + . S CWVAL(8)=$G(CWINSTR("FLAGS"))["X" ;closed flag + . S CWVAL(9)=$G(CWINSTR("FLAGS"))["I" ;informational flag + . S CWVAL(10)=$G(CWINSTR("FLAGS"))["C" ;confidential flag + . S CWVAL(11)=$G(CWIM("FROM DUZ")) ;sender ien + . S CWVAL(13)=$G(CWIM("FROM NAME")) ;sender full name + . S CWVAL(12)=$$BCAST^XMXSEC(CWXMZ) ;broadcast flag + . S CWVAL(14)=$G(CWIM("RECIPS")) ;total # of recipients + . S CWVAL(15)=$G(CWIM("RESPS")) ;total # of replies + . S CWVAL(16)=$G(CWINSTR("FLAGS"))["P" ;priority flag + . S CWVAL(17)=+$G(CWIU("RESP")) ;# of last response read + . S CWVAL(20)=+$$ANSWER^XMXSEC(XMDUZ,CWXMZ,$$ZNODE^XMXUTIL2(CWXMZ)) ;can user answer message + ;set data into node + S CWLP="" F S CWLP=$O(CWVAL(CWLP)) Q:CWLP<1 D + . S $P(CWDAT,U,CWLP)=CWVAL(CWLP) + Q CWDAT diff --git a/p/CWMAIL1.m b/p/CWMAIL1.m new file mode 100644 index 0000000..bc72711 --- /dev/null +++ b/p/CWMAIL1.m @@ -0,0 +1,80 @@ +CWMAIL1 ;INDPLS/PLS- GUI MAIL UTILITIES ;30-Jul-1999 09:30;PS + ;;2.1;CWMA GuiMail;;Jan 06, 1999 + ;MODIFIED FOR XM*7.1*50 +LATER(CWXMZ,CWXMA) ;LATER A MESSAGE + S $ZT="LATERE^CWMAIL1" + N CWFLG,X,Y,%H,NOW,CWINSTR,CWXMMSG,CWTMDF + S CWFLG=0 + G:'CWXMZ!('$G(CWXMA)) LATERE + ;S CWTMDF=$G(^XMB("TIMEDIFF")) ;get time diff for site + ;I CWXMA[":" D + ;. I '$L(CWTMDF) S CWXMA=$P(CWXMA," ") ;use date and not date/time + ;. E S CWXMA=CWXMA_" "_CWTMDF ;append time zone diff + S CWXMA=$$CONVERT^XMXUTIL1(CWXMA,$S(CWXMA[":":1,1:0)) ;convert to fileman date/time +CK S NOW=$$NOW^XLFDT S CWXMA=$S(CWXMA>NOW:CWXMA,1:(NOW+.0010)) ;DEFAULT TO 10 MINUTES IN FUTURE + I CWXMA>0 D + . S CWINSTR("LATER")=CWXMA + . D LATERMSG^XMXAPI(XMDUZ,"",CWXMZ,.CWINSTR,.CWXMMSG) + . I CWXMMSG S CWFLG=1 +LATERE ; + Q CWFLG + ; + ; +NETINFO(CWDAT,XMZ) ;RETRIEVE NETWORK TRANMISSION INFORMATION + ; + K CWDAT + S CWDAT=$NA(^TMP($J,"CWMAIL")) + S $ZT="NETINFOE^CWMAIL1" + N CWLP,CWCNT + S CWLP=0,CWCNT=2 + D QN^XMXUTIL3(XMZ,,,) ;DEFAULTS TO ALL LINES;START AT 0 AND SET TO ^TMP("XMLIST",$J) + F S CWLP=$O(^TMP("XMLIST",$J,CWLP)) Q:CWLP<1 D + . S @CWDAT@(CWCNT)=^TMP("XMLIST",$J,CWLP),CWCNT=CWCNT+1 +NETINFOE ; + I $O(@CWDAT@(1)) D + . S @CWDAT@(1)="1^^DATA HAS BEEN FOUND" + E S @CWDAT@(1)="1^^There was no Transmission Information available." + S $P(@CWDAT@(1),U,2)=CWCNT-2 + Q + ; +ADRSTO(CWDAT,XMZ) ;RETRIEVE ADDRESSED TO INFO + ; + K CWDAT + S CWDAT=$NA(^TMP($J,"CWMAIL")) + N CWLP,CWCNT + S CWLP=0,CWCNT=2 + D Q^XMXUTIL3(XMZ) ;DEFAULTS TO ALL LINES;START AT 0 AND SET TO ^TMP("XMLIST",$J) + F S CWLP=$O(^TMP("XMLIST",$J,CWLP)) Q:CWLP<1 D + . S @CWDAT@(CWCNT)=$G(^TMP("XMLIST",$J,CWLP,"TO NAME")),CWCNT=CWCNT+1 + I $O(@CWDAT@(1)) D + . S @CWDAT@(1)="1^^DATA HAS BEEN FOUND" + E S @CWDAT@(1)="1^^There was no ADDRESSED TO recipients found." + S $P(@CWDAT@(1),U,2)=CWCNT-2 +ADRSTOE Q + ; +RECPT(CWDAT,XMZ) ;BUILD RECIPIENT LIST + K CWDAT + S CWDAT=$NA(^TMP($J,"CWMAIL")) + N CWLP,CWCNT,CWIM,CWIU,CWINSTR + N CWRECPT,CWLR,CWLRSPRD,CWFR,CWFWD,CWTERM,CWRMI,CWNTT,CWSNT + S CWLP=0,CWCNT=2 + D QD^XMXUTIL3(XMZ) ; + F S CWLP=$O(^TMP("XMLIST",$J,CWLP)) Q:CWLP<1 D + . S CWRECPT=$G(^TMP("XMLIST",$J,CWLP,"TO NAME")) ;recipient name + . S CWLR=$$FMDTE^CWMAIL4($G(^("LREAD")),"5MZ") ;last read date/time + . S CWLRSPRD=$G(^("RESP")) ;last response read + . S CWFR=$$FMDTE^CWMAIL4($G(^("FREAD")),"5MZ") ;first read date/time + . S CWFWD=$S($D(^("FWD ON")):"*",1:"") ;forwarded message + . S CWTERM=$S($D(^("TERM")):"*",1:"") ;terminated message + . S CWRMI=$G(^("ID")) ;remote message id + . S CWNTT=$G(^("SECS")) ;network trans time + . S CWSNT=$$FMDTE^CWMAIL4($G(^("XDATE")),"5MZ") ;network sent date/time + . S @CWDAT@(CWCNT)=U_CWRECPT_U_CWLR_U_CWFR_U_CWFWD_U_CWTERM_U_CWRMI_U_CWNTT_U_CWSNT_U_CWLRSPRD_U + . S CWCNT=CWCNT+1 + D INMSG1^XMXUTIL2(XMDUZ,XMZ,,"F",.CWIM,.CWIU) ;retrieve total recipients + D INMSG2^XMXUTIL2(XMDUZ,XMZ,,.CWIM,.CWINSTR,.CWIU) ;and responses. +RECPTE I $O(@CWDAT@(1)) D + . S @CWDAT@(1)="1^^DATA HAS BEEN FOUND"_U_+$G(CWIM("RECIPS"))_U_+$G(CWIM("RESPS")) + E S @CWDAT@(1)="1^^There were no recipients found."_U_0_U_0 + S $P(@CWDAT@(1),U,2)=CWCNT-2 + Q diff --git a/p/CWMAIL2.m b/p/CWMAIL2.m new file mode 100644 index 0000000..6c004f7 --- /dev/null +++ b/p/CWMAIL2.m @@ -0,0 +1,117 @@ +CWMAIL2 ;INDPLS/PLS- DELPHI VISTA MAIL SERVER, CONT'D ;20-Sep-1999 08:00;PS + ;;2.1;CWMA GuiMail;;Jan 06, 1999 + ;Input - CWINPUT : 1 - Subject + ; : 2 - Flags + ; : 3 - Attachment Flag + ; + Q ;ROUTINE CAN'T BE CALLED DIRECTLY +%CREATE(CWDATA,CWINPUT,CWTEXT) ;CREATE A NEW MESSAGE + N CWSDATA,CWSEDATA,CWLP,CWTXTARY,DA,DIE,DR,Y,XMTEXT,CWMSGABS,CWTMP,CWFILE,CWIEN,CWNAM + N XMBODY,XMSUBJ,XMY,XMINSTR,XMZ + S CWDATA(1)="0^99- UNDEFINED ERROR" + ;INPUT CONTAINS SUBJECT;PARAMETER ARRAY (IE. TESTING API;PCSI + ;P=PRIORITY, X=CLOSED, C=CONFIDENTIAL, I=INFORMATIONAL, R=CONFIRMATION + ;TEXT ARRAY CONTAINS RECIPIENT LIST AND MESSAGE TEXT LOADED FROM BMSGD call + ;BUILD XMY ARRAY + S CWTEXT=$NA(^TMP($J,"CWMAILLOAD")) + S CWSDATA=$G(@CWTEXT@(-9902),"[START XMY]"),CWSEDATA=$G(@CWTEXT@(-9903),"[END XMY]") + S CWLP=-1 D GFNDLP^CWMAILB(.CWLP,CWSDATA) + I $G(CWLP)="" S CWDATA(1)="0^1- NO RECIPIENTS LISTED" G CRTEND + ;RETRIEVE RECIPIENTS + F S CWLP=$O(@CWTEXT@(CWLP)) Q:CWLP="" Q:@CWTEXT@(CWLP)=CWSEDATA D + .S CWTMP=$G(@CWTEXT@(CWLP)) Q:CWTMP="" + .S CWFILE=+$P(CWTMP,"^"),CWIEN=+$P(CWTMP,"^",2),CWNAM=$P(CWTMP,"^",3) + .I CWFILE=200 S XMY(CWIEN)="" + .E I CWFILE=3.8 S XMY("G."_CWNAM)="" + .E S XMY(CWNAM)="" + I '$D(XMY) S CWDATA(1)="0^1- NO RECIPIENTS LISTED" G CRTEND ; NO RECIPIENTS LISTED + ;BUILD MESSAGE @TEXT@ ARRAY + S CWSDATA=$G(@CWTEXT@(-9900),"[START DATA]"),CWSEDATA=$G(@CWTEXT@(-9901),"[END DATA]") + S CWLP=-1 D GFNDLP^CWMAILB(.CWLP,CWSDATA) + I $G(CWLP)="" S CWDATA(1)="0^3- NO MESSAGE TEXT" G CRTEND + F S CWLP=$O(@CWTEXT@(CWLP)) Q:CWLP="" Q:@CWTEXT@(CWLP)=CWSEDATA D + .S ^TMP($J,"CWMAILOUT",CWLP)=$G(@CWTEXT@(CWLP)) + I '$D(^TMP($J,"CWMAILOUT")) S CWDATA(1)="0^3- NO MESSAGE TEXT" G CRTEND ;NO MESSAGE @CWTEXT@ + ;I '$L($P($G(CWINPUT),";")) S CWDATA(1)="0^4- MESSAGE SUBJECT NOT GIVEN" G CRTEND + ;E + S XMSUBJ=$P($G(CWINPUT),";") + ;subject can be null or between 3-65 characters. Length is handled on client side. + I $L(XMSUBJ),$L(XMSUBJ)<3 S XMSUBJ=XMSUBJ_$E("__",1,3-$L(XMSUBJ)) + ;PROCESS MESSAGE + S XMBODY=$NA(^TMP($J,"CWMAILOUT")) + D CNVTAB(XMBODY) ;convert tabs to spaces + S XMINSTR("FLAGS")=$P(CWINPUT,";",2) ;GET MESSAGE ATTRIBUTES + I '$P($G(CWINPUT),";",3) D + . D SENDMSG^XMXAPI(XMDUZ,XMSUBJ,XMBODY,.XMY,.XMINSTR,.XMZ) + E D + . D CRE8XMZ^XMXAPI(XMSUBJ,.XMZ) ;create message stub + . I +$G(XMZ) D + . . D TEXT^XMXEDIT(XMZ,XMBODY) ;stuff message text + . . D BLDNETI(XMZ,XMSUBJ) ;stuff network header information + . . D ADDRNSND^XMXAPI(XMDUZ,XMZ,.XMY,.XMINSTR) ;send message + I +$G(XMZ)<1 S CWDATA(1)="0^5- MESSAGE CREATION FAILED" G CRTEND + I +$G(XMZ)>0 S CWDATA(1)="1^^"_$G(XMZ) +CRTEND K ^TMP($J,"CWMAILOUT"),^TMP($J,"CWMAILLOAD") + Q +CNVTAB(CWSRC) ;Convert TABS to spaces (use 6 char per tab) + ;PASS $NA() VARIABLE NAME CONTAINING DATA + N CWLP,CWLINE + S CWLP=+$G(CWLP) + F S CWLP=$O(@CWSRC@(CWLP)) Q:CWLP="" D + . S CWLINE=@CWSRC@(CWLP) + . S @CWSRC@(CWLP)=$$LNCNV(CWLINE) + Q +LNCNV(CWL) ; data line tab extracter + N CWTMP,CWTMPL,CWP,CWPR,CWPADL + Q:'$F(CWL,$C(9)) CWL ; no tabs to convert + S CWTMP=CWL,CWTMPL="" + F D Q:CWTMP'[$C(9) + . S CWP=$P(CWTMP,$C(9)) ; left portion of string + . S CWPR=$P(CWTMP,$C(9),2,999) ; remainder of string + . S CWPADL=6-($L(CWP)#6) ; pad length + . I ($L(CWP)+CWPADL+$L(CWPR))>250 Q ;line is to long + . S CWTMP=CWP_$$REPEAT^XLFSTR(" ",CWPADL)_CWPR + Q CWTMP + ; +BLDNETI(CWXMZ,CWSUBJ) ;build network header information + ;From: + ;Subject: + ;Date: 9 Jul 1999 09:02:27 -0500 (EST) + ;X-Mailer: VISTA Mail + N CWCNT + I $L($$ZNODE^XMXUTIL2(CWXMZ)) D + . S ^XMB(3.9,CWXMZ,2,.001,0)="From: "_$$LOW^XLFSTR($G(XMV("NETNAME"))) + . ;S ^XMB(3.9,CWXMZ,2,.002,0)="To:" ;refet to bldnetit api + . S ^XMB(3.9,CWXMZ,2,.003,0)="Subject: "_$G(CWSUBJ) + . S ^XMB(3.9,CWXMZ,2,.004,0)="Date:"_$$INDT^XMXUTIL1($$NOW^XLFDT) + . S ^XMB(3.9,CWXMZ,2,.005,0)="X-Mailer: Vista GuiMail" ;VISTA MAIL" + . S ^XMB(3.9,CWXMZ,2,.006,0)="Encoding: x-uuencode" ;X-UUENCODE" + . S CWCNT=.007 + . D BLDNETIT(CWXMZ,.XMY,.CWCNT) + Q +BLDNETIT(CWXMZ,CWXMY,CWCTN) ; build To: section + ;Input - CWXMZ - Message Number + ; CWXMY - Array of Recipients + ; CWCTN - Counter + ; + N LP,CWINSTR,CWFULL,CWSET,CWTO,CWTO1,CWRHDR + K ^TMP($J,"CWNETH") + S CWINSTR("ADDR FLAGS")="RX" + S CWFLG=0,CWTO="To: ",CWTO1=" ",CWRHDR="" + S LP="" F S LP=$O(CWXMY(LP)) Q:LP="" D + . D TOWHOM^XMXAPI(XMDUZ,,"S",LP,.CWINSTR,.CWFULL) + . I $L($G(CWFULL)) D + . . I CWFULL'["@" D + . . .S CWFULL=$TR(CWFULL,", .","._+") ; set internet naming convention + . . .S CWFULL=CWFULL_"@"_$G(^XMB("NETNAME")) + . . I ($L(CWRHDR)+$L(CWFULL)+1)<140 D ;line not full + . . . S CWRHDR=CWRHDR_$S($L(CWRHDR)>0&($E(CWRHDR,$L(CWRHDR))'=","):",",1:"")_CWFULL + . . E D + . . . S ^TMP($J,"CWNETH",CWCTN)=CWRHDR + . . . S CWCTN=CWCTN+.001 + . . . S CWRHDR=CWFULL + I $L(CWRHDR) S ^TMP($J,"CWNETH",CWCTN)=CWRHDR ;set remaining data + S LP=0 F S LP=$O(^TMP($J,"CWNETH",LP)) Q:LP<.001 D + . S ^XMB(3.9,CWXMZ,2,LP,0)=$S(CWFLG:" "_^TMP($J,"CWNETH",LP),1:"To: "_^TMP($J,"CWNETH",LP)) + K ^TMP($J,"CWNETH") ;KILL TEMP GLOBAL BUFFER + Q diff --git a/p/CWMAIL3.m b/p/CWMAIL3.m new file mode 100644 index 0000000..9aa1b7f --- /dev/null +++ b/p/CWMAIL3.m @@ -0,0 +1,51 @@ +CWMAIL3 ;INDPLS/PLS- DELPHI VISTA MAIL SERVER, CON'T ;03-Jun-1999 13:24;PS + ;;2.1;CWMA GuiMail;;Jan 06, 1999 + Q ;ROUTINE CAN'T BE CALLED DIRECTLY + ; +GRPINFO(CWDAT,CWPARAM) ;Mail Group Information + ;CWPARAM = Mail Group IEN + N CWFILE,IO,IOP,POP,DIC,DA,X,Y,CWFLG,CWNXT,IOSL,CWDEFDIR,CWDATFIL + S CWFILE="CWMAILGRP"_$J_".TXT" + S CWDEFDIR=$$PWD^%ZISH + D OPEN^%ZISH("CWDATFIL",CWDEFDIR,CWFILE,"W") + G:POP GRPINFOE + U IO S IOSL=99999 + D DISPLAY^XMHIG(+CWPARAM) + D CLOSE^%ZISH("CWDATFIL") + I $$FTG^%ZISH(CWDEFDIR,CWFILE,$NA(CWDAT(2)),1) D + .S CWFILE(CWFILE)="" + .S X=$$DEL^%ZISH(CWDEFDIR,$NA(CWFILE)) + .I $O(CWDAT(0))>0 D + ..S CWFLG=0,CWNXT=1 + ..F S CWNXT=$O(CWDAT(CWNXT)) Q:CWNXT<1!(CWFLG) D + ...I '$L(CWDAT(CWNXT)),'CWFLG K CWDAT(CWNXT) + ...E I $A(CWDAT(CWNXT))=12 K CWDAT(CWNXT) + ...E S CWDAT(CWNXT)=$$CTRL^XMXUTIL1(CWDAT(CWNXT)),CWFLG=1 ;remove control characters + .S CWDAT(-9900)=$O(CWDAT(9999999),-1)+1 + E S CWDAT(-9900)=2 +GRPINFOE D CLOSE^%ZISH("CWDATFIL") + Q $O(CWDAT(1)) +USRINFO(CWDAT,CWPARAM) ;Mail User Information + ;CWPARAM = Mail User IEN + N CWFILE,%ZIS,IOP,POP,IO,Y,X,CWDEFDIR,CWDATFIL,IOSL + N CWFLG,CWNXT + S CWFILE="CWMAILUSR"_$J_".TXT" + S CWDEFDIR=$$PWD^%ZISH + D OPEN^%ZISH("CWDATFIL",CWDEFDIR,CWFILE,"W") + G:POP USRINFOE + U IO S IOSL=99999 + D DISPUSER^XMHIU(+CWPARAM) + D CLOSE^%ZISH("CWDATFIL") +FLG I $$FTG^%ZISH(CWDEFDIR,CWFILE,$NA(CWDAT(2)),1) D + .S CWFILE(CWFILE)="" + .S X=$$DEL^%ZISH(CWDEFDIR,$NA(CWFILE)) + .I $O(CWDAT(0))>0 D + ..S CWFLG=0,CWNXT=1 + ..F S CWNXT=$O(CWDAT(CWNXT)) Q:CWNXT<1!(CWFLG) D + ...I '$L(CWDAT(CWNXT)),'CWFLG K CWDAT(CWNXT) + ...E I $A(CWDAT(CWNXT))=12 K CWDAT(CWNXT) + ...E S CWDAT(CWNXT)=$$CTRL^XMXUTIL1(CWDAT(CWNXT)),CWFLG=1 ;remove control characters + .S CWDAT(-9900)=$O(CWDAT(9999999),-1)+1 + E S CWDAT(-9900)=2 +USRINFOE D CLOSE^%ZISH("CWDATFIL") + Q $O(CWDAT(1)) diff --git a/p/CWMAIL4.m b/p/CWMAIL4.m new file mode 100644 index 0000000..3c7a2fd --- /dev/null +++ b/p/CWMAIL4.m @@ -0,0 +1,28 @@ +CWMAIL4 ;INDPLS/PLS- DELPHI VISTA MAIL SERVER, CON'T ;05-May-1999 14:03;PS + ;;2.1;CWMA GuiMail;;Jan 06, 1999 + Q ;ROUTINE CAN'T BE CALLED DIRECTLY + ; +GETMSGL(DAT,CWDUZ,CWBSK,CWSRC) ; + ;API NOT CURRENTLY USED + ;INPUT + ; DAT : RETURN ARRAY + ;CWDUZ : USER + ;CWBSK : BASKET IEN OR NAME + ;CWSRC : LOOKUP TYPE 0(IEN); 1("C" X-REF) ; DEFAULT TO ZERO + Q:'CWDUZ 0 + I +CWBSK'=CWBSK D + . S CWBSK=+$O(^XMB(3.7,CWDUZ,2,"B",CWBSK,0)) + S CWSRC=+$G(CWSRC,0) + N CWMSG,CWSEQ + S (CWSEQ,CWMSG)=0 + I 'CWSRC D + . F S CWMSG=$O(^XMB(3.7,CWDUZ,2,CWBSK,1,CWMSG)) Q:CWMSG<1 S DAT(CWMSG)="" +ELSE E D + . F S CWSEQ=$O(^XMB(3.7,CWDUZ,2,CWBSK,1,"C",CWSEQ)) Q:CWSEQ<1 D + . . F S CWMSG=$O(^XMB(3.7,CWDUZ,2,CWBSK,1,"C",CWSEQ,CWMSG)) Q:CWMSG<1 D + . . . S DAT(CWMSG)="" + Q $O(DAT(0))>0 + ; +FMDTE(CWDT,CWPRM) ;API TO RETURN A FORMATTED DATE + ;replaces '@' with " " between date and time + Q $TR($$FMTE^XLFDT(CWDT,CWPRM),"@"," ") diff --git a/p/CWMAILA.m b/p/CWMAILA.m new file mode 100644 index 0000000..156d7b5 --- /dev/null +++ b/p/CWMAILA.m @@ -0,0 +1,144 @@ +CWMAILA ;INDPLS/PLS- DELPHI VISTA MAIL SERVER CONT'D ;02-Jul-1999 14:45;PS + ;;2.1;CWMA GuiMail;;Jan 06, 1999 + ;MODIFIED FOR XM*7.1*50 + Q ;ROUTINE CAN'T BE CALLED DIRECTLY +%READ(CWDATA,CWINPUT) ; + ;CWINPUT FORMAT - DELIMITER ';' + ; 1st - IEN of message + ; 4th - New message (value >0 indicates new messages only) + K CWDATA + N CWMSGN,CWNMFLG + S CWMSGN=$P(CWINPUT,";") + S CWNMFLG=+$P(CWINPUT,";",4) + D:CWMSGN PROCMS^CWMAIL0(.CWDATA,CWMSGN,CWNMFLG) + Q +%LIST(CWDATA,CWINPUT) ; + ;CWINPUT - MAIL TYPE OR MAILBOX NUMBER - DELIMITER ';' + ; 2nd - IEN of MailBasket or non-numeric for new mail + ;CWARY format: piece value + ; 1 message basket + ; 2 message ien + ; 3 message subject + ; 4 message date sent + ; 5 not used + ; 6 message type + ; 7 confirmation flag + ; 8 closed flag + ; 9 info flag + ; 10 confidential flag + ; 11 sender ien + ; 12 broadcast flag + ; 13 sender name + ; 14 total # of recipients + ; 15 total # of replies + ; 16 priority flag + ; 17 last response read + ; 18 message basket sequence number + ; 19 new message flag + ; 20 answer message flag + ; + S CWDATA(1)="0^AN ERROR HAS OCCURRED" + N CWVAL,CWMSG,CWMSGSUB,CWMSGDT,CWDCNT,CWMAIB,CWMSGBX,CWMSGLP + N CWARY + S CWVAL=$P(CWINPUT,";",2) + S CWMSG=0,CWDCNT=2,CWMSGLP=0 + S CWMAIB=CWVAL + ;CALL API TO RETRIEVE MESSAGES + I CWVAL=+CWVAL D + . D LISTMSGS^XMXAPIB(XMDUZ,+CWMAIB,"BSKT;SUBJ;DATE;SEQN;NEW") ; data put in ^TMP("XMLIST",$J + . Q:'+$P($G(^TMP("XMLIST",$J,0)),U,1) ;NO DATA FOUND + . D BLDLST^CWMAILF(.CWDATA,$NA(^TMP("XMLIST",$J)),.CWDCNT) + E D ;PROCESS NEW MESSAGE REQUEST + . D LISTMSGS^XMXAPIB(XMDUZ,"*","BSKT;SUBJ;DATE;NEW","N") ;SEQN;NEW","N") + . Q:'+$P($G(^TMP("XMLIST",$J,0)),U,1) ;NO DATA FOUND + . D BLDLST^CWMAILF(.CWDATA,$NA(^TMP("XMLIST",$J)),.CWDCNT) + I $O(CWDATA(1)) S CWDATA(1)="1^^DATA HAS BEEN FOUND" + E S CWDATA(1)=$S(+CWVAL:"1^^No Messages Found in Specified Mail Box",1:"1^^"_"You have no NEW Messages") + S $P(CWDATA(1),U,2)=CWDCNT-2 + Q + ; +%DELETE(CWDATA,CWINPUT) ; + ;CWINPUT - DELIMITER ';' + ; 1st - IEN of message + ; 2nd - IEN of mail basket + N XMZ,XMDUZ,XMK,XMKZA,XMMSG + S XMZ=$P(CWINPUT,";") + S XMDUZ=DUZ + S XMK=$P(CWINPUT,";",2) + S XMKZA(XMZ)="" + D DELMSG^XMXAPI(XMDUZ,"",.XMKZA,.XMMSG) + I +$G(XMMSG) D + . S CWDATA(1)="1^0^Message Deleted" + E S CWDATA(1)="0^0^Unable to delete message" + Q +%SAVE(CWDATA,CWINPUT) ; + ;CWINPUT - DELIMITER ';' + ; 1st - IEN of message + ; 2nd - IEN of mail basket + ; 3rd - IEN of new mail basket + N XMZ,XMK,XMKM,XMMSG,XMKZA + S XMZ=$P(CWINPUT,";"),XMK=$P(CWINPUT,";",2) + S XMKZA(XMZ)="" + S XMKM=$P(CWINPUT,";",3) + D MOVEMSG^XMXAPI(XMDUZ,"",.XMKZA,XMKM,.XMMSG) + S CWDATA(1)=+$G(XMMSG) ;Return Status + Q +%MAKNEW(CWDATA,CWINPUT) ; + ;CWINPUT - DELIMITER ';' + ; 1st - IEN of message + ; 2nd - IEN of mail basket + N XMZ,XMK,XMKZA,XMMSG + S CWDATA(1)=0 + S XMZ=$P(CWINPUT,";") + S XMK=+$P(CWINPUT,";",2) + D MAKENEW^XMXUTIL(XMDUZ,XMK,XMZ,1) + I XMK<.6 D ;MUST MOVE MESSAGE FROM WASTE BASKET TO IN BASKET + . S XMKZA(XMZ)="" + . D MOVEMSG^XMXAPI(XMDUZ,"",.XMKZA,1,.XMMSG) + S CWDATA(1)="1^1" ;FORCE TO SUCCESS + Q +%NEWBSK(CWDATA,CWINPUT) ;CREATE A NEW MAIL BASKET + ;CWINPUT - DELIMITER ';' + ; 1st Piece - New basket name + N CWBASKET,CWBSKN,CWMSG + S CWBASKET=$$UP^XLFSTR($P(CWINPUT,";")) ;FORCE TO UPPER CASE + D CRE8BSKT^XMXAPIB(XMDUZ,CWBASKET,.CWBSKN) + I +$G(CWBSKN)>0 D + . D QBSKT^XMXAPIB(XMDUZ,+CWBSKN,.CWMSG) + . S CWDATA(1)="1"_U_CWBSKN_U_$P($G(CWMSG),U,2) + E S CWDATA(1)=0_U_"Error-unable to create basket." + Q +%RESEQ(CWDATA,CWINPUT) ;RESEQUENCE A VISTA MAIL BASKET + ;CWINPUT - DELIMITER ';' + ; 2nd - IEN of mail basket + N CWBASKET,CWDATT + S CWBASKET=$P(CWINPUT,";",2) + G:'CWBASKET RESEQE + D RSEQBSKT^XMXAPIB(XMDUZ,CWBASKET,.CWDATT) + I $L(CWDATT) S CWDATA(1)="1^1" + E S CWDATA(1)="0^0^Error-unable to resequence messages." +RESEQE Q + ; +%MSGSRC(CWDATA,CWINPUT,CWTEXT) ;MESSAGE SEARCH + ;INPUT - CWINPUT AND CWTEXT ARRAY HOLD CRITERIA + ;OUTPUT - REFER TO %LIST + S CWDATA(1)="0^AN ERROR HAS OCCURRED" + N CWVAL,CWMSG,CWMSGSUB,CWMSGDT,CWDCNT,CWMAIB,CWMSGBX,CWMSGLP + N CWARY,CWFLAGS + S CWFLAGS=$P(CWINPUT,";") ;Processing Flags + S CWMAIB=$P(CWINPUT,";",2) ;MailBasket + S CWMSG=0,CWDCNT=2,CWMSGLP=0 + S CWMAIB=$S($L(CWMAIB):CWMAIB,1:"*") + ;Convert External dates to FM Dates + I $G(CWTEXT("FDATE")) D + . S CWTEXT("FDATE")=$$CONVERT^XMXUTIL1(CWTEXT("FDATE")) + I $G(CWTEXT("TDATE")) D + . S CWTEXT("TDATE")=$$CONVERT^XMXUTIL1(CWTEXT("TDATE")) + ;CALL API TO RETRIEVE MESSAGES + D LISTMSGS^XMXAPIB(XMDUZ,CWMAIB,"BSKT;SUBJ;DATE;NEW",CWFLAGS,,,.CWTEXT) ; data put in ^TMP("XMLIST",$J + I +$P($G(^TMP("XMLIST",$J,0)),U,1) D ; + . D BLDLST^CWMAILF(.CWDATA,$NA(^TMP("XMLIST",$J)),.CWDCNT) + I $O(CWDATA(1)) S CWDATA(1)="1^^DATA HAS BEEN FOUND" + E S CWDATA(1)="1^^No Messages Found In Search" + S $P(CWDATA(1),U,2)=CWDCNT-2 +MSGSRCE Q diff --git a/p/CWMAILB.m b/p/CWMAILB.m new file mode 100644 index 0000000..e72fa0d --- /dev/null +++ b/p/CWMAILB.m @@ -0,0 +1,123 @@ +CWMAILB ;INDPLS/PLS- DELPHI VISTA MAIL SERVER CON'T ;03-Jun-1999 13:29;PS + ;;2.1;CWMA GuiMail;;Jan 06, 1999 +%FORWARD(CWDATA,CWINPUT,CWTEXT) ; + ;Input: 1st Piece of CWINPUT holds IEN of Message + ; CWTEXT holds recipient list + ; + N XMZ,XMY,CWLP,CWSDATA,CWSEDATA,CWTMP,CWFILE,CWIEN,CWNAM,XMINSTR,CWMSG + N XMKZA + S XMZ=$P(CWINPUT,";") + S CWDATA(1)="0^^AN ERROR HAS OCCURRED" + G:'$G(XMZ) FOREND + S CWSDATA=$G(CWTEXT(-9902),"[START DATA]"),CWSEDATA=$G(CWTEXT(-9903),"[END DATA]") + S CWLP=-1 D FNDLP(.CWLP,CWSDATA) + G:$G(CWLP)="" FOREND + F S CWLP=$O(CWTEXT(CWLP)) Q:CWLP="" Q:CWTEXT(CWLP)=CWSEDATA D + .S CWTMP=$G(CWTEXT(CWLP)) Q:CWTMP="" + .S CWFILE=+$P(CWTMP,"^"),CWIEN=+$P(CWTMP,"^",2),CWNAM=$P(CWTMP,"^",3) + .I CWFILE=200 S XMY(CWIEN)="" + .E I CWFILE=3.8 S XMY("G."_CWNAM)="" + .E S XMY(CWNAM)="" + I $D(XMY) D + . S XMKZA(XMZ)="" + . D FWDMSG^XMXAPI(XMDUZ,"",.XMKZA,.XMY,.XMINSTR,.CWMSG) + ;RETURNS forwarded. + S CWDATA(1)=+CWMSG_U_U_XMZ ;FORCE TO SUCCESS +FOREND Q + ; +%TERMIN(CWDATA,CWINPUT) ;TERMINATE A MESSAGE THREAD + ;Input: 1st piece = IEN of Message + ; 2nd piece = IEN of Mail Basket + ; + N XMRC,XMZ,XMK,Y,CWMSGNM,CWMSGR + S CWDATA(1)="0^^AN ERROR HAS OCCURRED" + S XMZ=$P($G(CWINPUT),";"),XMK=$P($G(CWINPUT),";",2) + S CWMSGNM(XMZ)="" + D TERMMSG^XMXAPI(XMDUZ,"",.CWMSGNM,.CWMSGR) + ;RETURNS terminated. + S CWDATA(1)=+CWMSGR_U_U ;return 1 for success or 0 + Q +FNDLP(CWLP,X) ;FIND A CHARACTER STRING ENTRY + F S CWLP=$O(CWTEXT(CWLP)) Q:CWLP="" Q:CWTEXT(CWLP)=X + Q + ; +INCNT(CWCNT) ;INCREMENT COUNTER + Q CWCNT+1 + ; +%CREATE(DATA,INPUT,TEXT) ;CREATE A NEW MESSAGE + ;BUILD RETURN CODES FOR ERROR MESSAGING + D %CREATE^CWMAIL2 + Q + ; +%REPLY(CWDATA,CWINPUT,CWTEXT) ; This API uses global array for text + ;INPUT - Piece 1 : Message Number + ; Piece 2-4 : Not Used + ; Piece 5 : Network Reply Flag (0 = no; 1 = yes) + ; + N CWMSGN,CWRESULT,CWSDATA,CWSEDATA,CWTMP,CWNWCHK,CWDATT + N CWMSGT,XMZR,CWLP,XMINSTR + S CWMSGN=$P(CWINPUT,";") + S CWNWCHK=$P(CWINPUT,";",5) + S CWDATA(1)="0^UNDEFINED ERROR" + S CWTEXT=$NA(^TMP($J,"CWMAILLOAD")) + G:'$G(CWMSGN) REPEND + S CWSDATA=$G(@CWTEXT@(-9900),"[START DATA]"),CWSEDATA=$G(@CWTEXT@(-9901),"[END DATA]") + S CWLP=-1 D GFNDLP(.CWLP,CWSDATA) + G:$G(CWLP)="" REPEND + F S CWLP=$O(@CWTEXT@(CWLP)) Q:CWLP="" Q:@CWTEXT@(CWLP)=CWSEDATA D + .S ^TMP($J,"CWMAILOUT",CWLP)=$G(@CWTEXT@(CWLP)) + G:'$D(^TMP($J,"CWMAILOUT")) REPEND + S CWMSGT=$NA(^TMP($J,"CWMAILOUT")) + S XMINSTR("NET REPLY")=$S(+$G(CWNWCHK):1,1:0) + D REPLYMSG^XMXAPI(XMDUZ,"",CWMSGN,CWMSGT,.XMINSTR,.XMZR) + I +$G(XMZR)>0 S CWDATA(1)=$S(CWNWCHK:2,1:1)_"^NO ERRORS"_U_CWMSGN ;SUCCESS + E S CWDATA(1)="0^"_$G(CWDATA)_U_CWMSGN ;RETURN ERROR MESSAGE +REPEND K ^TMP($J,"CWMAILLOAD"),^TMP($J,"CWMAILOUT") + Q +GFNDLP(CWLP,X) ;FIND A CHARACTER STRING ENTRY IN GLOBAL + F S CWLP=$O(@CWTEXT@(CWLP)) Q:CWLP="" Q:@CWTEXT@(CWLP)=X + Q + ; +%ANSWER(CWDATA,CWINPUT,CWTEXT) ; This API uses global array for text to answer a message + ;INPUT - CWINPUT : Piece 1 : Message Number + ; Piece 2 : Not Used + ; Piece 3 : Message Attributes + ; Pieces 4-5 : Not Used + ; CWTEXT : Holds list of additional recipients + ; + N CWSDATA,CWSEDATA,CWLP,CWTXTARY,DA,DIE,DR,Y,XMTEXT + N CWMSGABS,CWTMP,CWFILE,CWIEN,CWNAM + N XMBODY,CWMSGN,XMY,XMZ,XMINSTR + S CWMSGN=$P(CWINPUT,";") ;MESSAGE NUMBER + I $G(CWMSGN)<1 S CWDATA(1)="0^98- No message number given" G ANSEND + S CWDATA(1)="0^99- UNDEFINED ERROR" + ;TEXT ARRAY CONTAINS RECIPIENT LIST AND MESSAGE TEXT LOADED FROM BMSGD call + ;BUILD XMY ARRAY + S CWTEXT=$NA(^TMP($J,"CWMAILLOAD")) + S CWSDATA=$G(@CWTEXT@(-9902),"[START XMY]"),CWSEDATA=$G(@CWTEXT@(-9903),"[END XMY]") + S CWLP=-1 D GFNDLP^CWMAILB(.CWLP,CWSDATA) + ;RETRIEVE RECIPIENTS + I $G(CWLP)'="" D + . F S CWLP=$O(@CWTEXT@(CWLP)) Q:CWLP="" Q:@CWTEXT@(CWLP)=CWSEDATA D + . . S CWTMP=$G(@CWTEXT@(CWLP)) Q:CWTMP="" + . . S CWFILE=+$P(CWTMP,"^"),CWIEN=+$P(CWTMP,"^",2),CWNAM=$P(CWTMP,"^",3) + . . I CWFILE=200 S XMY(CWIEN)="" + . . E I CWFILE=3.8 S XMY("G."_CWNAM)="" + . . E S XMY(CWNAM)="" ;treat address as internet address + ;BUILD MESSAGE @TEXT@ ARRAY + S CWSDATA=$G(@CWTEXT@(-9900),"[START DATA]"),CWSEDATA=$G(@CWTEXT@(-9901),"[END DATA]") + S CWLP=-1 D GFNDLP^CWMAILB(.CWLP,CWSDATA) + I $G(CWLP)="" S CWDATA(1)="0^3- NO MESSAGE TEXT" G ANSEND + F S CWLP=$O(@CWTEXT@(CWLP)) Q:CWLP="" Q:@CWTEXT@(CWLP)=CWSEDATA D + .S ^TMP($J,"CWMAILOUT",CWLP)=$G(@CWTEXT@(CWLP)) + ;I '$D(^TMP($J,"CWMAILOUT")) S CWDATA(1)="0^3- NO MESSAGE TEXT" G ANSEND ;NO MESSAGE @CWTEXT@ + ;I '$L($P($G(CWINPUT),";")) S CWDATA(1)="0^4- MESSAGE SUBJECT NOT GIVEN" G ANSEND + ;E S XMSUBJ=$P($G(CWINPUT),";") + ;PROCESS MESSAGE + S XMBODY=$NA(^TMP($J,"CWMAILOUT")) + S XMINSTR("FLAGS")=$P(CWINPUT,";",3) ;GET MESSAGE ATTRIBUTES + D ANSRMSG^XMXAPI(XMDUZ,"",CWMSGN,"",XMBODY,.XMY,.XMINSTR,.XMZ) + I $G(XMZ)<1 S CWDATA(1)="0^5- MESSAGE ANSWER FAILED" G ANSEND + I +$G(XMZ)>0 S CWDATA(1)="1^^"_$G(XMZ) +ANSEND K ^TMP($J,"CWMAILOUT"),^TMP($J,"CWMAILLOAD") + Q diff --git a/p/CWMAILC.m b/p/CWMAILC.m new file mode 100644 index 0000000..d9999f2 --- /dev/null +++ b/p/CWMAILC.m @@ -0,0 +1,120 @@ +CWMAILC ;INDPLS/PLS- DELPHI VISTA MAIL SERVER CONT'D ;03-Jun-1999 13:29;PS + ;;2.1;CWMA GuiMail;;Jan 06, 1999 + ;MODIFIED FOR XM*7.1*50 + Q ;ROUTINE CAN'T BE CALLED DIRECTLY + ; +%LATER(CWDATA,CWINPUT) ;LATER A MESSAGE + ;CWINPUT - HOLDS MESSAGE NUMBER AND LATER DATE/TIME - DELIMITER ';' + ; 1st - IEN of message + ; 2nd - Later date + N XMZ,XMDUZ,XMA + S CWDATA(1)="0^^AN ERROR HAS OCCURRED" + S XMZ=$P(CWINPUT,";") + S XMDUZ=DUZ + S XMA=$P(CWINPUT,";",2) + G:'XMZ!('$G(XMA)) LATERE + I $$LATER^CWMAIL1(XMZ,XMA) D + .S CWDATA(1)="1^1^Message has been latered" + E S CWDATA(1)="0^0^Unable to Later Message Number: "_XMZ +LATERE Q + ; +%MBOX(CWDATA,CWINPUT) ;RETRIEVE MAILBOXES + ;CWINPUT NOT USED + ;VARIABLES : CWNMSG = NEW MESSAGES + ; CWTMSG = TOTAL MESSAGE COUNT + K ^TMP($J,"CWMBSKT") + D LISTBSKT^XMXAPIB(XMDUZ,,,,,"^TMP($J,""CWMBSKT"")") + N CWLP,CWLP1,CWCNT,CWNMSG,CWTMSG,CWFPES,CWHSN,CWBNAME,CWBIEN + S CWDATA(1)="0^^AN ERROR HAS OCCURRED",CWCNT=2 + S CWLP=0 F S CWLP=$O(^TMP($J,"CWMBSKT","XMLIST",CWLP)) Q:CWLP="" D + . S CWBIEN=+$G(^TMP($J,"CWMBSKT","XMLIST",CWLP)) + . I CWBIEN D + . . S CWDATA(CWCNT)=$G(^TMP($J,"CWMBSKT","XMLIST",CWLP)) + . . S CWCNT=CWCNT+1 + I $O(CWDATA(1)) S CWDATA(1)="1^^DATA HAS BEEN FOUND" + E S CWDATA(1)="1^^No Mail Boxes could be found" + S $P(CWDATA(1),U,2)=CWCNT-2 +MBOXE K ^TMP($J,"CWMBSKT") + Q +%PMBOX(CWDATA,CWINPUT) ;PURGE ENTIRE MAIL BOX + ;CWINPUT = MAIL BOX IEN + N CWLP,XMZ,XMK,CWX,CWY,XMKZA,XMMSG,CWCNT + S XMK=$P(CWINPUT,";",2) + G PMBOXE:'XMK + S CWDATA(1)="0^^AN ERROR HAS OCCURRED",CWCNT=2 + ;delete basket regardless of content + D DELBSKT^XMXAPIB(XMDUZ,XMK,"D") + S CWDATA(1)="1^1" + ;E S CWDATA(1)="0^0" +PMBOXE Q +%RNMBOX(CWDATA,CWINPUT) ;RENAME EXISTING MAILBOX + ;CWINPUT - DELIMITER ';' + ; 1st - IEN of mailbox + ; 2nd - New name of mailbox + D NAMEBSKT^XMXAPIB(XMDUZ,$P(CWINPUT,";"),$P(CWINPUT,";",2)) + S CWDATA(1)="1^1^MAILBOX NAME WAS CHANGED" ;FORCE TO SUCCESS +RNMBOXE Q +%MSGRCP(CWDATA,CWINPUT) ; RETURNS A LIST OF MESSAGE RECIPIENTS + ;CWINPUT = IEN of message + N CWDAT,CWI,XMZ + K CWDATA + S XMZ=+$P($G(CWINPUT),";",2) + D RECPT^CWMAIL1(.CWDATA,XMZ) +MSGRCPE Q +%NETINFO(CWDATA,CWINPUT) ; RETURNS NETWORK TRANSMISSION INFO + ;INPUT - IEN of message + N CWDAT,CWI,XMZ + K CWDATA + S XMZ=+$P($G(CWINPUT),";",2) + D NETINFO^CWMAIL1(.CWDATA,XMZ) +NETINFOE Q + ; +%ADRSTO(CWDATA,CWINPUT) ;RETURNS ARRAY OF ADDRESSED TO + ;CWINPUT - IEN of message + N CWDAT,CWI,XMZ + K CWDATA + S XMZ=+$P($G(CWINPUT),";",2) + D ADRSTO^CWMAIL1(.CWDATA,XMZ) +ADRSTOE Q +%GRPINF(CWDATA,CWINPUT) ;MAIL GROUP INFO + ;CWINPUT - IEN of mail group + N CWDAT,CWI,XMZ + K CWDATA + S CWI=2 + S CWIEN=+$P($G(CWINPUT),";",2) + I $$GRPINFO^CWMAIL3(.CWDAT,CWIEN) D + .S CWI=+$G(CWDAT(-9900)) K CWDAT(-9900) + .M CWDATA=CWDAT + .S CWDATA(1)="1^^DATA HAS BEEN FOUND" + E S CWDATA(1)="1^^There was no Mail Group information found." + S $P(CWDATA(1),U,2)=CWI-2 +GRPINFE Q +%USRINF(CWDATA,CWINPUT) ;MAIL USER INFO + ;CWINPUT - IEN of mail user + N CWDAT,CWI,CWIEN + K CWDATA + S CWI=2 + S CWIEN=+$P($G(CWINPUT),";",2) + ;G:'CWIEN USRINFE + I $$USRINFO^CWMAIL3(.CWDAT,CWIEN) D + .S CWI=+$G(CWDAT(-9900)) K CWDAT(-9900) + .M CWDATA=CWDAT + .S CWDATA(1)="1^^DATA HAS BEEN FOUND" + E S CWDATA(1)="1^^There was no Mail User information found." + S $P(CWDATA(1),U,2)=CWI-2 +USRINFE Q +MBOXD(CWDAT,CWUSR,CWIEN) ;RETURN DATA FOR MAILBOX + ;API NOT CURRENTLY USED + ;INPUT CWDAT = RETURN ARRAY + ; CWIEN = MAILBASKET IEN TO 3.7 FOR USER + ;OUTPUT CWDAT("NAME") + ; CWDAT("TMSG") + ; CWDAT("NMSG") + ; CWDAT("IEN") + N CWDATT + D QBSKT^XMXAPIB(CWUSR,CWIEN,.CWDATT) + S CWDAT("IEN")=$P(CWDATT,U) + S CWDAT("NAME")=$P(CWDATT,U,2) + S CWDAT("TMSG")=+$P(CWDATT,U,3) + S CWDAT("NMSG")=+$P(CWDATT,U,4) + Q diff --git a/p/CWMAILD.m b/p/CWMAILD.m new file mode 100644 index 0000000..d15f4f6 --- /dev/null +++ b/p/CWMAILD.m @@ -0,0 +1,109 @@ +CWMAILD ;INDPLS/PLS- DELPHI VISTA MAIL SERVER CONT'D ;16-Jul-1999 11:13;PS + ;;2.1;CWMA GuiMail;;Jan 06, 1999 + Q ;ROUTINE CAN'T BE CALLED DIRECTLY + ; +%BMSGD(CWDATA,CWINPUT,CWTEXT) ;BUILD MESSAGE DATA INTO GLOBAL + ;USE CREATE OR REPLY TO SEND ACTUAL MESSAGE OR REPLY + M ^TMP($J,"CWMAILLOAD")=CWTEXT + S CWDATA(1)="1^1^DATA SET" +BMSGDE Q + ; +%PERPREF(CWDATA,CWPARAM) ;retrieve personal preferences + ;CWPARAM is not used + N CWNAME,CWCNT + S CWCNT=2 + S CWDATA(1)="0^^AN ERROR HAS OCCURRED" + I $$GETPKPM^CWMAILE(.CWDATA) D + .S CWCNT=$G(CWDATA(-9900)) + .K CWDATA(-9900) + .S CWDATA(1)="1^1^Preferences have been retrieved" + E S CWDATA(1)="0^0^Unable to retrieve preferences" + S $P(CWDATA(1),U,2)=CWCNT-2 +PERPREFE Q + ; +%USRLOG(CWDATA,DUZ) ;SET-UP USER PARTITION + ; + I +DUZ>0 D + . N XMDISPI,XMDUN,XMDUZ,CWNAME,CWNKNM,CWNMAIL,CWPMAIL + . S CWNKNM=$P($G(^VA(200,DUZ,.1)),U,4) + . D INIT^XMVVITAE + . S CWNMAIL=+$P($G(^XMB(3.7,DUZ,0)),U,6) + . S CWDATA(1)="1^" + . S $P(CWDATA(1),U,2)=XMV("DUZ NAME") ; SET USER NAME + . S $P(CWDATA(1),U,3)=CWNKNM ;SET USER NICKNAME + . S $P(CWDATA(1),U,4)=XMV("NEW MSGS") ;SET # OF NEW MSGS + . S $P(CWDATA(1),U,5)=$G(XMV("WARNING",1))="Priority Mail" ;SET PRIORITY MAIL FLAG + . S $P(CWDATA(1),U,6)=$P($G(XMV("NETNAME")),"@",2) ;get domain name for mail server + ;$G(^XMB("NETNAME")) ;get domain name for mail server + E S CWDATA(1)="0^USER NOT FOUND" +USRLOGE Q +%CHKMAIL(CWDATA,DUZ) ;CHECK FOR NEW MAIL + ; + N CWPMAIL,CWNMAIL,CWDAT + I +DUZ>0 D + . S CWDAT=$$NEWS^XMXUTIL(DUZ) ;FORMAT #NEWMSGS^PRIORITY^#NMSGIN^DT LAST MSG^ + . S CWDATA(1)="1^"_U_U_+CWDAT_U_+$P(CWDAT,U,2) + E S CWDATA(1)="0^USER NOT FOUND" +CHKMAILE Q + ; +%PRTMSG(CWDATA,CWINPUT) ;PRINT A MESSAGE + ; CWINPUT - 1st piece: XMZ message number + ; 2nd piece: XMK message basket number + ; 3rd piece: Print from response number 0=all + ; 4th piece: null = no recpts 0=summary; 1=detail + ; 5th piece: printer name + ; 6th piece: 1=header, 0=headerless + N XMZ,XMK,XMKN + N XMINSTR,CWDAT1,CWDAT2,CWRESP,CWRECP,CWPRTN,XMMSG,XMTASK + S XMZ=+$P(CWINPUT,";") + S CWRESP=$P(CWINPUT,";",3) + S CWRECP=$P(CWINPUT,";",4),CWRECP=$S($L(CWRECP):+CWRECP,1:-1) + S CWPRTN=$P(CWINPUT,";",5) + ;D INMSG1^XMXUTIL2(XMDUZ,XMZ,,.CWDAT1,.CWDAT2) ;GET # OF RESPONSES - NOT CURRENTLY NEEDED + S XMINSTR("HDR")=$S('$L($P(CWINPUT,";",6)):1,1:+$P(CWINPUT,";",6)) ;DEFAULT TO PRINTING HEADER + S XMINSTR("RESPS")=$S(+CWRESP:+CWRESP_"-",1:"*") ;DEFINE RANGE TO PRINT +$G((CWDAT("RESPS"))) HOLDS TOTAL # OF RESPONSES + I CWRECP>-1 D + . S XMINSTR("RECIPS")=$S(+CWRECP:2,1:1) ;CONVERT CWMA TO XM NOMENCLATURE + E S XMINSTR("RECIPS")=0 ;Don't print recipient list + D:$L($G(CWPRTN)) PRTMSG^XMXAPI(XMDUZ,,XMZ,CWPRTN,.XMINSTR,,.XMTASK) + I +$G(XMTASK) S CWDATA(1)="1^1^"_$G(XMTASK) + E S CWDATA(1)="1^0^Message could not be printed" +PRTMSGE Q + ; +%SUPREF(CWDATA,CWINPUT,CWTEXT) ;Set user preferences + ; + N CWSDATA,CWSEDATA,CWLP + N CWPRM,CWVAL,CWLP1,CWERR + S CWDATA(1)="0^^AN ERROR HAS OCCURRED" + S CWSDATA=$G(CWTEXT(-9902),"[START DATA]"),CWSEDATA=$G(CWTEXT(-9903),"[END DATA]") + S CWLP=-1 D FNDLP^CWMAILB(.CWLP,CWSDATA) + G:$G(CWLP)="" SUPREND + F S CWLP=$O(CWTEXT(CWLP)) Q:CWLP="" Q:CWTEXT(CWLP)=CWSEDATA D + . I CWTEXT(CWLP)'?1"[".E1"]" D + . . S CWPRM=$$GETPRM^CWMAILE($P(CWTEXT(CWLP),"=")) ;get parameter + . . I $L(CWPRM) D + . . . S CWVAL=$P(CWTEXT(CWLP),"=",2) ;get value + . . . S CWERR=$$SETPARM(XMDUZ,CWPRM,CWVAL) ;set value into parameter + S CWDATA(1)="1^1^Preferences have been stored" +SUPREND Q + ; +SETPARM(CWDUZ,CWPARM,CWVALUE) ;Set value into parameter instance + ;Input: CWPARM - holds the return value of $$GETPRM^CWMAILE + ; CWVALUE - value to stuff (single value or comma delimited string) + ; CWDUZ - user + Q:'CWDUZ 1 ;must have a valid user + K CWERR + I 'CWPARM D ;single instance + . D EN^XPAR("USR.`"_CWDUZ,$P(CWPARM,"|",2),1,CWVALUE,.CWERR) + E D ;multiple instances + . N CWLP,CWX,CWXA + . S CWX=CWVALUE,CWLP=0 + . F Q:$L(CWX,";")<(CWLP+1) D + . . S CWLP=CWLP+1 + . . S CWXA=$P(CWX,";",CWLP) ;CWXA holds the column,width pair + . . D EN^XPAR("USR.`"_CWDUZ,$P(CWPARM,"|",2),CWLP,CWXA,.CWERR) ;stuff value + Q CWERR + ; +%GETSVER(CWDATA,CWPARAM) ;GET SERVER VERSION + S CWDATA(1)="1^1^"_+$$VERSION^XPDUTL("CWMA") + Q diff --git a/p/CWMAILE.m b/p/CWMAILE.m new file mode 100644 index 0000000..aa65b97 --- /dev/null +++ b/p/CWMAILE.m @@ -0,0 +1,59 @@ +CWMAILE ;INDPLS/PLS- DELPHI VISTA MAIL SERVER CONT'D ;07-Sep-1999 14:08;PS + ;;2.1;CWMA GuiMail;;Jan 06, 1999 + Q ;ROUTINE CAN'T BE CALLED DIRECTLY + ; +GETPKPM(CWDAT) ;get package parameters and return in CWDAT + ;called by CWMAILD + ;This API uses the PRECEDENCE field of each parameter + N CWCNT,CWLP + S CWCNT=2 + S CWDAT(CWCNT)="[Sound]",CWCNT=CWCNT+1 + S CWDAT(CWCNT)="Sound="_+$$GET^XPAR("ALL","CWMA SOUND ENABLED"),CWCNT=CWCNT+1 + S CWDAT(CWCNT)="Message Open="_$$GET^XPAR("ALL","CWMA SOUND MESSAGE OPEN"),CWCNT=CWCNT+1 + S CWDAT(CWCNT)="Message Close="_$$GET^XPAR("ALL","CWMA SOUND MESSAGE CLOSE"),CWCNT=CWCNT+1 + S CWDAT(CWCNT)="New Mail="_$$GET^XPAR("ALL","CWMA SOUND NEW MAIL"),CWCNT=CWCNT+1 + S CWDAT(CWCNT)="Priority Mail="_$$GET^XPAR("ALL","CWMA SOUND PRIORITY MAIL"),CWCNT=CWCNT+1 + S CWDAT(CWCNT)="[StartUp]",CWCNT=CWCNT+1 + S CWDAT(CWCNT)="StartUpNewMail="_$$GET^XPAR("ALL","CWMA STARTUP NEW MAIL",1,"E"),CWCNT=CWCNT+1 + S CWDAT(CWCNT)="StartUpOpenMailBox="_$$GET^XPAR("ALL","CWMA STARTUP OPEN MAIL BOX",1,"E"),CWCNT=CWCNT+1 + S CWDAT(CWCNT)="StartUpOpenMailBoxName="_$$GET^XPAR("ALL","CWMA STARTUP MAIL BOX NAME"),CWCNT=CWCNT+1 + S CWDAT(CWCNT)="[General]",CWCNT=CWCNT+1 + S CWDAT(CWCNT)="CreateMessageAttributes="_$$GET^XPAR("ALL","CWMA GENERAL CMA STYLE"),CWCNT=CWCNT+1 + S CWDAT(CWCNT)="MessagePropertiesDefaultTab="_$$GET^XPAR("ALL","CWMA GENERAL MPD TAB"),CWCNT=CWCNT+1 + S CWDAT(CWCNT)="NewMailPollingFrequency="_$$GET^XPAR("ALL","CWMA GENERAL NMP FREQ"),CWCNT=CWCNT+1 + S CWDAT(CWCNT)="MessageDisplayCount="_$$GET^XPAR("ALL","CWMA GENERAL MD COUNT"),CWCNT=CWCNT+1 + S CWDAT(CWCNT)="DefaultVistaPrinter="_$$GET^XPAR("ALL","CWMA GENERAL VISTA PRT"),CWCNT=CWCNT+1 + S CWDAT(CWCNT)="DefaultPrintMode="_+$$GET^XPAR("ALL","CWMA GENERAL PRINTMODE"),CWCNT=CWCNT+1 + S CWDAT(CWCNT)="MessageDisplayColumns="_$$GETCOL,CWCNT=CWCNT+1 ;get column information + S CWDAT(CWCNT)="AllowAttachments="_$$GET^XPAR("ALL","CWMA ALLOW ATTACHMENTS",1,"E"),CWCNT=CWCNT+1 + S CWDAT(-9900)=CWCNT + Q $O(CWDAT(1)) + ; +GETCOL() ;retrieve column information for message display + N CWLP,CWDAA,CWTMP + S CWTMP="" + D GETLST^XPAR(.CWDAA,"ALL","CWMA GENERAL MD COL") + S CWLP=0 F S CWLP=$O(CWDAA(CWLP)) Q:CWLP<1 D + . S CWTMP=CWTMP_$P(CWDAA(CWLP),U,2)_";" + Q CWTMP + ; +GETPRM(CWVAR) ;lookup parameter for a given variable + ;returns set procedure|parameter + ; set procedure: 0=single instance, 1=multiple instances + Q:CWVAR="Sound" "0|CWMA SOUND ENABLED" + Q:CWVAR="Message Open" "0|CWMA SOUND MESSAGE OPEN" + Q:CWVAR="Message Close" "0|CWMA SOUND MESSAGE CLOSE" + Q:CWVAR="Priority Mail" "0|CWMA SOUND PRIORITY MAIL" + Q:CWVAR="New Mail" "0|CWMA SOUND NEW MAIL" + Q:CWVAR="StartUpNewMail" "0|CWMA STARTUP NEW MAIL" + Q:CWVAR="StartUpOpenMailBox" "0|CWMA STARTUP OPEN MAIL BOX" + Q:CWVAR="StartUpOpenMailBoxName" "0|CWMA STARTUP MAIL BOX NAME" + Q:CWVAR="CreateMessageAttributes" "0|CWMA GENERAL CMA STYLE" + Q:CWVAR="MessagePropertiesDefaultTab" "0|CWMA GENERAL MPD TAB" + Q:CWVAR="NewMailPollingFrequency" "0|CWMA GENERAL NMP FREQ" + Q:CWVAR="MessageDisplayCount" "0|CWMA GENERAL MD COUNT" + Q:CWVAR="DefaultVistaPrinter" "0|CWMA GENERAL VISTA PRT" + Q:CWVAR="DefaultPrintMode" "0|CWMA GENERAL PRINTMODE" + Q:CWVAR="MessageDisplayColumns" "1|CWMA GENERAL MD COL" + Q "" + ; diff --git a/p/CWMAILF.m b/p/CWMAILF.m new file mode 100644 index 0000000..87912e3 --- /dev/null +++ b/p/CWMAILF.m @@ -0,0 +1,75 @@ +CWMAILF ;INDPLS/PLS- DELPHI VISTA MAIL SERVER CONT'D ;02-Jul-1999 15:53;PS + ;;2.1;CWMA GuiMail;;Jan 06, 1999 + ;MODIFIED FOR XM*7.1*50 + Q ;ROUTINE CAN'T BE CALLED DIRECTLY +BLDLST(CWDATA,CWDATSRC,CWDCNT) ; build list of messages - called by CWMAILA + ;Input: CWDATA - pass by reference + ; CWDATSRC - $NA containing data + ; CWDCNT - node counter + ;Return: CWDATA array + ;CWARY format: piece value + ; 1 message basket + ; 2 message ien + ; 3 message subject + ; 4 message date sent + ; 5 not used + ; 6 message type + ; 7 confirmation flag + ; 8 closed flag + ; 9 info flag + ; 10 confidential flag + ; 11 sender ien + ; 12 broadcast flag + ; 13 sender name + ; 14 total # of recipients + ; 15 total # of replies + ; 16 priority flag + ; 17 last response read + ; 18 message basket sequence number + ; 19 new message flag + ; 20 answer message flag + ; + S CWDATA(1)="0^AN ERROR HAS OCCURRED" + N CWVAL,CWMSG,CWMSGSUB,CWMSGDT,CWMAIB,CWMSGBX,CWMSGLP + N CWARY + S CWMSG=0,CWDCNT=2,CWMSGLP=0 + ;CALL API TO RETRIEVE MESSAGES + F S CWMSGLP=$O(@CWDATSRC@(CWMSGLP)) Q:CWMSGLP<1 D + . S CWARY(1)=+$G(@CWDATSRC@(CWMSGLP,"BSKT")) + . S CWARY(2)=+$G(@CWDATSRC@(CWMSGLP)) + . S CWARY(3)=$G(@CWDATSRC@(CWMSGLP,"SUBJ")) + . S CWARY(4)=$P($G(@CWDATSRC@(CWMSGLP,"DATE")),U) + . I CWARY(4)?1.N1".".N S CWARY(4)=$$FMDTE^CWMAIL4(CWARY(4),"5MZ") + . E S CWARY(4)=$$FMDTE^CWMAIL4($$CONVERT^XMXUTIL1(CWARY(4),1),"5MZ") + . S CWARY(18)=$G(@CWDATSRC@(CWMSGLP,"SEQN")) + . S CWARY(19)=+$G(@CWDATSRC@(CWMSGLP,"NEW")) + . S CWDATA(CWDCNT)=$$ADDMP^CWMAIL0(CWARY(2),.CWARY) + . S CWDCNT=CWDCNT+1 + Q + ; +%MSGISRC(CWDATA,CWINPUT) ;SEARCH FOR A PARTICULAR MESSAGE NUMBER + ;CWINPUT - IEN of Message + N CWI,CWMIEN,CWDATT,CWDCNT + K CWDATA + S CWDCNT=2 + S CWMIEN=+$P($G(CWINPUT),";") + I $$ACCESS^XMXSEC(XMDUZ,CWMIEN) D + . D MSGINIT(CWMIEN,.CWDATT) + . D BLDLST(.CWDATA,$NA(CWDATT),.CWDCNT) + . ;S CWDATA(1)="1^^DATA HAS BEEN FOUND" + ;E S CWDATA(1)="1^^Message not found or you don't have access to it." + I $O(CWDATA(1)) S CWDATA(1)="1^^DATA HAS BEEN FOUND" + E S CWDATA(1)="1^^Message not found or you lack access to it." + S $P(CWDATA(1),U,2)=CWDCNT-2 +MSGISRCE Q + ; +MSGINIT(CWMIEN,CWDATT) ;Individual Message Pre-processor + N CWIM,CWINSTR,CWIU + D INMSG^XMXUTIL2(XMDUZ,"",CWMIEN,,,.CWIM,.CWINSTR,.CWIU) + S CWDATT(1)=CWMIEN + S CWDATT(1,"DATE")=$G(CWIM("DATE")) + S CWDATT(1,"SUBJ")=$G(CWIM("SUBJ")) + S CWDATT(1,"SEQN")="" + S CWDATT(1,"BSKT")=$$BSKT^XMXUTIL2(XMDUZ,CWMIEN,1) + S CWDATT(1,"NEW")=$G(CWIU("NEW"))>0 + Q diff --git a/p/CWMAINI.m b/p/CWMAINI.m new file mode 100644 index 0000000..2d5ede9 --- /dev/null +++ b/p/CWMAINI.m @@ -0,0 +1,64 @@ +CWMAINI ;INDPLS/PLS - KIDS INITS FOR GUIMail INSTALL ;30-Jul-1999 10:42;PS; + ;;2.1;CWMA GuiMail;;Jan 06, 1999 + ; Environment Check +EC D VCHK("RPC BROKER",1.1) ;RPC Broker + D PCHK("DI*21.0*34") ;Fileman/Delphi Components + D PCHK("XM*7.1*50") ;MailMan Patch + D PCHK("XM*7.1*73") ;MailMan Patch to $$CONVERT^XMXUTIL1 + D PCHK("XU*8.0*71") ;Kernel date formatting patch + D PCHK("XT*7.3*26") ;Kernel Tool-Kit Generic Parameters + S:$G(XPDENV) XPDDIQ("XPZ1")=0 ;force Disable Options/Protocols prompt to NO + Q +VCHK(CWP,CWV) ;CHECK VERSION OF PASSED PACKAGE + D:$$VERSION^XPDUTL(CWP)