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

RE: [sqr-users] Using Call System to FTP on file on WINNT-and PeopleSoft



Barb,

create a file with contents like this:

open 123.456.789.12
gtkps
go4it
ascii
put T:\transfer\gcidvnd.txt /peoplesoft/gcidvnd.txt

quit
EXIT

 (use append instead of put if you want to append to the file if it
exists - put and append will both create the file if it doesn't exist)

 this file could be created and written by your SQR program; assume
that it is and that $local_file = 'T:\transfer\gcidvnd.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: bmrazek@sympatico.ca [SMTP:bmrazek@sympatico.ca]
> Sent: Tuesday, January 20, 2004 3:11 PM
> To:   sqr-users@sqrug.org
> Subject:      [sqr-users] Using Call System to FTP on file on WINNT-and
> PeopleSoft
> 
> Hi Everyone,
> 
> I have read a few postings on this issue, and have tried recommended
> changes, but nothing seems to be working for me.  I an running an SQR
> under PeopleSoft PIA (Web) that is using call system to ftp a file from NT
> to the FTP site.  The code works fine if I run it through SQRW, but when
> running it through a PeopleSoft page, nothing happens.  I don't believe I
> am getting a valid status code either, as it is always 0, though from what
> I read in the SQR manuals, for NT, anything less than 32 is an error.
> 
> Though my code is built dynamically in the SQR, ultimately, when call
> system is executed, it looks like this:
> 
> C:\WINNT\system32\cmd.exe /c ftp -n
> -s:\\scanty\psoftfm\\FMDEV\user\upload\fms_ftpout.bat
> 
> As stated, this works fine from the "run" command in windows, and also
> running through SQRW, but running it from within peoplesoft results in no
> results :-)
> 
> Any suggestions would be greatly appreciated.
> 
> Barb
> 
> 

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