Skip to content

ZosServers

The ZosServers object is a collection of all servers in the ZDD Network. This object is obtained using the Servers property of the ZosNetwork object.

ZosServers Properties

ZosServers exposes the following properties:

Property Type R/W Description
[index] [name] [name, connID] ZosServer R Server with specified name or index. You can, optionally specify an alternate connection ID.
Count Int32 R Number of objects in collection.
Path String R File system path name for collection.

...

ZosServers Methods

ZosServers exposes the following methods:

Add Method

Adds a new server. Returns index at which object has been added. If you specify port number 0, the port will be disabled. The “DataSets”, “Jobs”, and “Unix” folders are not available if the port is disabled. If you specify secure, TLS security will be enabled for all ports, including ChangeMan ports.

Int32  Add(  
        String name,  
        String address,  
        Int32 port,  
        Int32 codePage, [optional]  
        String description, [optional]  
        Int32 maxSessions, [optional] 
        Boolean passPhrase, [optional]  
        Boolean secure [optional] 
        ) 

...

Find Method

Searches for server with specified name and returns reference to object. Returns null if name is not found.

ZosServer  Find(  
    String name  
    ) 

FindIndex Method

Searches for server with specified name and returns zero-based index. Returns -1 if name is not found.

Int32  FindIndex(  
    String name  
    ) 

Refresh Method

Refreshes collection.

void  Refresh() 

Remove Method

Deletes a server. Returns true if server was removed or false if server is not found.

Boolean  Remove(  
    String name  
    ) 

ZosServers Examples

C

ZosServers servers = network.Servers;
int count = servers.Count;
ZosServer server = network.Servers[“SYSA”];
servers.Add("Server1", "172.20.20.1", 5000, 1140, "Test");
servers.Remove(“Server1”);

...

C++

ZosServers^ servers = network->Servers;
int count = servers->Count;
ZosServer^ server = network.Servers[“SYSA”];
Servers->Add("Server1", "172.20.20.1", 5000, 1140, "Test");
Servers->Remove(“Server1”);

...

Visual Basic

Dim servers As ZosServers = network.Servers
Dim count As Integer count = servers.Count
Dim server as ZosServer = servers(“SYSA”)
servers.Add("Server1", "172.20.20.1", 5000, 1140, "Test")
servers.Remove(“Server1”)

...

Jscript

var servers : ZosServers = network.Servers;
var count : int = servers.count;
var server : ZosServer = servers[“SYSA”];
servers.Add("Server1", "172.20.20.1", 5000, 1140, "Test");
servers.Remove(“Server1”);

...

Back to top