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

Re: Call from within SQR?



Bonjour Tom,

I experienced opening a Word document with the command:

                call system using $command #s wait

and it worked well. On UNIX the system will wait untill the command has
finished processing. For Windows however it defaults as NOWAIT. You can
override this behavior by adding WAIT at the end of the command line. I
think that starting with that you'll be able to figure a way to zip your
files. You will need to work on building your $command variable so it
includes the PKZIP call. As for FTP, I've used this bit of code to use with
UNIX:

                let $LineFeed = chr(10)
                let $User     = 'User_Account_on_Target_machine'
                let $Password = 'Password'
                let $DatFile  = 'Your_File.dat'

                let $command = 'ftp -n destination.server.org << EOF' ||
$LineFeed
                let $command = $command || 'user ' || $User || ' ' ||
$Password || $LineFeed
                let $command = $command || 'put ' || $DatFile || ' ' ||
'/home/' || $filename || $LineFeed
                let $command = $command || 'bye' || $LineFeed
                let $command = $command || 'EOF' || $LineFeed

                let #status = 0

                call system using $command #status
                show 'Status: ' #status

HTH,

Hugo Bergeron
> TI-Telecom
> Microcell - Montreal (QC)
(514) 937-0102 poste 7722
Fido: (514)  581-5303

> http://www.microcell.ca
> http://www.fido.ca
> http://www.thehungersite.com
>


-----Original Message-----
From: Hins, Thomas D. [mailto:Thomas-Hins@OUHSC.EDU]
Sent: Thursday, September 06, 2001 4:39 PM
To: SQR-USERS@list.iex.net
Subject: Call from within SQR?


I have an SQR that writes two files, the vendor wants the files sent via
one zip file, we are trying to set this up to run via the process
scheduler, can I call PKZIP from within an SQR as one of the last steps
and zip the two files together so the zip file then can be ftp'd to the
vendor?  I have done this using FoxPro but am pretty new to SQR.  Any
suggestions/help would be appreciated.
Thanks,
Tom Hins
Information Technology - Application Solutions
University of Oklahoma Health Sciences Center
P.O. Box 26901
Oklahoma City, OK  73190
Phone:(405) 271-2262 Ext. 50213
Fax: (405) 271-2352