0 votes
by (120 points)

Hello,

We need to connect to an AS400 FTP server. The following commands need to be sent to the server after the connection:

ascii
namefmt 0

What would be the best way to achieve that? I see 2 possibilities, but I'd like to validate with you:

1 - Using the SendCommand method to pass those commands. For exemple: client.SendCommand("NAMEFMT 0");

2 - Using a property named "DisableImplicitAs400NameFormat" which would be set to true. The Rebex documentation indicates: "Gets or sets a value indicating whether the SITE NAMEFMT 1 is used when AS/400 system is detected. Default is false, which means the SITE NAMEFMT 1 is used."

What would work best? Any other idea?

Thank you

Applies to: Rebex FTP/SSL

1 Answer

0 votes
by (3.9k points)

Hello,

The DisableImplicitAs400NameFormat option only relates to the batch commands ( like upload, download ).

If you would like to control this yourself, you should use the first way, but instead of calling:

client.SendCommand("NAMEFMT 0");

you have to use

client.SendCommand("SITE NAMEFMT 0");

or

client.Site("NAMEFMT 0");

If this doesn't work, please post a communication log created using Ftp object's LogWriter property.

...