source: WorldVistAEHR/trunk/r/ACCOUNTS_RECEIVABLE-PRCA-PRY-RC/RCXVFTP.m@ 701

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

revised back to 6/30/08 version

File size: 1.6 KB
RevLine 
[623]1RCXVFTP ;DAOU/ALA-FTP AR Data Extract Batch Files ;08-SEP-03
2 ;;4.5;Accounts Receivable;**201**;Mar 20, 1995
3 ;
4 ;**Program Description**
5 ; This code will ftp a batch file
6 ;
7EN(FILE,DIREC) ;
8 ; Input Parameter
9 ; FILE = Filename
10 ; DIREC = Directory
11 S RCXVPTH=$S($G(DIREC)'="":DIREC,1:RCXVDIR)
12 ;
13SYS ; Get system type
14 S RCXVSYS=$$VERSION^%ZOSV(1)
15 I RCXVSYS["DSM" S RCXVSYS="VMS",RCXVSYT="DSM"
16 I RCXVSYS["MSM" D
17 . I RCXVSYS["NT"!(RCXVSYS["PC") S RCXVSYS="MSM",RCXVSYT="MSM" Q
18 . E S RCXVSYS="UNIX",RCXVSYT="MSM"
19 I RCXVSYS["Cache" D
20 . I RCXVSYS["VMS" S RCXVSYS="VMS",RCXVSYT="CACHE" Q
21 . S RCXVSYS="CACHE",RCXVSYT="CACHE"
22 ;
23 I RCXVSYS="VMS" S RCXVNME=FILE_";1"
24 I RCXVSYS'="VMS" S RCXVNME=FILE
25 ;
26ARC ; Directly FTP to the Boston Allocation Resource Center
27 I $$GET1^DIQ(342,"1,",20.06,"I")="P" D
28 . S RCXVIP="MORPHEUS.ARC.MED.VA.GOV"
29 . S RCXVUSR="mccf"
30 . S RCXVPAS="1qaz2wsx"
31 ;
32 I $$GET1^DIQ(342,"1,",20.06,"I")'="P" D
33 . S RCXVIP="MORPHEUS.ARC.MED.VA.GOV"
34 . S RCXVUSR="cbotest"
35 . S RCXVPAS="1qaz2wsx"
36 ;
37 I RCXVSYS="VMS" D ^RCXVFTV
38 I RCXVSYS'="VMS" D ^RCXVFTC
39 ;
40 S RCXVARRY(RCXVTXT)="",RCXVARRY(RCXVBAT)="",RCXVARRY(RCXVNME)=""
41 S Y=$$DEL^%ZISH(RCXVPTH,$NA(RCXVARRY))
42 K RCXVARRY,%ZISHF,%ZISHO,%ZISUB,DIREC,FILE,I,RCXCT,RCXI,RCXOKAY,RCXVBAT
43 K RCXVFTP,RCXVHNDL,RCXVIP,RCXVNME,RCXVOUT,RCXVPAS,RCXVPTH,RCXVSCR,XMY
44 K RCXVSYS,RCXVSYT,RCXVTXT,RCXVUSR,RCXVVMS,CNT,QER,QFL,RCXMGRP,XMSUB
45 K VALMSG,RCXVROOT
46 Q
47 ;
48FCK ; Check that file is ready to read
49 S QFL=0,CNT=0,QER=0
50FQT I QFL Q
51 D OPEN^%ZISH(RCXVHNDL,RCXVPTH,RCXVSCR,"R")
52 I POP D G FQT
53 . HANG 5
54 . S CNT=CNT+1
55 . I CNT>10 S QFL=1,QER=1 D CLOSE^%ZISH(RCXVHNDL)
56 S QFL=1 D CLOSE^%ZISH(RCXVHNDL)
57 G FQT
58 ;
Note: See TracBrowser for help on using the repository browser.