[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
RE: [sqr-users] ftp using call system
- Subject: RE: [sqr-users] ftp using call system
- From: "Bambach, Tom" <TBambach@genchemcorp.com>
- Date: Fri, 14 May 2004 07:47:19 -0400
- Delivery-date: Fri, 14 May 2004 06:48:56 -0500
- List-id: "This list is for discussion about the SQR database reportinglanguage from Hyperion Solutions." <sqr-users.sqrug.org>
Patricia,
This is an example to FTP from Windows to UNIX
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: Overcashier, Patricia [SMTP:Patricia.Overcashier@aam.com]
> Sent: Thursday, May 13, 2004 12:49 PM
> To: Sqr-Users@Sqrug. Org (E-mail)
> Subject: [sqr-users] ftp using call system
>
> Hi group,
> I have used the 'call system' command for moving, deleting, and comparing
> files. I have also used it to send email messages.
> Now I would like to be able to use it to ftp my output file to a different
> server.
> Can I use 'call system' commands to ftp my output file?
> If so, how?
> Thanks.
> Patti
>
>
> **********************************************************************
> This email and any files transmitted with it are confidential and
> intended solely for the use of the individual or entity to whom they
> are addressed. If you have received this email in error please notify
> the system manager.
>
> This footnote also confirms that this email message has been swept by
> MIMEsweeper for the presence of computer viruses.
>
> www.mimesweeper.com
> **********************************************************************
>
>
_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users