Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: RCXVFTR

RCXVFTR.m

Go to the documentation of this file.
  1. RCXVFTR ;DAOU/ALA-Retrieve FTP messages ;17-DEC-2003
  1. ;;4.5;Accounts Receivable;**201,395**;Mar 20, 1995;Build 9
  1. ;Per VA Directive 6402, this routine should not be modified.
  1. ;**Program Description**
  1. ; This program will read all the ftp messages to
  1. ; see if they were successful or not
  1. ;
  1. EN ; Find all temporary files
  1. K ^TMP("RCXVIN",$J)
  1. S CNT=0,QFL=0
  1. S RCXVDIR=$P($G(^RC(342,1,20)),U,1)
  1. ;
  1. ; Go through and read each one
  1. S RCVL=""
  1. F S RCVL=$O(^TMP("RCXVMSG",$J,RCVL)) Q:RCVL="" D
  1. . K ^TMP("RCXVIN",$J)
  1. . ;
  1. . S RCXVBTN=$P(RCVL,"_",3),RCXVBTN=$P(RCXVBTN,".",1)
  1. . S Y=$$FTG^%ZISH(RCXVDIR,RCVL,$NA(^TMP("RCXVIN",$J,1,0)),3)
  1. . ;
  1. . I $O(^TMP("RCXVIN",$J,0))="" S ^TMP("RCXVIN",$J,1,0)="No FTP command file found for batch #"_RCXVBTN
  1. . ;
  1. . S RCXOKAY=0,RCXI=0
  1. . F S RCXI=$O(^TMP("RCXVIN",$J,RCXI)) Q:'RCXI D
  1. .. I $E($G(^TMP("RCXVIN",$J,RCXI,0)),1,4)="SFTP" S ^TMP("RCXVIN",$J,1,0)="SFTP failed for batch #"_RCXVBTN
  1. .. I $E($G(^TMP("RCXVIN",$J,RCXI,0)),1,3)="226" S RCXOKAY=1
  1. . ;
  1. . ; If the transfer does not say complete, send a mail message
  1. . I 'RCXOKAY D
  1. .. S RCXMGRP=$$GET1^DIQ(342,"1,",20.02,"E")
  1. .. I RCXMGRP="" S RCXMGRP="IRM"
  1. .. S RCXMGRP="G."_RCXMGRP
  1. .. S XMDUZ="CBO DATA EXTRACT",XMY(RCXMGRP)=""
  1. .. S XMSUB="CBO/ARC TRANSMISSION ATTEMPT"
  1. .. S XMTEXT="^TMP(""RCXVIN"",$J,"
  1. .. D ^XMD
  1. .. K XMDUN,XMDUZ,XMZ,XMY
  1. . ;
  1. . I RCXOKAY D
  1. .. S RCXVUP(348.4,RCXVBTN_",",.08)=$$NOW^XLFDT()
  1. .. I $P(^RCXV(RCXVBTN,0),"^",3)'="C" S RCXVUP(348.4,RCXVBTN_",",.03)="T"
  1. .. D FILE^DIE("I","RCXVUP","RCXVERR")
  1. ;
  1. S Y=$$DEL^%ZISH(RCXVDIR,$NA(^TMP("RCXVMSG",$J)))
  1. ;
  1. EXIT K C,CNT,RCXOKAY,RCXVUP,RCXVERR,RCXVLST,Y,RCXMGRP,RCXI,RCVL,QFL,RCXVARY,I
  1. Q
  1. ;