source: WorldVistAEHR/trunk/r/ACCOUNTS_RECEIVABLE-PRCA-PRY-RC/RCXVFTR.m@ 975

Last change on this file since 975 was 613, checked in by George Lilly, 15 years ago

initial load of WorldVistAEHR

File size: 1.5 KB
RevLine 
[613]1RCXVFTR ;DAOU/ALA-Retrieve FTP messages ;17-DEC-2003
2 ;;4.5;Accounts Receivable;**201**;Mar 20, 1995
3 ;
4 ;**Program Description**
5 ; This program will read all the ftp messages to
6 ; see if they were successful or not
7 ;
8EN ; Find all temporary files
9 K ^TMP("RCXVIN",$J)
10 S CNT=0,QFL=0
11 S RCXVDIR=$P($G(^RC(342,1,20)),U,1)
12 ;
13 ; Go through and read each one
14 S RCVL=""
15 F S RCVL=$O(^TMP("RCXVMSG",$J,RCVL)) Q:RCVL="" D
16 . K ^TMP("RCXVIN",$J)
17 . ;
18 . S RCXVBTN=$P(RCVL,"_",3),RCXVBTN=$P(RCXVBTN,".",1)
19 . S Y=$$FTG^%ZISH(RCXVDIR,RCVL,$NA(^TMP("RCXVIN",$J,1,0)),3)
20 . ;
21 . I $O(^TMP("RCXVIN",$J,0))="" S ^TMP("RCXVIN",$J,1,0)="No FTP command file found for batch #"_RCXVBTN
22 . ;
23 . S RCXOKAY=0,RCXI=0
24 . F S RCXI=$O(^TMP("RCXVIN",$J,RCXI)) Q:'RCXI D
25 .. I $E($G(^TMP("RCXVIN",$J,RCXI,0)),1,3)="226" S RCXOKAY=1
26 . ;
27 . ; If the transfer does not say complete, send a mail message
28 . I 'RCXOKAY D
29 .. S RCXMGRP=$$GET1^DIQ(342,"1,",20.02,"E")
30 .. I RCXMGRP="" S RCXMGRP="IRM"
31 .. S RCXMGRP="G."_RCXMGRP
32 .. S XMDUZ="CBO DATA EXTRACT",XMY(RCXMGRP)=""
33 .. S XMSUB="CBO/ARC FTP ATTEMPT"
34 .. S XMTEXT="^TMP(""RCXVIN"",$J,"
35 .. D ^XMD
36 .. K XMDUN,XMDUZ,XMZ,XMY
37 . ;
38 . I RCXOKAY D
39 .. S RCXVUP(348.4,RCXVBTN_",",.08)=$$NOW^XLFDT()
40 .. I $P(^RCXV(RCXVBTN,0),"^",3)'="C" S RCXVUP(348.4,RCXVBTN_",",.03)="T"
41 .. D FILE^DIE("I","RCXVUP","RCXVERR")
42 ;
43 S Y=$$DEL^%ZISH(RCXVDIR,$NA(^TMP("RCXVMSG",$J)))
44 ;
45EXIT K C,CNT,RCXOKAY,RCXVUP,RCXVERR,RCXVLST,Y,RCXMGRP,RCXI,RCVL,QFL,RCXVARY,I
46 Q
47 ;
Note: See TracBrowser for help on using the repository browser.