1 | RCXVCHK ;DAOU/ALA-Check for bad records ;26-DEC-2004
|
---|
2 | ;;4.5;Accounts Receivable;**227**;Mar 20, 1995
|
---|
3 | ;
|
---|
4 | ;**Program Description**
|
---|
5 | ; This program checks for records in the queue which
|
---|
6 | ; does not have a bill number
|
---|
7 | ;
|
---|
8 | EN ; Entry point
|
---|
9 | K ^TMP("RCXVBREC",$J)
|
---|
10 | S ^TMP("RCXVBREC",$J,0)=0
|
---|
11 | S BTN=0
|
---|
12 | BT S BTN=$O(^RCXV(BTN)) G EXIT:'BTN
|
---|
13 | S BIL=0
|
---|
14 | BL S BIL=$O(^RCXV(BTN,1,BIL)) G BT:'BIL
|
---|
15 | I $P($G(^PRCA(430,BIL,0)),"^",1)="" D
|
---|
16 | . NEW CT
|
---|
17 | . S CT=$G(^TMP("RCXVBREC",$J,0))+1,^TMP("RCXVBREC",$J,0)=CT
|
---|
18 | . S ^TMP("RCXVBREC",$J,CT,0)="Bill IEN: "_BIL_" does not have a Bill Number in File #430."
|
---|
19 | . S DA(1)=BTN,DA=BIL
|
---|
20 | . S DIK="^RCXV("_DA(1)_",1,"
|
---|
21 | . D ^DIK
|
---|
22 | . S $P(^RCXV(BTN,0),"^",7)=$P(^RCXV(BTN,0),"^",7)-1
|
---|
23 | G BL
|
---|
24 | ;
|
---|
25 | EXIT K BTN,BIL,DA,DIK,RCXMGRP
|
---|
26 | Q
|
---|
27 | ;
|
---|
28 | MSG ; Send mail message about bad record
|
---|
29 | I $G(^TMP("RCXVBREC",$J,0))=""!($G(^TMP("RCXVBREC",$J,0))=0) Q
|
---|
30 | S RCXMGRP=$$GET1^DIQ(342,"1,",20.02,"E")
|
---|
31 | I RCXMGRP="" S RCXMGRP="IRM"
|
---|
32 | S RCXMGRP="G."_RCXMGRP
|
---|
33 | S XMDUZ="CBO DATA EXTRACT",XMY(RCXMGRP)=""
|
---|
34 | S XMSUB="BAD RECORD(S) FOUND"
|
---|
35 | S XMTEXT="^TMP(""RCXVBREC"",$J,"
|
---|
36 | D ^XMD
|
---|
37 | K XMDUN,XMDUZ,XMZ,XMY,XMSUB,XMTEXT
|
---|
38 | Q
|
---|