Skip to content

Custom Commands

Robin Rodricks edited this page Feb 16, 2023 · 12 revisions

API

  • Execute() - Execute a custom or unsupported command, and return a single-line FTP response.

  • ExecuteMultiline() - Execute a custom or unsupported command, and return a multiline output of the FTP response.

How do I execute a custom command?

Use this code:

var reply = client.Execute("XCRC myfile.mp4");
if (reply.Success){
    Console.WriteLine("Code: " + reply.Code);
    Console.WriteLine("Message: " + reply.message);
}

How do I execute a custom command which returns a multi-line output?

Use this code:

var reply = client.ExecuteMultiline("LIST JOB00044");
if (reply != null){
    Console.WriteLine("Got lines: " + reply.Count);
}

Sample output of executing a custom command to get JCL job output on IBM z/OS systems:

image

Clone this wiki locally

⌂ 换网址