Produced by Araxis Merge on 9/24/2019 1:37:49 PM Eastern Daylight Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.
| # | Location | File | Last Modified |
|---|---|---|---|
| 1 | PCL-5_v1_build_8.zip\v1_build 8\Unredacted\spp_mha_web-development.zip\spp_mha_web-development\Delphi\IAT | uMHA7_Editor_DM.pas | Wed Jul 31 17:35:31 2019 UTC |
| 2 | PCL-5_v1_build_8.zip\v1_build 8\Unredacted\spp_mha_web-development.zip\spp_mha_web-development\Delphi\IAT | uMHA7_Editor_DM.pas | Mon Sep 23 16:06:49 2019 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 3 | 666 |
| Changed | 2 | 8 |
| Inserted | 0 | 0 |
| Removed | 0 | 0 |
| Whitespace | |
|---|---|
| Character case | Differences in character case are significant |
| Line endings | Differences in line endings (CR and LF characters) are ignored |
| CR/LF characters | Not shown in the comparison detail |
No regular expressions were active.
| 1 | unit uMHA7 _Editor_DM ; | |
| 2 | ||
| 3 | interface | |
| 4 | ||
| 5 | uses | |
| 6 | Windows, | |
| 7 | SysUtils , | |
| 8 | Classes, | |
| 9 | Graphics , | |
| 10 | Controls , | |
| 11 | Forms, | |
| 12 | fIA_Dial ogs, | |
| 13 | Dialogs, | |
| 14 | StBase, | |
| 15 | Trpcb, | |
| 16 | Fmcmpnts , | |
| 17 | StdCtrls , | |
| 18 | Messages , | |
| 19 | StGenLog , | |
| 20 | RPCConf1 , | |
| 21 | Diaccess , | |
| 22 | ExtCtrls ; | |
| 23 | ||
| 24 | type | |
| 25 | ||
| 26 | TDataMod uleEdit = class(TDat aModule) | |
| 27 | FMList er1: TFMLi ster; | |
| 28 | RPCBro ker1: TRPC Broker; | |
| 29 | ||
| 30 | private | |
| 31 | { Priv ate declar ations } | |
| 32 | ||
| 33 | public | |
| 34 | { Publ ic declara tions } | |
| 35 | functi on Connect ToVista(Se nder: TObj ect): BOOL EAN; | |
| 36 | functi on DeleteR ecord(aFil eNum, aIEN : string): string; | |
| 37 | functi on DeleteS ection(QID : string): string; | |
| 38 | end; | |
| 39 | ||
| 40 | var | |
| 41 | DataModu leEdit : TDataMod uleEdit; | |
| 42 | ||
| 43 | implementa tion | |
| 44 | ||
| 45 | {$R *.DFM} | |
| 46 | uses | |
| 47 | uMHA7_Ed itor_Const , | |
| 48 | uMHA7_Ed itor_Local Files, | |
| 49 | uIA_Util s; | |
| 50 | ||
| 51 | ||
| 52 | function T DataModule Edit.Conne ctToVista( Sender: TO bject): BO OLEAN; | |
| 53 | var | |
| 54 | ServerSt r, PortStr : string; | |
| 55 | begin | |
| 56 | Result : = False; | |
| 57 | ||
| 58 | with Rpc Broker1 do | |
| 59 | begin | |
| 60 | ||
| 61 | Kern elLogin := true; | |
| 62 | IsBa ckwardComp atibleConn ection := true; | |
| 63 | OldC onnectionO nly := fal se; | |
| 64 | ||
| 65 | Debu gMode := F alse; | |
| 66 | Serv er := ''; | |
| 67 | gvBr okerName : = ''; | |
| 68 | List enerPort : = 9200; // default | |
| 69 | ||
| 70 | // RPCBroker1 .Server := ' U R
|
|
| 71 | // RPCBroker1 .ListenerP ort := PORT | |
| 72 | ||
| 73 | // RPCBroker1 .Server := ' IP '; // SLC Test Acct | |
| 74 | // RPCBroker1 .ListenerP ort := PORT ; | |
| 75 | ||
| 76 | if ( ParamCount > 1) then | |
| 77 | be gin | |
| 78 | //Get serv er and por t from com mand line | |
| 79 | Server := Piece(Para mStr(1), ' =', 2); | |
| 80 | ListenerPo rt := StrT oIntDef(Pi ece(ParamS tr(2), '=' , 2), 9200 ); | |
| 81 | try | |
| 82 | Connecte d := True; | |
| 83 | ||
| 84 | if not C reateConte xt('YS BRO KER1') the n | |
| 85 | begin | |
| 86 | Show Message('R PC Broker context (Y S BROKER1) could not be create d.'); | |
| 87 | Exit ; | |
| 88 | end; | |
| 89 | except | |
| 90 | on e: Ex ception do | |
| 91 | begin | |
| 92 | Show Message('E rror: ' + e.Message) ; | |
| 93 | Exit ; | |
| 94 | end; | |
| 95 | end; | |
| 96 | Result := True; | |
| 97 | Exit; | |
| 98 | en d; | |
| 99 | ||
| 100 | // C ommand lin e not used to identi fy broker server | |
| 101 | ||
| 102 | if G etServerIn fo(ServerS tr, PortSt r) <> mrCa ncel then | |
| 103 | be gin | |
| 104 | if (Server Str = '') then //Inv alid serve r | |
| 105 | Exit; | |
| 106 | ||
| 107 | gvBrokerNa me := Serv erStr; | |
| 108 | Server := ServerStr; | |
| 109 | ListenerPo rt := StrT oInt(PortS tr); | |
| 110 | en d | |
| 111 | else | |
| 112 | ex it; | |
| 113 | ||
| 114 | Clea rParameter s := True; | |
| 115 | ||
| 116 | try | |
| 117 | Co nnected := True; | |
| 118 | ||
| 119 | if not Creat eContext(' YS BROKER1 ') then | |
| 120 | begin | |
| 121 | ShowMess age('RPC B roker cont ext (YS BR OKER1) cou ld not be created.') ; | |
| 122 | Exit; | |
| 123 | end; | |
| 124 | exce pt | |
| 125 | on e: Except ion do | |
| 126 | begin | |
| 127 | ShowMess age('Error : ' + e.Me ssage); | |
| 128 | Exit; | |
| 129 | end; | |
| 130 | end; | |
| 131 | end; / / with RPC broker | |
| 132 | Result : = True; | |
| 133 | ||
| 134 | end; | |
| 135 | ||
| 136 | ||
| 137 | function T DataModule Edit.Delet eRecord(aF ileNum, aI EN: string ): string; | |
| 138 | var | |
| 139 | j : integer; | |
| 140 | begin | |
| 141 | ||
| 142 | if aIEN = '' then | |
| 143 | begin | |
| 144 | Resu lt := 'Err or: No IEN .'; | |
| 145 | Exit ; | |
| 146 | end; | |
| 147 | ||
| 148 | if aFile Num = '' t hen | |
| 149 | begin | |
| 150 | Resu lt := 'Err or: No fil e specifie d.'; | |
| 151 | Exit ; | |
| 152 | end; | |
| 153 | ||
| 154 | with Dat aModuleEdi t.RPCBroke r1 do | |
| 155 | begin | |
| 156 | (* | |
| 157 | Clea rParameter s := True; | |
| 158 | ClearRes ults := Tr ue; | |
| 159 | CreateC ontext('YS BROKER1') ; | |
| 160 | RemotePr ocedure := 'DDR DELE TE ENTRY'; | |
| 161 | ||
| 162 | with Par am[0] do | |
| 163 | begin | |
| 164 | PType := list; | |
| 165 | Mult[' "FILE"'] : = aFileNum ; | |
| 166 | Mult[' "IENS"'] : = aIEN; | |
| 167 | end; //w ith DataMo dule1... | |
| 168 | ||
| 169 | Call; *) | |
| 170 | ||
| 171 | Clea rParameter s := True; | |
| 172 | Clea rResults : = True; | |
| 173 | Crea teContext( 'YS BROKER 1'); | |
| 174 | Loca lFiles.Upd ateAPILog( 'Call to Y TQ SAVE to delete re cord by ' + | |
| 175 | 'i nserting @ in field .01 for: ' + aIEN + ' in file ' + aFileN um); | |
| 176 | Remo teProcedur e := 'YTQ SAVE'; | |
| 177 | Para m[0].Mult[ '"FILEN"'] := aFileN um; | |
| 178 | Para m[0].Mult[ '"IEN"'] : = aIEN; | |
| 179 | Para m[0].Mult[ '"1"'] := '.01^@'; | |
| 180 | Para m[0].PType := List; | |
| 181 | ||
| 182 | try | |
| 183 | Ca ll; | |
| 184 | ||
| 185 | exce pt | |
| 186 | on E: EBroke rError do | |
| 187 | begin | |
| 188 | LocalFil es.UpdateA PILog('Cal l to YTQ S AVE: Error '); | |
| 189 | LocalFil es.UpdateA PILog(' ' + 'Broke r Error: ' + E.messa ge); | |
| 190 | exit; | |
| 191 | end; | |
| 192 | on E: EAcces sViolation do | |
| 193 | begin | |
| 194 | LocalFil es.UpdateA PILog('Cal l to YTQ S AVE: Error '); | |
| 195 | LocalFil es.UpdateA PILog(' ' + 'Acces s Violatio n: ' + E.m essage); | |
| 196 | exit; | |
| 197 | end; | |
| 198 | end; // try | |
| 199 | ||
| 200 | if r esults[0] = '[ERROR] ' then | |
| 201 | be gin | |
| 202 | result := 'ERROR: YT Q SAVE, DE LETE RECOR D FAILED ' + results [1]; | |
| 203 | LocalFiles .UpdateAPI Log('Call to YTQ SAV E, DELETE RECORD FAI LED'); | |
| 204 | for j := 0 to Result s.Count - 1 do | |
| 205 | LocalFil es.UpdateA PILog(' ' + Result s[j]); | |
| 206 | en d | |
| 207 | else | |
| 208 | be gin | |
| 209 | LocalFiles .UpdateAPI Log('Call to YTQ SAV E, DELETE RECORD: Su ccessful') ; | |
| 210 | Result := 'OK'; //Wh en success ful this i s returned : | |
| 211 | en d; | |
| 212 | end; | |
| 213 | end; | |
| 214 | ||
| 215 | ||
| 216 | function T DataModule Edit.Delet eSection(Q ID: string ): string; | |
| 217 | // There a re several versions of section s for a gi ven Questi on ID | |
| 218 | var | |
| 219 | i, j : Integer; | |
| 220 | TempStr : string; | |
| 221 | TempDele teList, | |
| 222 | TempSt rList : TStringL ist; | |
| 223 | begin | |
| 224 | TempStrL ist := TSt ringList.C reate; | |
| 225 | TempDele teList := TStringLis t.Create; | |
| 226 | ||
| 227 | with Dat aModuleEdi t.RPCBroke r1 do | |
| 228 | begin | |
| 229 | ||
| 230 | Clea rParameter s := True; | |
| 231 | Clea rResults : = True; | |
| 232 | Crea teContext( 'YS BROKER 1'); | |
| 233 | Loca lFiles.Upd ateAPILog( 'Call to Y TQ GENERIC LISTER to remove se ctions in ' + '601.8 1.'); | |
| 234 | Remo teProcedur e := 'YTQ GENERIC LI STER'; | |
| 235 | Para m[0].Mult[ '"FILEN"'] := '601.8 1'; | |
| 236 | Para m[0].Mult[ '"FIELD"'] := '.01'; | |
| 237 | Para m[0].Mult[ '"FIELD"'] := '2'; | |
| 238 | Para m[0].Mult[ '"NUMBER"' ] := '5000 '; | |
| 239 | Para m[0].Mult[ '"FLAG"'] := 'I'; | |
| 240 | Para m[0].PType := List; | |
| 241 | ||
| 242 | try | |
| 243 | Ca ll; | |
| 244 | ||
| 245 | exce pt | |
| 246 | on E: EBroke rError do | |
| 247 | begin | |
| 248 | LocalFil es.UpdateA PILog('Cal l to YTQ G ENERIC LIS TER: Error '); | |
| 249 | LocalFil es.UpdateA PILog(' ' + 'Broke r Error: ' + E.messa ge); | |
| 250 | exit; | |
| 251 | end; | |
| 252 | on E: EAcces sViolation do | |
| 253 | begin | |
| 254 | LocalFil es.UpdateA PILog('Cal l to YTQ G ENERIC LIS TER: Error '); | |
| 255 | LocalFil es.UpdateA PILog(' ' + 'Acces s Violatio n: ' + E.m essage); | |
| 256 | exit; | |
| 257 | end; | |
| 258 | end; // try | |
| 259 | ||
| 260 | if R esults.Cou nt < 3 the n | |
| 261 | be gin | |
| 262 | LocalFiles .UpdateAPI Log('Call to YTQ GEN ERIC LISTE R: No sect ions.'); | |
| 263 | TempStrLis t.Free; | |
| 264 | exit; | |
| 265 | en d; | |
| 266 | ||
| 267 | for i := 2 to Results.Co unt - 1 do | |
| 268 | Te mpStrList. Add(Result s[i]); | |
| 269 | ||
| 270 | for i := 0 to TempStrLis t.Count - 1 do | |
| 271 | be gin | |
| 272 | TempStr := Piece(Tem pStrList[i ], U, 2); | |
| 273 | if TempStr = QID the n | |
| 274 | TempDele teList.Add (Piece(Tem pStrList[i ], U, 1)); | |
| 275 | en d; // for i | |
| 276 | ||
| 277 | Temp StrList.Fr ee; | |
| 278 | ||
| 279 | // if TempDel eteList.Co unt = 0 th en | |
| 280 | // begin | |
| 281 | // TempDe leteList.F ree; | |
| 282 | // Exit; | |
| 283 | // end; | |
| 284 | ||
| 285 | for i := 0 to TempDelete List.Count - 1 do | |
| 286 | be gin | |
| 287 | ||
| 288 | ClearParam eters := T rue; | |
| 289 | ClearResul ts := True ; | |
| 290 | RemoteProc edure := ' YTQ SAVE'; | |
| 291 | LocalFiles .UpdateAPI Log('Call to YTQ SAV E: Set sec tion in 60 1.81 to @ ' + | |
| 292 | TempDele teList[i]) ; | |
| 293 | Param[0].M ult['"FILE N"'] := '6 01.81'; | |
| 294 | Param[0].M ult['"IEN" '] := Temp DeleteList [i]; | |
| 295 | Param[0].M ult['"1"'] := '.01^@ '; | |
| 296 | Param[0].P Type := Li st; | |
| 297 | try | |
| 298 | Call; | |
| 299 | ||
| 300 | except | |
| 301 | on E: EB rokerError do | |
| 302 | begin | |
| 303 | Loca lFiles.Upd ateAPILog( 'Call to Y TQ SAVE: E rror '); | |
| 304 | Loca lFiles.Upd ateAPILog( ' ' + 'B roker Erro r: ' + E.m essage); | |
| 305 | exit ; | |
| 306 | end; | |
| 307 | on E: EA ccessViola tion do | |
| 308 | begin | |
| 309 | Loca lFiles.Upd ateAPILog( 'Call to Y TQ SAVE: E rror '); | |
| 310 | Loca lFiles.Upd ateAPILog( ' ' + 'A ccess Viol ation: ' + E.message ); | |
| 311 | exit ; | |
| 312 | end; | |
| 313 | end; // tr y | |
| 314 | ||
| 315 | if results [0] = '[ER ROR]' then | |
| 316 | begin | |
| 317 | result := 'ERROR : YTQ SAVE , DELETE R ECORD FAIL ED ' + #13 + | |
| 318 | resu lts[1]; | |
| 319 | LocalF iles.Updat eAPILog('C all to YTQ SAVE: Err or'); | |
| 320 | for j := 0 to Re sults.Coun t - 1 do | |
| 321 | Loca lFiles.Upd ateAPILog( ' ' + Re sults[j]); | |
| 322 | Exit; | |
| 323 | end | |
| 324 | else | |
| 325 | begin | |
| 326 | LocalF iles.Updat eAPILog('C all to YTQ SAVE: Suc cessful'); | |
| 327 | Result := 'OK'; //When suc cessful th is is retu rned: | |
| 328 | end; | |
| 329 | en d; | |
| 330 | ||
| 331 | Temp DeleteList .Free; | |
| 332 | ||
| 333 | end; / /with Data ModuleEdit .RPCBroker 1... | |
| 334 | end; | |
| 335 | ||
| 336 | end. | |
| 337 |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.