Rocket Software Homepage
Forum Home Forum Home > AccuTerm Knowledge Base (read only) > File Transfer
  New Posts New Posts RSS Feed - Using FT
  FAQ FAQ  Forum Search   Register Register  Login Login

The AccuTerm forum has moved. Go to community.rocketsoftware.com to register for the new Rocket forum.

Forum LockedUsing FT

 Post Reply Post Reply
Author
Message
tomit View Drop Down
Newbie
Newbie


Joined: June 15 2005
Location: United States
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote tomit Quote  Post ReplyReply Direct Link To This Post Topic: Using FT
    Posted: 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
Back to Top
Dave Fishel View Drop Down
Groupie
Groupie


Joined: October 22 2004
Location: United States
Status: Offline
Points: 46
Post Options Post Options   Thanks (0) Thanks(0)   Quote Dave Fishel Quote  Post ReplyReply Direct Link To This Post 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?
Back to Top
Dave Fishel View Drop Down
Groupie
Groupie


Joined: October 22 2004
Location: United States
Status: Offline
Points: 46
Post Options Post Options   Thanks (0) Thanks(0)   Quote Dave Fishel Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
tomit View Drop Down
Newbie
Newbie


Joined: June 15 2005
Location: United States
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote tomit Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
tomit View Drop Down
Newbie
Newbie


Joined: June 15 2005
Location: United States
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote tomit Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
PSchellenbach View Drop Down
Admin Group
Admin Group

Moderator

Joined: December 15 2003
Location: United States
Status: Offline
Points: 2150
Post Options Post Options   Thanks (0) Thanks(0)   Quote PSchellenbach Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
nancyf View Drop Down
Newbie
Newbie


Joined: August 19 2005
Location: United States
Status: Offline
Points: 26
Post Options Post Options   Thanks (0) Thanks(0)   Quote nancyf Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
PSchellenbach View Drop Down
Admin Group
Admin Group

Moderator

Joined: December 15 2003
Location: United States
Status: Offline
Points: 2150
Post Options Post Options   Thanks (0) Thanks(0)   Quote PSchellenbach Quote  Post ReplyReply Direct Link To This Post Posted: March 06 2007 at 2:29am
Hi Nancy -

EQU ESC TO CHAR(27), STX TO CHAR(2)

PRINT ESC:STX:"S":
INPUT STATUS

Thanks,

Pete
Back to Top
nancyf View Drop Down
Newbie
Newbie


Joined: August 19 2005
Location: United States
Status: Offline
Points: 26
Post Options Post Options   Thanks (0) Thanks(0)   Quote nancyf Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
PSchellenbach View Drop Down
Admin Group
Admin Group

Moderator

Joined: December 15 2003
Location: United States
Status: Offline
Points: 2150
Post Options Post Options   Thanks (0) Thanks(0)   Quote PSchellenbach Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
nancyf View Drop Down
Newbie
Newbie


Joined: August 19 2005
Location: United States
Status: Offline
Points: 26
Post Options Post Options   Thanks (0) Thanks(0)   Quote nancyf Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
PSchellenbach View Drop Down
Admin Group
Admin Group

Moderator

Joined: December 15 2003
Location: United States
Status: Offline
Points: 2150
Post Options Post Options   Thanks (0) Thanks(0)   Quote PSchellenbach Quote  Post ReplyReply Direct Link To This Post 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:
cmd = "CMD.EXE /C FTP -s:\\OURSERVER\Flatfile\FTP.EXPORT\ftpscript1.txt > ftp.log"

PRINT ESC:STX:'>':CMD:CR:

Thanks,

Pete
Back to Top
nancyf View Drop Down
Newbie
Newbie


Joined: August 19 2005
Location: United States
Status: Offline
Points: 26
Post Options Post Options   Thanks (0) Thanks(0)   Quote nancyf Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.03
Copyright ©2001-2019 Web Wiz Ltd.