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

RE: [sqr-users] FTP From SQR



Stu,

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 it 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: Wood, Stuart [SMTP:Stuart.Wood@tfn.com]
> Sent: Thursday, July 17, 2003 1:59 PM
> To:   'sqr-users@sqrug.org'
> Subject:      [sqr-users] FTP From SQR
> 
> Does anyone have some sample code that FTPs a file from NT to Unix?
> 
> Thanks,
> 
> Stu
> 

_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users