[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

ftp a file from within SQR



Title: ftp a file from within SQR

Greg, we do it a bit differently on our project, but you can easily wrap a KSH script (UNIX) around your sql call and do it all in one simple script using redirected stdin:

=begin====================
#!/bin/ksh
# SQRandFTP.ksh
# This script executes an SQR report and sends the file to a remote server
sqr ....... your report commands go here

ftp remotemachine.yourdomain.com <<END
loginname
password
bin
cd /remotepath/...
put file remotefilename
quit
END
=====end================







NOTE: remotefilename in the PUT command is optional
The ftp command is given all of the following stuff as though you were typing it at the command prompts.  Pretty cute, huh?

Duff