source: WorldVistAEHR/trunk/r/ACCOUNTS_RECEIVABLE-PRCA-PRY-RC/RCXVFTV.m@ 923

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

initial load of WorldVistAEHR

File size: 2.1 KB
RevLine 
[613]1RCXVFTV ;DAOU/ALA-FTP for VMS ;08-SEP-03
2 ;;4.5;Accounts Receivable;**201,227**;Mar 20, 1995
3 ;
4 ;
5VMSO ; Outgoing for VMS systems
6 ;
7 ; Set up variables
8 ; RCXVFTP = Executable filename
9 ; RCXVPTH = Path name
10 ; RCXVNME = Outgoing filename
11 ; RCXVTXT = .TXT filename
12 ; RCXVBAT = .COM filename
13 ;
14 D VTXT
15 ;
16 S Y=$$GTF^%ZISH($NA(^TMP($J,"RCXVFTP",1,0)),3,RCXVPTH,RCXVBAT)
17 K ^TMP($J,"RCXVFTP")
18 I 'Y S VALMSG="Not able to create the .COM file" Q
19 ;
20VOBAT ; Output and create the .COM file
21 ;
22 ; Create the executable commands for the .TXT file
23 S ^TMP($J,"RCXVFTP",1,0)="SET TYPE ASCII"
24 S ^TMP($J,"RCXVFTP",2,0)="PUT "_RCXVNME
25 S ^TMP($J,"RCXVFTP",3,0)="EXIT"
26 ;
27 ; Output and create the .TXT file
28 S Y=$$GTF^%ZISH($NA(^TMP($J,"RCXVFTP",1,0)),3,RCXVPTH,RCXVTXT)
29 K ^TMP($J,"RCXVFTP")
30 I 'Y S VALMSG="Not able to create the .TXT file" Q
31 ;
32 X RCXVOUT
33 ;
34 HANG 60
35 ;
36 Q
37 ;
38VTXT ; Create the .TXT file
39 S RCXVFTP="RCXVCBO"
40 S RCXVSCR=RCXVSCR_".LIS",^TMP("RCXVMSG",$J,RCXVSCR_";1")=""
41 S RCXVBAT=RCXVFTP_$S($G(RCXVSYS)="VMS":".COM",1:".BAT")
42 S RCXVTXT=RCXVFTP_".TXT"
43 ;
44 I RCXVSYT="DSM" S RCXVOUT="S X=$ZC(%SUBMIT,RCXVPTH_$S($E(RCXVPTH,$L(RCXVPTH))[""]"":"""",1:"":"")_RCXVBAT)"
45 I RCXVSYT="CACHE" S RCXVOUT="S X=$ZF(-1,""SUBMIT ""_RCXVPTH_$S($E(RCXVPTH,$L(RCXVPTH))[""]"":"""",1:"":"")_RCXVBAT_""/NOLOG_FILE/NOPRINT"")"
46 ;
47 I $G(RCXVVMS)="" S RCXVVMS="U"
48 ;
49 ; Kill off the .COM and .TXT files
50 S RCXVARRY(RCXVTXT)="",RCXVARRY(RCXVBAT)=""
51 S Y=$$DEL^%ZISH(RCXVPTH,$NA(RCXVARRY))
52 K RCXVARRY
53 ;
54 ; This sets the .COM file name for VMS systems
55 I RCXVSYS="VMS" D
56 . S ^TMP($J,"RCXVFTP",1,0)="$SET NOON"
57 . S ^TMP($J,"RCXVFTP",2,0)="$SET NOVERIFY"
58 . S ^TMP($J,"RCXVFTP",3,0)="$SET DEFAULT "_RCXVPTH
59 . S ^TMP($J,"RCXVFTP",4,0)="$DEL "_RCXVSCR_";*"
60 . S ^TMP($J,"RCXVFTP",5,0)="$DEF SYS$OUTPUT "_RCXVSCR
61 . I RCXVVMS="M" S ^TMP($J,"RCXVFTP",6,0)="FTP /TAKE_FILE="_RCXVTXT
62 . I RCXVVMS="U" S ^TMP($J,"RCXVFTP",6,0)="FTP "_RCXVIP_" /USERNAME="""_RCXVUSR_""" /PASSWORD="""_RCXVPAS_""" /INPUT="_RCXVTXT
63 . S ^TMP($J,"RCXVFTP",7,0)="$DEASSIGN SYS$OUTPUT"
64 . S ^TMP($J,"RCXVFTP",8,0)="$SET FILE/PROTECTION=(S:RWED,O:RWED,G:RWED,W:RWED) "_RCXVSCR
65 ;
66 Q
Note: See TracBrowser for help on using the repository browser.