[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
RE: [sqr-users] ftp sqr output from NT to Unix
Tajinder,
create a file with contents like this:
open 123.456.789.12
ftpusr
4ftponly
ascii
append g:\PeopleSoft\mxiss_grw.txt /home/ftpusr/files/mxissuef_grw.txt
literal site chmod 777 /home/ftpusr/files/mxissuef_grw.txt
quit
EXIT
(use put instead of append if you want to overwrite the file if it exists)
this file could be created and written by your SQR program; assume that is
is
and that $local_file = 'g:\PeopleSoft\mxiss_grw.txt'
and that $ftp_file is the name of the above file
close $ftp_file after writing it...
then in your SQR program, do this:
let $syscmd = 'FTP -s:' || $ftp_file
CALL SYSTEM USING $syscmd #stat WAIT
if #stat = 0
let $disp = 'FTP successful...'
display $disp
let #stat1 = delete($local_file)
if #stat1 <> 0
let $disp = 'Error ' || to_char(#stat1) || ' deleting ' || $local_file
display $disp
end-if
else
let $disp = 'Error ' || to_char(#stat) || ' attempting FTP...'
display $disp
end-if
end-if
Tom
> -----Original Message-----
> From: Tajinder Chahal [SMTP:Tchaha@Roushind.com]
> Sent: Tuesday, May 06, 2003 4:38 PM
> To: sqr-users@sqrug.org
> Subject: [sqr-users] ftp sqr output from NT to Unix
>
> I would like to ftp a flat file which is being generated by running an
> sqr on NT to Unix. How can I do that within the same sqr.
> Also I need to delete the file from NT once it gets ftp'd
> successfully.
>
> TIA
>
> Tajinder
>
>
>
_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users