serena_knight Posted September 12, 2019 Posted September 12, 2019 i am able to transfer file from the mainframe to the pc using FTP in the command prompt, but i would like to user the functions in an autoit script, i coded the following note: for security purpose i will not use the actual items just as user id and password and host id and file names. #include <ftphx.au3> $hopen = _ftp_open(myftp control") $hconn = _ftp_connect($hopen, "hostid", "userid", "pass") ; $hconn does return a valid object $rc = _ftp_fileget($hconn, "'host file'", "pc file",false) msgbox(0,"","error = " & error & " extended = " & @extended) problem: after the execution of the fileget the contents of the file looks like this: aaaae0000000000000000000000000 and other characters the file on the mainframe is characters. also when running ftp thru the comman prompt everything works file,,,please help
Gianni Posted September 12, 2019 Posted September 12, 2019 just a wild guess: try to change this line from this $rc = _ftp_fileget($hconn, "'host file'", "pc file",false) to this $rc = _ftp_fileget($hconn, "'host file'", "pc file", false, 0, $FTP_TRANSFER_TYPE_ASCII) Chimp small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt....
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now