Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need help receiving file

Status
Not open for further replies.

DavidNYDN

Programmer
Nov 18, 2004
2
US
I'm using Access to control an Extra session. I'm trying to transfer a file from the mainframe onto my desktop. Here's my code:

Public Function ReceiveFile(strSource As String, strDestination As String)
Sess0.ReceiveFile strDestination, strSource
End Function

It works, but unfortunately it leaves extra hanging at the file transfer summary screen. I've tried using Sendkeys to send an Enter after the transfer, but it doesnt work. Anyone have any ideas?
 
You'll also need a transfer scheme. Under Tools>Transfer File (On 6.5) a dialog is opened to set up a transfer. Input all the correct settings, then save this as a scheme.

My Code after That is:
Sess0.FileTransferScheme = "C:\Program Files\E!PC\schemes\MySettings.eis"
Sess0.FileTransferHostOS = 1
Sess0.ReceiveFile "c:\windows\temp\Infopac.txt", "'d901.u967048.infopac.report'"

Hope this helps,

calculus
 
hey calculus.

I tried your code out and it sorta worked. I forgot to mention in my original post that I was transferring the file using FTP. Unfortunately there seems to be no way around my problem when transferring as FTP.

However, when I changed the File transfer protocol to IND$File, the code worked like a charm :)

It would be nice to be able to get it to work with FTP though, since it transfers much faster than IND$FILE for some reason.
 
I'm not an expert on file transfers. I gave you the 1 code instance I have. I just know that code works and I don't have to touch it.

Good luck looking with FTP. Let me know if you find a better way.

calculus
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top