login about faq

We currently have applications that upload files to mainframes, and those applications issue a SITE command prior to executing the PUT command. We use this to set record lengths and cylinder sizes; without those commands, the PUT will either fail or pad each record to a default number of bytes.

The mainframe SSH software we are using (CoZ), overloads the LS command to accomplish the equivalent of FTP’s SITE command. We would pass the name/value pairs after LS /+ (LS /+ recl=150, for example).

I’ve looked through the properties and methods exposed by the Sftp class and I couldn’t locate anything that we could use that would allow us to execute a command string to the SSH server. Is there a way for us to use ChilKat to pass a command directly to the server?

asked Mar 19 '13 at 17:47

chilkat's gravatar image

chilkat ♦♦
11.8k316358420


FYI, I found a way to get the site message to the host server. Since our mainframe SSH host (CoZ) overloads the LS method for this purpose, I tried passing the overload syntax in the OpenDir method prior to executing the upload and it worked. I guess OpenDir issues an LS command.

I’m guessing this would only work for CoZ server implementations.

link

answered Mar 19 '13 at 17:48

chilkat's gravatar image

chilkat ♦♦
11.8k316358420

You can use the quote method , here in C#:

string strFtpOptions = "site lrecl=64 blksize=64 primary=1 secondary=1";
strFtpOptions = strFtpOptions.ToUpper();
_ftpClient.Quote(strFtpOptions);
link

answered Mar 26 '13 at 14:31

jj3pa's gravatar image

jj3pa
1

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×200
×3

Asked: Mar 19 '13 at 17:47

Seen: 1,938 times

Last updated: Mar 26 '13 at 14:31

powered by OSQA