![]() |
| The AccuTerm forum has moved. Go to community.rocketsoftware.com to register for the new Rocket forum. |
|
Post Reply
|
| Author | |
tomit
Newbie
Joined: June 15 2005 Location: United States Status: Offline Points: 3 |
Post Options
Thanks(0)
Quote Reply
Topic: Using FTPosted: June 15 2005 at 1:40am |
|
DATA blah-blah
EXECUTE \FT\ Works fine until 'CAPTURING XX' is added. Is there another way to suppress output? Thanks, Tom Cordes, CFM project |
|
![]() |
|
Dave Fishel
Groupie
Joined: October 22 2004 Location: United States Status: Offline Points: 46 |
Post Options
Thanks(0)
Quote Reply
Posted: June 15 2005 at 3:08am |
|
Or, instead of suppressing output, capturing output. For example, if you are programmatically doing a file transfer, is there a way to capturing output to determine the success/failure of the transfer?
|
|
![]() |
|
Dave Fishel
Groupie
Joined: October 22 2004 Location: United States Status: Offline Points: 46 |
Post Options
Thanks(0)
Quote Reply
Posted: June 15 2005 at 3:32am |
|
Answer my own question!
A script can be created to test whether the transferred file exists. See below: ECHO OFF SCRIPT='Found=FileExists("A:\TEST")':CHAR(25) SCRIPT:="ActiveSession.Output(Found)":CHAR(25) PRINT CHAR(27):CHAR(2):"P":SCRIPT:CHAR(13): INPUT FOUND ECHO ON FOUND will have the value of True or False depending on whether the file "A:\TEST" exists. |
|
![]() |
|
tomit
Newbie
Joined: June 15 2005 Location: United States Status: Offline Points: 3 |
Post Options
Thanks(0)
Quote Reply
Posted: June 15 2005 at 5:25am |
|
Dave,
Thanks for the suggestions. I tried the 'CAPTURING XX' extension the the EXECUTE verb, but the transfer of a 'larger' files fails. Without capturing, the same file is transferred without incident. Tom Cordes |
|
![]() |
|
tomit
Newbie
Joined: June 15 2005 Location: United States Status: Offline Points: 3 |
Post Options
Thanks(0)
Quote Reply
Posted: June 15 2005 at 5:30am |
|
Dave,
I was hoping Pete S. would chime in with words of wisdom, like 'just set this parameter' or some such, but will try your suggestions if nothing is forthcoming. TomC |
|
![]() |
|
PSchellenbach
Admin Group
Moderator Joined: December 15 2003 Location: United States Status: Offline Points: 2150 |
Post Options
Thanks(0)
Quote Reply
Posted: June 17 2005 at 4:03am |
|
Hi All -
You cannot use CAPTURING with any of the file transfer programs. The file transfer programs all use PRINT to send data from the host to the PC, and CAPTURING redirects any PRINTed data into the capture variable, instead of sending it to the "terminal". Retrieving the status of a transfer is somewhat problematic. There is an escape sequence (ESC STX "S") that returns the status of the "raw" transfer, but it does not indicate the status of any pre- or post- file conversion operation, such as converting to an Excel worksheet. Thanks, Pete |
|
![]() |
|
nancyf
Newbie
Joined: August 19 2005 Location: United States Status: Offline Points: 26 |
Post Options
Thanks(0)
Quote Reply
Posted: March 05 2007 at 11:56am |
|
How do you use the ESC STX "S"....where does it go?
All I want is the status of the raw transfer. thanks, Nancy |
|
|
naf@ptl
|
|
![]() |
|
PSchellenbach
Admin Group
Moderator Joined: December 15 2003 Location: United States Status: Offline Points: 2150 |
Post Options
Thanks(0)
Quote Reply
Posted: March 06 2007 at 2:29am |
|
Hi Nancy -
Thanks, Pete |
|
![]() |
|
nancyf
Newbie
Joined: August 19 2005 Location: United States Status: Offline Points: 26 |
Post Options
Thanks(0)
Quote Reply
Posted: March 06 2007 at 3:30am |
|
I put the print and input statements as you've shown immediately following
PRINT '':(ESC:STX:'<':CMD:CR): which is the ftp command that does work and places the file. The status I get back is "Status: 0 files 0 bytes 0" but the file is actually placed. thanks, Nancy |
|
|
naf@ptl
|
|
![]() |
|
PSchellenbach
Admin Group
Moderator Joined: December 15 2003 Location: United States Status: Offline Points: 2150 |
Post Options
Thanks(0)
Quote Reply
Posted: March 08 2007 at 3:35am |
|
Hi Nancy -
The ESC:STX:'S' command returns the status of the last file transfer processed by AccuTerm's built-in file transfer functions, not an external ftp command. Thanks, Pete |
|
![]() |
|
nancyf
Newbie
Joined: August 19 2005 Location: United States Status: Offline Points: 26 |
Post Options
Thanks(0)
Quote Reply
Posted: March 08 2007 at 3:44am |
|
Thanks. I finally gathered that.
The FTP command I use (in DOSSVC) is "FTP -s:\\OURSERVER\Flatfile\FTP.EXPORT\ftpscript1.txt > C:\ftp.log" This works fine from a DOS command window but won't work insde of DOSSVC. The following works to plase the file but I dont' get a result returned anywhere. Thanks, Nancy "FTP -s:\\OURSERVER\Flatfile\FTP.EXPORT\ftpscript1.txt" |
|
|
naf@ptl
|
|
![]() |
|
PSchellenbach
Admin Group
Moderator Joined: December 15 2003 Location: United States Status: Offline Points: 2150 |
Post Options
Thanks(0)
Quote Reply
Posted: March 08 2007 at 4:17am |
|
Hi Nancy -
The Windows command processor does not handle redirection properly. Try explicitly launching the command processor using CMD.EXE with the '/C' option:
Thanks, Pete |
|
![]() |
|
nancyf
Newbie
Joined: August 19 2005 Location: United States Status: Offline Points: 26 |
Post Options
Thanks(0)
Quote Reply
Posted: March 08 2007 at 4:29am |
|
Oh my gosh!
I had to put C:\ in front of the ftp.log. (If it was writing it I don't know where.) Success! Thank-you very very much. Nancy |
|
|
naf@ptl
|
|
![]() |
|
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |