Add blank column, rename column.
[capital-apms-progress.git] / process / bknzanz.p
blob2442c109b9563ccc8d0fb31bcc4d8033e9d2fe0b
1 &ANALYZE-SUSPEND _VERSION-NUMBER UIB_v8r12
2 &ANALYZE-RESUME
3 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _DEFINITIONS Procedure
4 /*--------------------------------------------------------------------------
5 ------------------------------------------------------------------------*/
6 DEF INPUT PARAMETER report-options AS CHAR NO-UNDO.
8 DEF VAR preview AS LOGICAL NO-UNDO.
9 DEF VAR in-file AS CHAR NO-UNDO.
10 DEF VAR create-receipts AS LOGICAL NO-UNDO.
11 RUN parse-parameters.
13 DEF VAR base-font AS CHAR NO-UNDO INITIAL "courier,fixed,cpi,22,lpi,10,normal".
14 DEF VAR header-font AS CHAR NO-UNDO INITIAL "helvetica,proportional,point,11,lpi,7,bold".
15 DEF VAR time-font AS CHAR NO-UNDO INITIAL "helvetica,proportional,point,6,lpi,9,normal".
16 DEF VAR line AS CHAR NO-UNDO.
18 DEF VAR bank-amount AS DEC NO-UNDO INITIAL 0.0 .
19 DEF VAR bank-ec AS INT NO-UNDO INITIAL ?.
20 DEF VAR bank-ac AS DEC NO-UNDO INITIAL ?.
21 DEF VAR last-prdate AS DATE NO-UNDO INITIAL ?.
23 DEF VAR user-name AS CHAR FORMAT "X(20)" NO-UNDO.
24 {inc/username.i "user-name"}
25 DEF VAR timeStamp AS CHAR FORMAT "X(54)" NO-UNDO.
26 timeStamp = STRING( TODAY, "99/99/9999") + ", " + STRING( TIME, "HH:MM:SS") + " for " + user-name.
28 DEF VAR hline2 AS CHAR NO-UNDO.
29 DEF VAR hline3 AS CHAR NO-UNDO.
30 hline2 = "Statement Processing for ANZ Online".
31 hline3 = "Presented Cheques" + (IF create-receipts THEN " and Receipts Batch Creation" ELSE "").
33 /* ensure NewBatch & NewDocument are scoped to entire program */
34 FIND FIRST NewBatch NO-LOCK NO-ERROR.
35 FIND PREV NewBatch NO-LOCK NO-ERROR.
37 {inc/ofc-this.i}
38 {inc/ofc-acct.i "DEBTORS" "sundry-debtors" "ERROR"}
39 {inc/ofc-acct.i "SUSPENSE-TENANT" "suspense-tenant-ac" "ERROR"}
40 DEF VAR suspense-tenant-ec AS INT NO-UNDO.
41 suspense-tenant-ec = OfficeControlAccount.EntityCode.
43 {inc/ofc-set.i "Receipts-Description" "receipts-description"}
45 /* _UIB-CODE-BLOCK-END */
46 &ANALYZE-RESUME
49 &ANALYZE-SUSPEND _UIB-PREPROCESSOR-BLOCK
51 /* ******************** Preprocessor Definitions ******************** */
53 &Scoped-define PROCEDURE-TYPE Procedure
57 /* _UIB-PREPROCESSOR-BLOCK-END */
58 &ANALYZE-RESUME
61 /* ************************ Function Prototypes ********************** */
63 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION-FORWARD find-tenant-code Procedure
64 FUNCTION find-tenant-code RETURNS INTEGER
65 ( INPUT t1 AS CHAR, INPUT t2 AS CHAR ) FORWARD.
67 /* _UIB-CODE-BLOCK-END */
68 &ANALYZE-RESUME
71 /* *********************** Procedure Settings ************************ */
73 &ANALYZE-SUSPEND _PROCEDURE-SETTINGS
74 /* Settings for THIS-PROCEDURE
75 Type: Procedure
76 Allow:
77 Frames: 0
78 Add Fields to: Neither
79 Other Settings: CODE-ONLY COMPILE
81 &ANALYZE-RESUME _END-PROCEDURE-SETTINGS
83 /* ************************* Create Window ************************** */
85 &ANALYZE-SUSPEND _CREATE-WINDOW
86 /* DESIGN Window definition (used by the UIB)
87 CREATE WINDOW Procedure ASSIGN
88 HEIGHT = .43
89 WIDTH = 40.29.
90 /* END WINDOW DEFINITION */
92 &ANALYZE-RESUME
96 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _INCLUDED-LIB Procedure
97 /* ************************* Included-Libraries *********************** */
99 {inc/method/m-impcsv.i}
100 {inc/method/m-txtrep.i}
102 /* _UIB-CODE-BLOCK-END */
103 &ANALYZE-RESUME
107 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _CUSTOM _MAIN-BLOCK Procedure
110 /* *************************** Main Block *************************** */
112 RUN pclrep-start( preview, "reset,landscape,tm,2,a4,lm,6," + base-font).
113 OUTPUT TO VALUE(txtrep-print-file) KEEP-MESSAGES PAGE-SIZE 0.
115 RUN present-cheques.
116 IF create-receipts THEN RUN create-bank-transaction.
118 OUTPUT CLOSE.
120 RUN pclrep-finish.
122 /* _UIB-CODE-BLOCK-END */
123 &ANALYZE-RESUME
126 /* ********************** Internal Procedures *********************** */
128 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE convert-bank-date Procedure
129 PROCEDURE convert-bank-date :
130 /*------------------------------------------------------------------------------
131 Purpose:
132 ------------------------------------------------------------------------------*/
133 DEF INPUT PARAMETER v-date AS CHAR NO-UNDO.
134 DEF OUTPUT PARAMETER i-date AS DATE NO-UNDO.
136 DEF VAR dd AS INT NO-UNDO.
137 DEF VAR mm AS INT NO-UNDO.
138 DEF VAR yy AS INT NO-UNDO.
140 ASSIGN i-date = DATE( v-date ) NO-ERROR.
141 IF i-date > (TODAY - 1000) THEN RETURN.
143 /* otherwise make sure there aren't going to be problems with the year 2000 */
144 dd = INT( ENTRY( 1, v-date, "/")).
145 mm = INT( ENTRY( 2, v-date, "/")).
146 yy = INT( ENTRY( 3, v-date, "/")).
147 IF yy < 100 THEN DO:
148 yy = yy + 1900.
149 DO WHILE yy < SESSION:YEAR-OFFSET:
150 yy = yy + 100.
151 END.
152 END.
153 i-date = DATE( mm, dd, yy).
155 END PROCEDURE.
157 /* _UIB-CODE-BLOCK-END */
158 &ANALYZE-RESUME
161 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE create-bank-transaction Procedure
162 PROCEDURE create-bank-transaction :
163 /*------------------------------------------------------------------------------
164 Purpose:
165 ------------------------------------------------------------------------------*/
167 IF NOT AVAILABLE(NewBatch) THEN RETURN.
168 IF bank-ec = ? THEN RETURN.
169 IF bank-ac = ? THEN RETURN.
170 IF last-prdate = ? THEN RETURN.
172 CREATE NewDocument.
173 NewDocument.BatchCode = NewBatch.BatchCode.
174 NewDocument.DocumentType = "RCBK".
175 NewDocument.Reference = STRING(NewBatch.BatchCode) + "/" + STRING(NewDocument.DocumentCode).
176 NewDocument.Description = "Banking Summary " + STRING(last-prdate, "99/99/9999").
178 CREATE NewAcctTrans.
179 NewAcctTrans.BatchCode = NewBatch.BatchCode.
180 NewAcctTrans.DocumentCode = NewDocument.DocumentCode.
181 NewAcctTrans.EntityType = "L".
182 NewAcctTrans.EntityCode = bank-ec.
183 NewAcctTrans.AccountCode = bank-ac.
184 NewAcctTrans.Date = last-prdate.
185 NewAcctTrans.Amount = bank-amount.
187 END PROCEDURE.
189 /* _UIB-CODE-BLOCK-END */
190 &ANALYZE-RESUME
193 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE create-receipt-transaction Procedure
194 PROCEDURE create-receipt-transaction :
195 /*------------------------------------------------------------------------------
196 Purpose:
197 ------------------------------------------------------------------------------*/
198 DEF INPUT PARAMETER bkacct AS CHAR NO-UNDO.
199 DEF INPUT PARAMETER tr-type AS CHAR NO-UNDO.
200 DEF INPUT PARAMETER indate AS CHAR NO-UNDO.
201 DEF INPUT PARAMETER text1 AS CHAR NO-UNDO.
202 DEF INPUT PARAMETER text2 AS CHAR NO-UNDO.
203 DEF INPUT PARAMETER amount AS DEC NO-UNDO.
204 DEF OUTPUT PARAMETER result AS CHAR NO-UNDO INITIAL "".
206 DEF VAR prdate AS DATE NO-UNDO.
207 DEF VAR tenant-code AS INT NO-UNDO.
208 DEF VAR tr-description AS CHAR NO-UNDO.
209 DEF VAR tr-reference AS CHAR NO-UNDO.
211 RUN convert-bank-date( indate, OUTPUT prdate ).
213 bkacct = REPLACE( bkacct, "-", "").
214 FIND FIRST BankAccount WHERE BankAccount.BankAccount = bkacct NO-LOCK NO-ERROR.
215 IF NOT AVAILABLE(BankAccount) THEN DO:
216 bkacct = SUBSTRING( bkacct, 1, 13) + "0" + SUBSTRING( bkacct, 14, 2).
217 FIND FIRST BankAccount WHERE BankAccount.BankAccount BEGINS bkacct NO-LOCK NO-ERROR.
218 IF NOT AVAILABLE(BankAccount) THEN DO:
219 result = "-->No bank account available with account code "
220 + STRING( bkacct, "XX-XXXX-XXXXXXX-XXX") .
221 RETURN.
222 END.
223 END.
225 tenant-code = find-tenant-code( text1, text2).
226 IF tenant-code = ? THEN DO:
227 tr-description = TRIM(text2) + " " + TRIM(text1).
228 tenant-code = suspense-tenant-ec.
229 END.
230 ELSE
231 tr-description = receipts-description.
233 FIND Tenant WHERE Tenant.TenantCode = tenant-code NO-LOCK NO-ERROR.
234 IF NOT AVAILABLE(Tenant) THEN DO:
235 /* should only occur if the suspense tenant doesn't exist */
236 result = "-->Tenant " + STRING(tenant-code,"99999") + " not on file.".
237 RETURN.
238 END.
240 DO TRANSACTION:
241 IF NOT AVAILABLE(NewBatch) THEN DO:
242 CREATE NewBatch.
243 NewBatch.BatchType = "NORM".
244 NewBatch.Description = "Automatic receipts " + STRING( TODAY, "99/99/9999").
246 CREATE NewDocument.
247 NewDocument.BatchCode = NewBatch.BatchCode.
248 NewDocument.DocumentType = "RCPT".
249 NewDocument.Reference = STRING(NewBatch.BatchCode) + "/" + STRING(NewDocument.DocumentCode).
250 NewDocument.Description = NewBatch.Description.
251 END.
253 CREATE NewAcctTrans.
254 NewAcctTrans.BatchCode = NewBatch.BatchCode.
255 NewAcctTrans.DocumentCode = NewDocument.DocumentCode.
256 NewAcctTrans.EntityType = "T".
257 NewAcctTrans.EntityCode = tenant-code.
258 NewAcctTrans.AccountCode = sundry-debtors.
259 NewAcctTrans.Date = prdate.
260 NewAcctTrans.Amount = amount.
261 NewAcctTrans.Reference = STRING(NewBatch.BatchCode) + "/" + STRING(NewDocument.DocumentCode) + "/" + STRING(NewAcctTrans.TransactionCode).
262 NewAcctTrans.Description = tr-description.
264 RUN match-exception(tr-type, text2, text1, OUTPUT result).
265 END.
266 last-prdate = prdate.
267 bank-ec = BankAccount.CompanyCode.
268 bank-ac = BankAccount.AccountCode.
269 bank-amount = bank-amount + amount.
271 IF result = "" THEN
272 result = "Receipt from " + STRING( Tenant.Name, "X(30)") + " "
273 + "T" + STRING( Tenant.TenantCode, "99999") + "/" + Tenant.EntityType + STRING( Tenant.EntityCode, "99999").
275 RETURN.
277 END PROCEDURE.
279 /* _UIB-CODE-BLOCK-END */
280 &ANALYZE-RESUME
283 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE inst-page-header Procedure
284 PROCEDURE inst-page-header :
285 /*------------------------------------------------------------------------------
286 Purpose:
287 ------------------------------------------------------------------------------*/
288 RUN pclrep-line( time-font, timeStamp + CHR(13) + FILL(" ",350) + "Page " + STRING(pclrep-page-number)).
289 RUN pclrep-down-by(1).
290 RUN pclrep-line( header-font, hline2).
291 RUN pclrep-line( header-font, hline3).
292 RUN pclrep-down-by(0.5).
293 RUN pclrep-line( base-font, " Date Account Number Type Cheque Reference Name of Other Party Amount || Import Program Action taken").
294 RUN pclrep-down-by(0.3).
296 END PROCEDURE.
298 /* _UIB-CODE-BLOCK-END */
299 &ANALYZE-RESUME
302 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE mark-as-presented Procedure
303 PROCEDURE mark-as-presented :
304 /*------------------------------------------------------------------------------
305 Purpose:
306 ------------------------------------------------------------------------------*/
307 DEF INPUT PARAMETER bkacct AS CHAR NO-UNDO.
308 DEF INPUT PARAMETER chqnum AS INT NO-UNDO.
309 DEF INPUT PARAMETER indate AS CHAR NO-UNDO.
310 DEF INPUT PARAMETER amount AS DEC NO-UNDO.
311 DEF OUTPUT PARAMETER result AS CHAR NO-UNDO INITIAL "".
313 DEF VAR cheque-no AS INT NO-UNDO.
314 DEF VAR prdate AS DATE NO-UNDO.
316 RUN convert-bank-date( indate, OUTPUT prdate ).
318 bkacct = REPLACE( bkacct, "-", "").
319 FIND FIRST BankAccount WHERE BankAccount.BankAccount = bkacct NO-LOCK NO-ERROR.
320 IF NOT AVAILABLE(BankAccount) THEN DO:
321 bkacct = SUBSTRING( bkacct, 1, 13) + "0" + SUBSTRING( bkacct, 14, 2).
322 FIND FIRST BankAccount WHERE BankAccount.BankAccount BEGINS bkacct NO-LOCK NO-ERROR.
323 IF NOT AVAILABLE(BankAccount) THEN DO:
324 result = "-->No bank account available with account code "
325 + STRING( bkacct, "XX-XXXX-XXXXXXX-XXX") .
326 RETURN.
327 END.
328 END.
330 cheque-no = INTEGER( chqnum ).
331 FIND Cheque WHERE Cheque.BankAccountCode = BankAccount.BankAccountCode
332 AND Cheque.ChequeNo = cheque-no EXCLUSIVE-LOCK NO-ERROR.
333 IF NOT AVAILABLE(Cheque) THEN DO:
334 result = "-->Cheque" + STRING(cheque-no,">999999")
335 + " presented for " + TRIM(STRING( amount, ">>>,>>>,>>9.99"))
336 + " but no record of issue - ignored!".
337 RETURN.
338 END.
340 IF amount <> Cheque.Amount THEN DO:
341 result = "-->Cheque" + STRING(cheque-no,">999999") + " issued for " + TRIM(STRING( Cheque.Amount, ">>>,>>>,>>9.99"))
342 + " but presented for " + TRIM(STRING( amount, ">>>,>>>,>>9.99")).
343 MESSAGE result SKIP(1)
344 "Cheque not marked as presented!"
345 VIEW-AS ALERT-BOX WARNING TITLE "Error in presented amount!".
346 RETURN.
347 END.
349 ASSIGN Cheque.DatePresented = prdate
350 Cheque.PresentedAmount = amount.
352 result = "Cheque record updated".
354 END PROCEDURE.
356 /* _UIB-CODE-BLOCK-END */
357 &ANALYZE-RESUME
360 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE match-exception Procedure
361 PROCEDURE match-exception :
362 /*------------------------------------------------------------------------------
363 Purpose:
364 ------------------------------------------------------------------------------*/
365 DEF INPUT PARAMETER trn-type AS CHAR NO-UNDO.
366 DEF INPUT PARAMETER other-party AS CHAR NO-UNDO.
367 DEF INPUT PARAMETER ref-text AS CHAR NO-UNDO.
368 DEF OUTPUT PARAMETER result AS CHAR NO-UNDO.
370 FOR EACH BankImportException WHERE BankAccount.BankAccountCode = BankImportException.BankAccountCode NO-LOCK:
371 IF trn-type MATCHES BankImportException.TrnType
372 AND other-party MATCHES BankImportException.Match1
373 AND ref-text MATCHES BankImportException.Match2
374 THEN DO:
375 IF BankImport.EntityType = ? OR BankImportException.EntityCode = ?
376 OR BankImportException.AccountCode = ? THEN DO:
377 DELETE NewAcctTrans.
378 result = "skipped - no transaction created.".
379 END.
380 NewAcctTrans.EntityType = BankImportException.EntityType .
381 NewAcctTrans.EntityCode = BankImportException.EntityCode .
382 NewAcctTrans.AccountCode = BankImportException.AccountCode .
383 NewAcctTrans.Description = BankImportException.Description.
384 IF NewAcctTrans.Description = ? OR TRIM(NewAcctTrans.Description) = "" THEN
385 NewAcctTrans.Description = receipts-description.
387 result = "Matched exception to " + BankImportException.EntityType + STRING(BankImportException.EntityCode, "99999")
388 + "/" + STRING(BankImportException.AccountCode,"9999.99")
389 + " - " + BankImportException.Description.
390 RETURN.
391 END.
392 END.
394 END PROCEDURE.
396 /* _UIB-CODE-BLOCK-END */
397 &ANALYZE-RESUME
400 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE parse-parameters Procedure
401 PROCEDURE parse-parameters :
402 /*------------------------------------------------------------------------------
403 Purpose:
404 ------------------------------------------------------------------------------*/
405 DEF VAR token AS CHAR NO-UNDO.
406 DEF VAR i AS INT NO-UNDO.
408 {inc/showopts.i "report-options"}
410 DO i = 1 TO NUM-ENTRIES( report-options, "~n" ):
411 token = ENTRY( i, report-options, "~n" ).
413 CASE ENTRY( 1, token ):
414 WHEN "Preview" THEN preview = Yes.
415 WHEN "CreateReceipts" THEN create-receipts = Yes.
416 WHEN "FileName" THEN in-file = SUBSTRING( token, INDEX(token,",") + 1).
417 END CASE.
419 END.
421 END PROCEDURE.
423 /* _UIB-CODE-BLOCK-END */
424 &ANALYZE-RESUME
427 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _PROCEDURE present-cheques Procedure
428 PROCEDURE present-cheques :
429 /*------------------------------------------------------------------------------
430 Purpose: Mark cheques in BNZ export file as presented.
431 ------------------------------------------------------------------------------*/
432 DEF VAR bk-acct AS CHAR NO-UNDO.
433 DEF VAR tr-amnt AS DEC NO-UNDO. /* amount */
434 DEF VAR tr-cheque AS DEC NO-UNDO. /* cheque no */
435 DEF VAR tr-type AS INT NO-UNDO.
436 DEF VAR tr-type2 AS CHAR NO-UNDO.
437 DEF VAR tr-date AS CHAR NO-UNDO. /* date presented */
439 DEF VAR tr-text AS CHAR NO-UNDO.
440 DEF VAR tr-payee AS CHAR NO-UNDO.
441 DEF VAR in-line AS CHAR NO-UNDO.
442 DEF VAR i AS INT NO-UNDO.
443 DEF VAR pos AS INT NO-UNDO.
444 DEF VAR result AS CHAR NO-UNDO.
446 INPUT FROM VALUE( in-file ).
447 REPEAT:
448 csv-clear-fields().
449 IF csv-import-line() = ? THEN LEAVE. /* file processed */
450 IF LENGTH( csv-get-field(1) ) > 3 THEN NEXT.
452 tr-type = to-number( csv-get-field(1) ).
453 IF tr-type <> 3 THEN NEXT.
455 /* We ignore field 2 (corporate ID) */
456 bk-acct = csv-get-field(3).
457 tr-amnt = to-number( csv-get-field(4)).
458 ASSIGN tr-cheque = to-number( csv-get-field(5) ) NO-ERROR.
459 /* IF tr-cheque > 9999999 OR tr-cheque = 0 THEN tr-cheque = 0. */
460 tr-type = to-number( csv-get-field(6) ).
461 tr-type2 = csv-get-field(7).
463 tr-text = STRING( csv-get-field(8), "X(12)") + STRING( csv-get-field(9), "X(12)") + csv-get-field(10).
464 tr-payee = csv-get-field(11).
465 tr-date = csv-get-field(12).
467 line = STRING( tr-date, "X(11)")
468 + STRING( bk-acct, "X(20)")
469 + STRING( tr-type, ">>9") + " "
470 + STRING( tr-type2, "X(3)")
471 + (IF tr-cheque > 0 AND tr-cheque <= 9999999.0 THEN STRING( tr-cheque, ">999999") ELSE FILL(" ",7)) + " "
472 + STRING( tr-text, "X(37)")
473 + STRING( tr-payee, "X(21)")
474 + STRING( tr-amnt, ">>>,>>>,>>9.99CR")
475 + " || ".
477 IF LOOKUP( tr-type2, "AP,DC,ET,DD") > 0 AND create-receipts THEN
478 RUN create-receipt-transaction( bk-acct, tr-type2, tr-date, tr-text, tr-payee, tr-amnt, OUTPUT result ).
479 ELSE IF tr-cheque > 0 AND tr-cheque <= 9999999
480 AND tr-amnt < 0 AND tr-type2 <> "DD" THEN
481 RUN mark-as-presented( bk-acct, tr-cheque, tr-date, - tr-amnt, OUTPUT result ) .
482 ELSE IF create-receipts THEN /* treat as if receipt anyway */
483 RUN create-receipt-transaction( bk-acct, tr-type2, tr-date, tr-text, tr-payee, tr-amnt, OUTPUT result ).
484 ELSE
485 result = "No action taken".
487 RUN pclrep-line( base-font, line + result).
488 END.
489 INPUT CLOSE.
491 END PROCEDURE.
493 /* _UIB-CODE-BLOCK-END */
494 &ANALYZE-RESUME
497 /* ************************ Function Implementations ***************** */
499 &ANALYZE-SUSPEND _UIB-CODE-BLOCK _FUNCTION find-tenant-code Procedure
500 FUNCTION find-tenant-code RETURNS INTEGER
501 ( INPUT t1 AS CHAR, INPUT t2 AS CHAR ) :
502 /*------------------------------------------------------------------------------
503 Purpose: Figure the tenant code from bank statement references
504 ------------------------------------------------------------------------------*/
505 DEF VAR pos AS INT NO-UNDO.
506 DEF VAR tc AS INT NO-UNDO INITIAL ?.
508 t1 = TRIM(t1).
509 pos = R-INDEX( t1, "T").
510 IF pos > (LENGTH(t1) - 7) THEN tc = to-number( SUBSTRING(t1, pos + 1) ).
511 FIND Tenant WHERE Tenant.TenantCode = tc NO-LOCK NO-ERROR.
512 IF NOT AVAILABLE(Tenant) THEN tc = ?.
513 IF tc <> ? THEN RETURN tc.
515 pos = R-INDEX( t1, " ").
516 IF pos > (LENGTH(t1) - 6) AND pos < (LENGTH(t1) - 4) THEN tc = to-number( SUBSTRING(t1, pos + 1) ).
518 FIND Tenant WHERE Tenant.TenantCode = tc NO-LOCK NO-ERROR.
519 IF NOT AVAILABLE(Tenant) THEN tc = ?.
521 RETURN tc.
523 END FUNCTION.
525 /* _UIB-CODE-BLOCK-END */
526 &ANALYZE-RESUME