Jump to content

Recommended Posts

Posted

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

 

 

Posted

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)

 

 

image.jpeg.9f1a974c98e9f77d824b358729b089b0.jpeg Chimp

small minds discuss people average minds discuss events great minds discuss ideas.... and use AutoIt....

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...